Red/Green/Run Like F**k!
My friend (+ colleague) Rob has a fairly insightful post on resistance to Unit Testing/Refactoring in the development world. (http://www.electricbiro.co.uk/2008/09/17/pushing-for-change/)
I don’t know whether its our relative “newbie” status in the development world (2 years and counting), but whenever we suggest introducing testing or refactoring, a look of panic crosses the faces of our peers and superiors. Why?
I seem to hear the following words way too often:
Just bodge it
That just makes me die a little bit inside every time I hear it. Software development is a lot like building Frankenstien’s monster. You start out with a pile of useless ugly pieces, and try to turn it into something beautiful. Along the way, it’s a monstrosity, and tends to get uglier as you tack new bits onto it. Then it kills people.

photo credit: love not fear
I understand the difficulty of adding testing to Brownfield/Legacy systems, but the way forward is to write a test for each modification/bugfix as you go, not to mired in the endless task of unit testing a system written by committee of many years. And following, that think “is there a better way?”.
So, just as Rob says, “The only way to avoid this is to just refactor when nobody is looking.”
I too will resolve to avoid BDD (Bodge-Driven Development), unit test my code, and refactor where possible.
Tags: refactoring, Software development, tdd, unit testing
This entry was posted on Wednesday, September 17th, 2008 at 3:34 pm and is filed under Code.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.











