3 ms·
This, exactly. When DHH lambasted TDD at Rails Conf earlier this year I felt vindicated. TDD enthusiasts market the practice like TDD is a one stop shop for be
by kendallpark 12y ago
This, exactly.
When DHH lambasted TDD at Rails Conf earlier this year I felt vindicated. TDD enthusiasts market the practice like TDD is a one stop shop for better code. Fad diet style. IT WORKED FOR ME, IT'LL WORK FOR YOU. THIS ONE WEIRD TRICK WILL GET YOU PROGRAMMING BETTER.
I think TDD works great for certain personality types. Definitely not mine. (I'm like you, as far as I can tell.) I find that writing tests first inherently makes assumptions about the shape of the code that I'm going to write. I so often zoom out and say "no, no, no, I'm going at this all wrong" and completely change the way I'm structuring my code. If I've written test-first, then that's two places (my code and the tests) that I need to completely redo the structure. And 2x the programming time for refactoring.
I will advocate TDD for debugging. Test-first is wonderful for isolating software bugs and resolving them.