|
|
|
|
|
by ff_
973 days ago
|
|
I am all for improving the conditions so that signs can be removed (and this is valid with code too, e.g. a strong type system removes the need for a lot of documentation), but again we should not advocate for not documenting things, that's just asking for trouble. And speaking of signs, we definitely don't have a good balance there either - in some places I experienced confusing situations where adding a few more signs could have helped. |
|
https://bigthink.com/the-present/want-less-car-accidents-get...
The same can of course apply to code: there's many instances where someone will assume they understand a tricky bit of code because they read a well written comment. That's a bad sign, as the code probably had a lot more nuance that was not covered by the commenter. And then did they properly understand what the comment is saying ? we now have a two level readability problem.
In general, I sympathize with the approach that making it easier for people to understand shouldn't happen in comments. It's frustrating for the people reading the code, but we're paid professionals, and frustration is better to me than lack of understanding or glossing over the actual behavior (I'd trade fewer bugs for hurt feelings any day)
Comments should bring additional info that complements the code in a meta way (link to bug reports, design documents, discussion threads etc.)