News for hackers. Stuff that matters.
Re:Testing code is simple by icefox on Thursday September 26, 2013 @09:07AM (#6450445)
"Test driven development is now widely recognised as ‘a good thing’"

should probably be written

"Using test testing in development is now widely recognised as ‘a good thing’"

There is controversy around specifically TDD and studies showing that it does no better than writing unit tests during or after development. For citation see the references at the end of the chapter on TDD in "Making Software: What Really Works, and Why We Believe It"

Re:Testing code is simple by NateDad on Thursday September 26, 2013 @09:14AM (#6450475)
One reason why TDD is better than writing unit tests after development is because then the tests actually get written. Whereas, if you wait to write them after the code, they often get lost in the pressure to deliver the feature and/or move on to developing new features.

The other reason TDD is good is that it forces you to make modular code with limited functionality to make it easy to test. You can do that without TDD... but TDD forces you to think about it ahead of time, rather than writing a huge mess of code and then saying "well, this will be too hard to test, so we won't bother".

TDD isn't magic, it's more of a mental hack to get you to do the right thing. If you do the right thing anyway, then no, TDD won't help.

Note, I'm not a huge TDD guy. In fact, I usually write my code first. But I've done some TDD and I can definitely see the benefit, and I try to do it when I can.

Re:Testing code is simple by jasonlotito on Thursday September 26, 2013 @09:17AM (#6450490)
Unless I'm thinking of something else, that report fails to account for the other benefits of TDD. Benefits that cannot be gained writing it later. Nor does the study even consider them in it's final analysis.