

Are JavaScript comments useless? - zsolt777
http://www.zsoltnagy.eu/are-javascript-comments-useless/

======
nness
Time and time again the argument against commenting is that "good code is
self-documenting," which makes perfect sense for those experienced enough to
document the code in their heads but I don't think holds the same value for
developers who do not have the experience to understand what they're reading.

If you throw junior\graduate programmer into a complicated and mature code-
base it will just stiffle their learning.

I'd rather take some time to leave a comment and explain how a method
operates, particularly the complicated ones, then block a junior dev (even if
it should be obvious after a few minutes of reading for someone else.)

------
jack9
I can say, after 20 years that only twice (iirc) have JavaScript comments
every been useful to me. Comments, in general, have not shown to be too useful
except in very specific problemspaces. The idea that TODO comments "tend to
stay in the code" is GOOD. That's the point of a TODO, rather than putting it
in the commit message where it will definitely be forgotten. Where there is a
passing reference to "cleaning up commits", if your commits are being viewed
by anyone else, TODOs tend to get maintained correctly. I'm really not sure
where this author is coming from on that.

------
CmonDev
They help to compensate the lacking type system.

