/// Tuesday, April 11
Test-Driven Development to the Rescue
My first project at my current job was to write some business rules against XML. At first, it seemed liked a daunting task. To write and test a rule required knowledge of the backend framework, the servers, many applications and patience to push a document through the framework. There was no way I could push through 420 test scenarios doing that. I spent several days analyzing what was in place to isolate my task, refactoring existing code etc (though i did not merge it back) to create a test harness. I even fibbed to the project manager on my progess knowing that I would make up the time later. That's how much confidence I have in Test-Driven Development. At first, things were slow-going. The pressure was mounting. Once I had my test harness in place, I'm guessing not only did I do this task faster than anyone before me, I also had reproduceable tests. To top of it, I had code generators to automate SQL scripting, etc. Testing was smooth as butter.