
Against TDD - roman-holovin
http://neopragma.com/index.php/2019/09/29/against-tdd/
======
JMTQp8lwXL
For as much as I've heard about TDD over the years: in my education, articles,
and mentions of it in industry -- I have yet to see anybody I know use it.

You can't design your entire interface up front. Too much handwaving. You'll
start coding, and realize you aren't testing the right things, until after you
write the code, which defeats the purpose of writing the tests first.

The article says many people don't use TDD correctly, or they try to use it in
the wrong situations. If it was more broadly applicable, I think it's safe to
say I would've encountered a situation where it was useful. If it's the case
where there's a limited set of situations where it is applicable, the topic
doesn't deserve as much mindshare as it receives.

~~~
kstenerud
I've used it for almost 2 decades now. The general rule is:

Don't write tests until you're sure about your design and interface. If you're
doing exploratory coding, you write tests later. If you're adding features to
something that already exists, you're more likely to write tests first.

The end target is roughly the same: 80-90% test coverage. But you'll waste a
lot less time throwing test code away.

