Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
asgs112795y// comments start here
// make xhr
// process the output or error
// comments finish here -
No matter what you do, at the top of the file, place a "client forced me to write as many comments as I did", so instead of you being hated, the client is hated by whoever gets that piece of code next.
-
reginsmol745yyou should always be commenting your code, no matter how simple. at the very least explain why the code exists and what it does. even 1 sentence will suffice.
-
@reginsmol
If you can't explain what a function does in an xml comment or and jsdoc comment, your algorithm is in need of refactoring. //Comment //every //line spoon feeding is low value. -
reginsmol745y@SortOfTested i didn't say comment every line. I said comment your code no matter how simple. Even if its a single liner at the top of the file quickly explaining why the code exists and what it does.
-
@reginsmol
Ah, I see where the confusion is coming from.
There's a read between the lines implied message that we all got from OP, he's definitely not an idiot. This site is effectively dailyWtf with conversation. It's a support group for devs dealing with a higher than average level of abuse/stupidity. If someone is posting something here (with a few notable exceptions), it's because they're venting about having experienced the most ridiculous, oft unnecessary extent of whatever it is they're talking about.
Given that, the contextually obvious subtext is OP is being asked to apply spoon feeding comments on something barely greater than hello world. We're all on the same page in regards to appropriate documentation, his kvetch is in regards to needless excess. We've all had the shitty pedantic PRs and can sympathize. We then in turn make light of the problem to help OP vent.
This is the way 😋
Related Rants
One of my clients requested me to add
// comments
in one small project created using ReactJS.
a very small project that just calls a server to send and receive data.
I'm not sure, what I'm gonna comment in the HTML/JSX section :/
rant
react
client