I have complicated feelings about TDD
The trouble with TDD is that quite often we don&#x27;t really know how our programs are going to work when we start writing them, and often make design choices iteratively as we start to realize how our software should behave.<p>This ultimately means, what most programmers intuitively know, that it&#x27;s impossible to write adequate test coverage up front (since we don&#x27;t even really know how we want the program to behave) or worse, test coverage gets in the way of the iterative design process. In theory TDD should work as part of that iterative design, but in practice it means a growing collection of broken tests and tests for parts of the program that end up being completely irrelevant.<p>The obvious exception to this, where I still use TDD, is when implementing a well defined spec. Anytime you need to build a library to match an existing protocol, well documented api, or even an non-trivial mathematical function, TDD is a tremendous boon. But this is only because the program behavior is well defined.<p>The times where I&#x27;ve used TDD and it makes sense it&#x27;s be a tremendous productivity increase. If you&#x27;re implementing some standard you can basically write the tests to confirm you understand how the protocol&#x2F;api&#x2F;function works.<p>Unfortunately most software is just not well defined up front.