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
-
I'd like to stay silent but i saw you used an emoji in the tag, and i have to ask this:
WHYYY -
If you feel the need to over-comment, your code is almost always too confusing and needs refactoring.
-
anux7383y@darkwind I recently learnt that some people take the 'let your code speak' too literally. It's crazy but they literally obfuscate the code with comments that just narrate what the code is doing...above every line of the code. In the codebase that I am working with, there's usually 3-4 lines of comments per line of code.
The code is not that great, and yes, uses Hungarian notation (no not Systems Hungarian). -
@JustThat nah, fuck it, all my homies has dementia, forgetting and re-learning the code is the way.
-
Comments not longer than one line, max is two.
If the number of comment lines (eg grep) is more than 10 % of the file, you're over commenting.
Comments might be helpful, but they're technical debt. Only comments that get maintained as the code is changed are good comments. Rest is misleading trash -
anux7383y@IntrusionCM well, you had me in the first half.
But maintaing comments does not deter fanatics. I am working with a guy who loves comments. He focuses excessively on comments and won't pass a review unless comments are fixed. That would be fine if comments were less than 10% of file like you suggested. But the same guy enforces comment addition in code such that code is basically written twice. It is trash and a frustrating nightmare.
Related Rants
To over-comment or not is the real confusion.
random
🥬
comment