← Back to context

Comment by alphanumeric0

9 hours ago

The code, tests and comments convey what actual business rules are implemented.

While documentation is someone's non-precise natural language expression of what (to the best of their imperfect human capacity) expected the code to implement at the time of writing.

Yes, it is absolutely more valuable to know what the code "should" be doing than to know what the code is doing

Otherwise there is no way to know what is expected behavior or just a mistake built into it by accident

  • Especially on teams where deviance has been normalized, and broken things are just expected. I've been bitten both ways before: is this an obvious mistake? Or the lynchpin holding up the house of cards? Of course, if someone had just written some text explaining it, or perhaps a decent commit message instead of just "WIP", maybe we wouldn't have to do archaeology every single time.

"Oh yeah, those tests are always flaky. We just rerun them until they pass. Or we turn them off. I mean, Jeff wrote them like three years ago and he quit last year, so..."

I'd rather have the prose. And if it's wrong, then fix it. I'm so tired of these excuses.