News for hackers. Stuff that matters.
Re:In Defense of Copy and Paste by ufo on Saturday February 09, 2013 @05:49AM (#5192291)
I don't know if I agree 100%. Sometimes the extra abstraction helps you solve the problem in the first place.

In my experience the OP is right. The worse problem is when you eliminate duplications in the wrong place or using the wrong abstraction, leading to brittle abstractions that break in the future.

Re:In Defense of Copy and Paste by adrianhoward on Saturday February 09, 2013 @06:03AM (#5192306)
Yeah - there are probably exceptions ;-)

However what I've seen happen on multiple occasions is somebody merrily driving along churning out code then suddenly hitting the "ohhh - duplication is bad" wall and halting as they feel their way around the duplication and abstract they may need (or may not - since they've not written the code yet).

Duplication is not a mortal sin. Having it sit there for a few hours while you work out the meat of the problem isn't going to kill any kittens.

And often the easiest way to fully grok the abstraction that you need is to make the duplication really, really obvious.