News for hackers. Stuff that matters.
Re:In Defense of Copy and Paste by danso on Friday February 08, 2013 @02:27PM (#5189636)
So the problem with that is seems to be...what if there was another view that required pagination?

So the two unpleasant scenarios seem to be this:

1) The OP's assertion that DRYing the code may unintentionally break functionality in all the places that use it.

2) The DRY assertion: copy-pasting functionality, such as pagination, makes it more likely that the pagination functionality won't be properly updated across all the modules that use it.

I guess it's a case of YMMV...because in this hypothetical app, it doesn't seem likely that the number of views will multiply, thus making it easier to update the copy-pasted code. But that seems like a mindset as prone to future problems than one that is more DRY-minded.

There are no comments on this comment yet.