I fully bought into the whole TDD kool-aid back in the early 2000s. I read Kent Beck's book cover to cover and worked through all the exercises. I was a hard-core TDD evangelist. Now I realise it was all a mistake... https://twitter.com/davefarley77/status/1263518668643725312
... Why? It's a form of laborious empiricism, and in the same way that no scientist really practices classical empiricism, no programmer who actually wants to get anything done practices TDD.
https://en.wikipedia.org/wiki/Karl_Popper#Philosophy_of_science
...
When faced with a programming task, 99% of the time one has a pretty good mental model about how to implement it. To go through the iterative process of TDD would just be a complete waste of time....
To do TDD properly, you'd have to give up on one of your greatest strengths as a human being, your creativity. What's the point in turning yourself into a very inefficient evolutionary algorithm when you've got this glorious problem solving machine between your ears?
And now, quite predictably, I'm getting a load of replies that think I'm against unit testing. I'm not. I'm addressing the practice of Test Driven _Design_, where you write the tests first and then write the simplest possible thing that will make them pass....
It's a process of design by discovery. My point is that in real life, you will most probably design the solution in your head before you start, so the laborious TDD iterative approach is entirely unnecessary. That's why nobody with any sense does it.
The Wikipedia page is pretty good on this. Just look at the 5 step process. This especially is insane:

"The programmer must not write code that is beyond the functionality that the test checks."

_Nobody_ does that.
You can follow @mikehadlow.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: