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

This guy totally misses the point of TDD. You write the test first because it is the first client of the interface you believe you have finished designing. While writing the test, half the time you will realize that the API sucks and you need to change it.


Also, for pair programming it gives the pair a common goal to aim towards. The people know the inputs, and outputs up front. So one person doesn't just stare into space whilst the other person codes the function, and then says "this is what I wanted it to do".

It also helps reduce code, since you only write code to pass tests. You do not write code for some general theoretical use case that is never required.


Exactly. TDD is the only decent way I've seen for quickly designing a good interface, from the outside in. The test suite that you generate along the way is a nice bonus.




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

Search: