Tuesday, July 31, 2012

Clone detector

I wish I could take credit for this one, but alas, I cannot.  I shamelessly stole the idea from my co-author.  Hey, at least I'm not taking credit for it.

I am 100% guilty of Copy and Paste programming and depending on the situation it's not really a concern to me unless you're talking a LOT of code or it's done out of sheer laziness.  If you've got the time and the motivation to 'do it right', by all means absolutely do it, but if you're going to introduce multiple levels of abstraction, add a handful of helper classes, and/or need to refactor twelve other methods which means rewriting fifty-seven unit tests just to implement your new not-copied-and-pasted code, you may want to  reconsider.

In my view, thoughtlessly 'doing it right' has the capacity to be as detrimental to a project as a deliberate and well-placed copy and paste job.  Creating and maintaining quality software requires the thoughtful consideration of many factors well beyond just the structure of the code.

Title: Clone detector
Snarky: ...

No comments:

Post a Comment