2 ms·
Do you use TDD on prototypes? Or other projects where the design is highly likely to change or be discarded?
by dwaltrip 9y ago
Do you use TDD on prototypes? Or other projects where the design is highly likely to change or be discarded?
- danthemanvsqz 9y agoI don't use them on prototypes because I will throw away that code. But IMHO TDD is at it's best when your design is highly likely to change. The only protection you have against a moving target is your test suite. The requirements or our understanding of the requirements change so we change the code. In large code bases we can only be certain that the code change doesn't break anything if we have good tests. TDD is the only realistic approach to achieve 100% test coverage. You can certainly write good tests to cover your code at 100% but I've never seen it done by anyone consistently without TDD.
- agentultra 9y ago> Do you use TDD on prototypes? Yes. > Or other projects where the design is highly likely to change or be discarded? I don't often just start writing code without thinking about the design of the system or module I'm working on. Unless I'm writing a one-off shell script or some simple elisp glue code... I write the tests first.