News for hackers. Stuff that matters.
Re:Test Driven Development Actually Works by greggman on Sunday September 30, 2012 @07:19PM (#4594586)
Is TDD supposed to prevent bugs? I thought the main point of TDD was it was suppose to encourage better design.

First write the test. This is supposed to make you think more about the API and how you'd like to use it. Then write the implementation now that you've effectively tried using the API by writing the test. That why it's called Test DRIVEN Development. If all you're doing is writing unit tests that's not really TDD, that's just writing tests.

Re:Test Driven Development Actually Works by cunac on Sunday September 30, 2012 @07:29PM (#4594608)
it is supposed to do both, prevent bugs by the fact that you capture behavior in test and improving design by leveraging natural laziness of humans to take less effort to achieve results. Usually less effort approach results in clean better structured code at least that is what I observed