3 ms·
> will love you for documenting the WHY just as much as s/he'll hate you for having to rely on documentation that explains the WHAT. I've saved myself so many
by mywittyname 11y ago
> will love you for documenting the WHY just as much as s/he'll hate you for having to rely on documentation that explains the WHAT.
I've saved myself so many times with this. External services are bad about having odd-ball edge-case errors that require a little funny business on your end in order to keep operational. So there are often little code snippets that look like their bugs, but are actually necessary to prevent regressions. Without a comment as to why the code is there, some boy scout is going to "fix" it (and the now failing unit test) and introduce a regression.
- joshka 11y agoAnyone that breaks code and then doesn't investigate why a unit test exists is not a boy scout, but a vandal.