Tim Bray posts on the actual practice of Test Driven Development.

Here’s my thesis: As a profession, we do a lot more software maintenance than we do greenfield development. And it’s at the maintenance end where TDD really pays off. I’m starting to see lapses from the TDD credo as more and more forgivable the closer you are to the beginning of a project. And conversely, entirely abhorrent while in maintenance mode.

I am definitely not an orthodox member of the TDD tribe. I write code before I write the tests. On a good day, I build out the tests and the features simultaneously. On a not so good day, I don’t do as well. But my main goal with TDD is to have a skeleton of tests for every feature so that when bugs crop up, I can add in the tests that confirm the fixes and expand the regression test suite. So I’m on Tim Bray’s side — the key is to have enough tests initially to make writing tests an essential part of your maintenance process.