← Back to context

Comment by bullshitman

6 years ago

Bullshit. I have found many bugs writing unit tests to a legacy code (afterwards). I have cleaned up incredibly messy spaghetti code by writing unit tests (which forced me to clean it up). I have made the code understandable by writing unit tests (both by means of "test as a documentation" and by means of "clean the code so that it is testable, make it modular and made of small units").

And btw, "easy to unit test" actually leads to "simple". That's the point of TDD.