Hacker News new | ask | show | jobs
by moss 5930 days ago
I think I'm blithely misreading the article here, but I'm inclined to take it as advice about how to do TDD, rather than an argument against it. Specifically: if a class has lots of tests, this is a sign that the class is too complicated. Refactor until it is simple enough not to require as many tests (possibly by narrowing its interface, possibly by breaking it up into multiple classes, possibly by rethinking how it's implemented).
1 comments

From what I know, Andrey (the poster) is pretty neutral on TD, maybe even a proponent. He's saying you should have an interface in mind when you start to write unit tests. Sometimes you can do that before writing code. Other times, exploring with a REPL first is better.