Hacker News new | ask | show | jobs
by 4140tm 1720 days ago
You don't need precise specs to practice TDD. If you have idea of the code you need to write, you can write the test for it beforehand - no matter how often someone might change their mind about the app.

Doing so would actually make your life a lot easier when it's time to alter functionality, because now you have well tested and testable code. Code that is written to be tested is usually a lot easier to reason about, to change and extend.

If you do it in concise manner and test behavior rather than implementation, what you previously thought of overhead will actually speed you up.

1 comments

Tests are also meant to be continously refactored, though.