- Posted by liammclennan on March 5, 2009
One of the principle criticisms of test-driven development is based on return on investment (ROI). The critics argue that the benefit of TDD is less than the cost of TDD.
The cost of TDD is easily measured - how long is spent writing and maintaining tests. The benefit is more complicated. I see five major benefits:
- higher quality finished product
- less time spent debugging
- psychological benefit of continuously moving forward (never feeling "stuck")
- QA and documentary benefit of the resulting tests
- test safety net that facilitates refactoring
I did a contract where the development machines had 17" LCDs. The manager bought them because the cost of screens was visible to him, but the cost of developers Alt-tabbing was not. The ROI criticism is based on a similar false economy - the cost of TDD is more visible, and easily measured, than the benefits.
I'm not dogmatic (disciplined?) in my use of TDD, but I do it because I believe the ROI is positive.
Technorati Profile