Monday, March 11, 2013

Test Driven (Design &) Development

I have been following Test Driven Development (TDD) for a few months now. 

Some of the direct benefits that I've seen are:

  • Highly improved productivity due to minimal & accurate development.
  • Highly improved code quality as I can refactor without fear of breaking something.
  • A mental pat on my back whenever my tests are green-lighted :). i.e it is fun.
I have been trying to spread this practice at the workplace for the past few months with little success. My "sales pitch" typically revolves around the points mentioned above and I've had little success.

As I use TDD more and more, what I have come to realize is that not only has my code become cleaner now, my designs are more robust and flexible. I think to a large extent this is due to the fact that TDD tends to negate the effects of design prejudices.

Here is another blog that echoes some of the points mentioned here.

I am currently reading Test Driven Development : By Example by Kent Beck . Will publish a review once done reading. Something that has really taught me TDD has been the XP episode by Robert C. Martin and Robert S. Koss.

No comments: