March 23, 2004
Fix a Bug, Write a Test
What struck me was a point he made about test driven development. In essence, he says that when you find and fix a bug write a unit test to ensure that your fix works. It's not a point I had come across before, but it's so blindingly obvious that I'm surprised I haven't figured it out. Well, alright, read it elsewhere.
It works on a number of fronts - if there was an existing test then this bug wouldn't have been raised, adding a new test to make sure your software does what it's supposed to do is always a good thing, and you are protecting your functionality against accidental breaks in the future.
Posted by Andy Todd at March 23, 2004 08:17 PM