Re:Reducing technical debt by valuing comments as much as code
by hbrn on Wednesday February 01, 2023 @11:47AM
(#34613244)
I don't see a difference.
If you write good tests and use a tool (CI) that detects them going stale, tests will never be stale.
If you write good comments and use a tool (code review) that detects them going stale, comments will never be stale.
In order for tests to not get stale, you need perfect (well written) tests.
In order for comments to not get stale, you need perfect code reviews.
Neither of those exist in real world: code reviews are done by humans, tests are written by humans.
(I'm not arguing against writing comments though - the 'they'll get stale' thing is not enough to make them not valuable)