> Comments - like documentation - are a liability.
Tests, too. But you wouldn't advocate not having tests, right? > Comments - like documentation - are a liability.
Tests, too. But you wouldn't advocate not having tests, right?A well-maintained suite of automated tests provide an enormous benefit. A brittle set of Selenium scripts costs a project more than paying a Tester to manually run scenarios.
A bunch of tests that check trivial cases is not helpful at all, a well-maintained suite of tests is very useful.
What I mean is that a bunch of documentation that only states the obvious is not helpful at all. A set of well-maintained (!) code comments can make navigating unfamiliar code much, much easier.
Yet comments can (and do) go way out of date.
Tl;dr not equivalent.