Roman Suzi
1 min readMay 31, 2019

--

Looking at the title I hoped for a more convincing TDD example than going from hardcoded constants through “discovering” a better functions instead of starting with generic function. Writing all those const greaterThan10000 is a waste of time, seeing it in the final code is disheartening. Generic function, receiving a generic specification (configuration) in this case is way faster to develop and test, TDD or otherwise. The article sounds like the best virtue of TDD that developer does not need to think — a series of small steps will lead to a good enough solution. And this is not true. Without upfront design, the amount of refactoring work will dramatically increase. Plus viscosity of the above code is not adequate: What if Jack decides on a different thresholds tomorrow? How many places will need to be touched then? Etc. Sorry, I missed the point…

--

--

Responses (1)