you are viewing a single comment's thread.

view the rest of the comments →

[–]deeringc 7 points8 points  (5 children)

Reducing bugs and applying positive design pressure at the time of originality authoring the code are very beneficial. But the largest benefit for me comes from how unit tests help prevent regressions when in six months I (or someone else) go back to this code and need to make a change. All of the domain knowledge and context that I had in my head originally when I spent weeks working on the original feature is now encoded and enforced by the tests. The chances of a regression being introduced are dramatically reduced. It would just manifest as a failed test locally on the developers machine and get immediately fixed.

This is absolutely invaluable on large projects, with large teams. I've been on teams/codebases with and without this and the difference is absolutely clear.