3 ms·
"I've noticed that TDD forces me to think about the code in a better way, before actually coding it, than just going ahead and coding it" IMO, that is the crux
by Someone 11y ago
"I've noticed that TDD forces me to think about the code in a better way, before actually coding it, than just going ahead and coding it"
IMO, that is the crux of the matter: Thinking-Driven-Design is the way to go. The idea that you _need_tests_ to do the up-front thinking is, again IMO, bogus, and writing tests without thinking doesn't help much, as you seem to agree on with your remark on missing test cases.
Some people use paper or a whiteboard as things that make them think. Others go on a walk. Yet others, sometimes, can just do it sitting behind their monitor while doing slightly mindless things such as deleting no longer important mail, or setting up a new project.
Also: good tooling makes many kinds of refactorings extremely low-risk. Strongly-typed languages with that are designed with refactoring in mind help tons there.