Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Better design is one of the supposed benefits of TDD. The article nicely demolishes that view, and I agree fully with what it says.

There is a small scale design benefit to writing tests, and that is simply that you always have a "user" of your code, even if it's only focused on tiny bits of it.

But having said that, I get essentially the same design benefit from writing tests afterwards, or writing a test client, or writing user documentation. I usually discover code needs some design improvement once I have to explain or use it.



It leads to better design (is the theory), but it is not itself a design process. It's a development process. TDD doesn't replace the need to stop, think, and consider your design.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: