3 ms·
I totally agree with your refactoring. The code you wrote is simpler, less surprising, reusable, easily testable, and so on. Unfortunately I think that the art
by dorianh_ 6y ago
I totally agree with your refactoring. The code you wrote is simpler, less surprising, reusable, easily testable, and so on.
Unfortunately I think that the article only shows that the OP made poor design choices, (which he probably wouldn't have if he had used TDD, ironically).
Even if the article is well written, the code shown in the three first blocks kind of invalidate the whole argumentation :/