In my experience its a lot of effort for not much return. On top of the tests themselves you have to often code things in an awkward way to avoid having to mock everything out, or worse you have to mock everything out, or worse avoid otherwise useful patterns.
And for that you get what? 95% of the time they only catch an issue with the unit test itself and not an actual bug impacting the actual system. And then faced with evidence that the whole endeavour is a giant waste of time someone will sigh and say, if only we were implementing TDD correctly and try to use this failure of TDD as a reason to further indoctrinate impressionable junior devs on the importance of wasting their days on shitty unit tests that dont actually test anything.
Automated functional testing and full end to end testing are useful. TDD is just something dumb that people got scammed by.
Prove who wrong? Which study? If I link to a poor study that has nothing more than a questionnaire about satisfaction with TDD would I have proven that no good study exists?
If I spent the next year looking for better studies, find none and come back to you and just repeat my original claim would that prove my original claim?
Its not just that you dont have the proof you say exists, you dont even fully appreciate what the evidence you are asking for would look like.
TDD works if it's something that you're not adhering to a real deadline. Plus you-or at least one person on the project-already know how to build it completely and how it should work.
It can also show you real quick which of your co-workers is terrible at procedural programming despite the test being open book and take as long as they need.
View all comments
Show parent comment
159
u/developer_soup Oct 20 '26
Me: TDD is the smart way to do things.
Also me: ehh... I'm just prototyping, I'll get around to the tests...