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

> If you suck at writing code, then TDD should help you determine whether your sucky code produces the correct output for a given input

Well, if you suck at writing code, what guarantees do you have that the tests (which are also code you write) are even correct?



You don't have any such guarantees. But your test would have to be broken in the same way that your real code is broken, not in some different way.


Well, if the test is accidentally testing the wrong input/output pairs, your code can pass the test perfectly and still be broken. Especially if you follow the "build to the test" mantra.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: