TDD did not live up to expectations
<i>The tests get in the way. Because my design does not have low coupling, I end up with tests that also do not have low coupling.</i><p>Not to be smug, but I feel like this is a rookie mistake I learned 10 years ago immediately after starting TDD.<p>The slogan I use in my head is that <i>testing calcifies interfaces</i>.  Once you have a test against an interface, it&#x27;s hard to change it.  If you find yourself changing tests and code AT THE SAME TIME, e.g. while refactoring, then your tests become less useful, and are just slowing you down.<p>Instead, you want to test against stable interfaces -- ones you did NOT create.  That could be HTTP&#x2F;WSGI&#x2F;Rack for web services, or stdin&#x2F;stdout&#x2F;argv for command line tools.<p>Unit test frameworks and in particular mocking frameworks can lead you into this trap.  I&#x27;ve never used a mocking library -- they are the worst.<p>There are pretty straightforward solutions to this problem.  If I want to be fancy then I will say I write &quot;bespoke test frameworks&quot;, but all this means is: write some simple Python or shell scripts to test your code from a coarse-grained level.  Your tests can often be in a different langauge than your code.<p>The last two posts on my blog are about this:<p>&quot;How I Use Tests&quot;: <a href="http:&#x2F;&#x2F;www.oilshell.org&#x2F;blog&#x2F;2017&#x2F;06&#x2F;22.html" rel="nofollow">http:&#x2F;&#x2F;www.oilshell.org&#x2F;blog&#x2F;2017&#x2F;06&#x2F;22.html</a><p>&quot;How I Plan to Use Tests: Transforming OSH&quot;: <a href="http:&#x2F;&#x2F;www.oilshell.org&#x2F;blog&#x2F;2017&#x2F;06&#x2F;24.html" rel="nofollow">http:&#x2F;&#x2F;www.oilshell.org&#x2F;blog&#x2F;2017&#x2F;06&#x2F;24.html</a> -- I want to change the LANGUAGE my code is written in, but preserve the tests, and use them as a guide.<p>And definitely these kinds of tests work better for data manipulation rather than heavily stateful code.  But the point is that testing teaches you good design, and good design is to separate your data manipulation from your program state as much as possible.  State is hard, and logic is easy (if you have isolated it and tested it.)<p>Summary: I use TDD, it absolutely works.  But I use more coarse-grained tests against STABLE INTERFACES I didn&#x27;t create.