I don’t “hate” unit tests, I don’t think they’re anywhere near as valuable as people seem to think but what I do hate is all the fanaticism around them; that they replace software documentation, that developers bear sole responsibility for testing their own work (this is nuts), they they’re more important than the code itself.

TDD is just dumb, writing the tests before the code is inefficient and backwards but at worst it’s a lot of wasted time. And unit tests take up an awful lot of time and for me count as distractions and interruptions.

I captured my thoughts on this here:

The other part of it is that unit tests are made to guard against a kind of mistake that I personally very rarely make, breaking unrelated code with changes. It’s been years since I did that.

And, honestly, I think what’s happened is that developers are so often interrupted by meetings and team horsehit that they can’t concentrate, so they write lousy code with lots of bugs, and instead of demanding better working conditions they compensate by writing more tests.

Kind of like sleeping on gravel because it’s the In Thing and learning all about ointments and analgesics instead of getting rid of the gravel.

American Software Developer living in Vietnam. Classical musician (guitar, woodwinds), weightlifter, multilingual, misanthrope • XY

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store