Hacker News new | ask | show | jobs
by cawhitworth 5712 days ago
Just a point - having tests in your code doesn't mean you're doing TDD.

Doing TDD - that is, writing tests up-front - forces you to not only consider the correctness criteria for your code (and gives you the confidence that the code, once written, works correctly), but it also forces you to design your code for test, which enforces separation between components (so that they're individually testable), generation of sane interfaces (so that simple mock objects can be written) and so forth. It's not just about making code that you can be confident in, it's about making saner code for the long term, too.

1 comments

Yes. This article seem to confuse TDD vs having tests. It's talking about having tests, but referring to TDD. You can have a solid set of unit tests even if you didn't doing TDD.