I think comments are very important, but you need to be disciplined and keep an eye on them in code reviews. Also, in the same way you can write code such that it will tend to remain correct, you can also write comments in such a way that they tend to remain true.
-
-
-
Actually, as I wrote that I was wondering whether "vagueness" is actually a desirable quality in comments. Precision can be fragile...
- Show replies
New conversation -
-
-
Comments certainly have issues but despite them I would maintain their huge worth to introduce code to others (teammates, Beginners, aspiring contributors) more than makes up for it.
-
I think it depends on the comments, but I always feel like they must be adding something above and beyond what the code alone offers. Maybe I'm overstating the negative impact of comments which are untrue, but I've wasted hours in the past when I should have read the code.
End of conversation
New conversation -
-
-
Code light in comments is rarely code that others want to maintain.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
This Tweet is unavailable.
-
Good comments should be maintained. But that's not an example of good comments.
End of conversation
-
-
-
I guess this is why the Scala source has no usable comments.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
But those same statements apply to *all* documentation, even user documentation. In fact, you could apply them to *all* communication about code. Maybe we should just stop talking, it case something we say ends up being false. No, that's not a reason not to write comments.
-
All documentation should be written for a purpose, this applies to use docs and comments, because it costs to maintain it. But applying a sparingly approach to it is not the right approach. There should be enough documentation to achieve the needed communication purpose.
- Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.