4 ms·
I very much agree with this. I for myself think writing tests first or rather during development for well testable units as sweeping a number of small pebbles o
by tetha 17y ago
I very much agree with this. I for myself think writing tests first or rather during development for well testable units as sweeping a number of small pebbles out of my way, so tripping due to trivial typos is less likely. Certainly, there might still be big rocks to encounter and I might still fall due to a large crack in the ground, but I certainly won't fall over due to small slippery pebbles.
In other words, I think TDD can be an amazing help at _implementing_ a solution after it was designed and planned and I think the ability to change code while the tests lower the probability of existing assumptions breaking unnoticed allows one to improve the existing design of a solution easily and significantly, while I also agree that designing and solving with tests only is awkward.
In case you want better examples where test driven development will fall flat on its face, take a look at the problem sets on http://uva.onlinejudge.org/ http://uva.onlinejudge.org/ . You have 1-6 testcases in each problem, so there are enough test cases? :)