Hacker News new | ask | show | jobs
by NeutralForest 401 days ago
TDD/BDD are just tools, in some cases they're useful and some other cases they're not.

If your work is deeply exploratory and you don't even know what the final interface/API will look like, you shouldn't start with TDD. You should probably test as you go though, once you find some behavior you'd like to keep and pin down variations and edge cases you met during dev.

If/Once you know what the expected behavior is, you can encapsulate that knowledge in tests, that's TDD to me. Then, I can write more code that meets the need of the expected API.