www.francisfish.com

Click Bookshop to see my novels. Buddhist, father of 2, Ruby on Rails programmer for money, and fiction writer.

    follow me on Twitter

    TDD is effective if you look at the right things

    Published: 8:11 PM GMT, Monday, 2 November 2009

    http://theruntime.com/blogs/jacob/archive/2008/01/22/tdd-proven-effective-or-is-it.aspx

    It's nothing to do with the initial development. All about the long-term viability of the code. You can't refactor or maintain something if you can't prove your changes haven't broken it. I do believe that the code is better, as long as each test comes directly from the specification, it shows you have understood it.

    The comment above about doing your own coverage using the debugger is naive. You can cover everything every time you make a change, or only the tiny bit when you make the next one? Then you start to have something really brittle. Not immediately, but soon (really soon) you will start to feel fear every time you change something. Then you're in trouble.

    This research is measuring the wrong thing. I don't know how you'd measure the longevity of the code, but the initial build is only 10% of the effort in any large system. This is not taught at school and it should be. Writing maintainable code that has full tests is not a luxury. Far too many people think it is.

    Comments (1)

    you've missed the point. neither the author of the post, nor the original study compared TDD to people who don't unit test at all (and therefor have nothing to verify regression). you'd be correct if they did. this is a comparison of people who write tests BEFORE they write the actual program (Test Driven Development) to those who write their unit tests AFTER they've written the unit itself. both groups will have tests in place to verify they didn't break things they change later. assuming they write quality tests, which is also part of his discussion. i agree with the point about using a debugger as unit tester. very flawed.

    left by stephen . Friday, 15 January 2010 7:07 PM
    Add Comment