I'm a JS Subject Matter Expert (SME) that has spent the past few years spearheading curricula and teaching initiatives at colleges and bootcamps, in person and virtually.
It's a balance. If creating code for demos/illustrative purposes, definitely need more comments. Otherwise, think 2x before putting long comments. Usually, I will add a comment if I found that I screwed up more than a couple of times b/c I forgot the same thing. That's a good spot to put a warning comment or something like that.
Also, add comments when there is a better approach, like a refactor, but we are not doing now b/c of time shortage, for instance. Like a: // TODO. You can even do comments that kind of assign for someone else like: // TODO{john.smith} They can search for their name, etc. Probably can connect to some type of workflow that will automatically generate assigned issues using the comment in GitHub.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
It's a balance. If creating code for demos/illustrative purposes, definitely need more comments. Otherwise, think 2x before putting long comments. Usually, I will add a comment if I found that I screwed up more than a couple of times b/c I forgot the same thing. That's a good spot to put a warning comment or something like that.
Also, add comments when there is a better approach, like a refactor, but we are not doing now b/c of time shortage, for instance. Like a:
// TODO
. You can even do comments that kind of assign for someone else like:// TODO{john.smith}
They can search for their name, etc. Probably can connect to some type of workflow that will automatically generate assigned issues using the comment in GitHub.