by tellarin · 13y ago · 0 comments
Be it because requirements keep changing, new features are added, many people working on the same code, refactoring, whatever... Having good unit and functional tests catch a huge amount of problems that would be hard to find latter.
The other two points are pretty minor in my view.
And the suggestion to improve code coverage is just cheating. There's no excuse for that. Either don't track stupid metrics, don't add unnecessary catches, or properly test exception code.
EDIT: Clarified text.
For example, this week I've been working on refactoring some code that had some performance problems. Digging into the code I found a lot of confusing logic and had to waste a lot of time stepping through the code trying to understand what it was doing.
If there were unit tests, I could have treated it as a replaceable black box.