I'm a selftaught (web) developer. On sunny days, you can find me hiking through the Teutoburg Forest, on rainy days coding or with a good fiction novel in hand.
I don't think leaving out comments excludes beginners. Quite the opposite. Writing too much waste into your code sets a bad example. And I've seen more redundant comments than useful ones in codebases I worked on (including my own).
My favourite to this day is:
// Initial request to vendor API// ... 3 uninformative lines explaining what's going on// TODO: If fails, figure something out. First request should never failfunctiongetStuffFirstTime(){...}
Does this look beginner friendly to you?
If you do want to comment stuff, please write proper JavaDoc / JSDoc / whatever-Doc. That's what it's there for.
Use @desc, @property/s and @returns.
Give a 2-liner about what your code does if you must
If you must use a comment inline, you will probably be better off refactoring your function or method anyway
And if you want to go bonkers, at least be so kind and do so in your automated test suites. You can even use @see in your production code base. And everybody wins.
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.
I don't think leaving out comments excludes beginners. Quite the opposite. Writing too much waste into your code sets a bad example. And I've seen more redundant comments than useful ones in codebases I worked on (including my own).
My favourite to this day is:
Does this look beginner friendly to you?
If you do want to comment stuff, please write proper JavaDoc / JSDoc / whatever-Doc. That's what it's there for.
@desc
,@property
/s and@returns
.And if you want to go bonkers, at least be so kind and do so in your automated test suites. You can even use
@see
in your production code base. And everybody wins.