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

> It sounds like you're making the mistake of thinking that TDD means writing the tests first.

Actually, Kent Beck, who coined the term TDD, has the following to say in his book "Test Driven Development":

"In Test-Driven Development, we Write new code only if an automated test has failed"

This implies that in TDD the test is written first.

Regardless of any definition, test-first and test-last are just two ends of a scale we can use.




He’s saying to write a test before its code, but don’t write all the tests before any code.


He's also saying "I get paid for code that works, not for tests, so my philosophy is to test as little as possible to reach a given level of confidence..." https://stackoverflow.com/questions/153234/how-deep-are-your...




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: