Wednesday, December 19, 2012

A hammer for a nail

I've viewed Test Driven Development with some skepticism for a number of years.  TDD is sometimes preached as a core tenet of software engineering, but I've long held that it only makes sense in specific environments, such as web applications.  I'm also a fervent opponent of 'vanity metrics' and I have yet to see a project where lines of code covered by unit tests translated into real world improvement in product performance or developer productivity.  Unit tests are a great tool for developers, but when they become mandated it's too easy for developers to focus on meeting the build or integration criteria and stop thinking critically about how the code might fail.

Which is why I'm happy to say that my current project is very much following Test Driven Development principles.  TDD fits perfectly for Django application development.  The final product will be a heavily AJAX web app, and yet I've been able to design and test with confidence all the server-side logic without writing a line of javascript.  More useful still, as a developer relatively new to the Django framework, the suite of tests have made my multiple redesigns go much more smoothly.

I'm looking forward to seeing how my development process continues to evolve as my solo projects move forward.

No comments:

Post a Comment