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
-
totoxto2486ySimple rule. If you feel like you just performed just performed some genius act inspired by transcending into all knowing programmer and twisting the constraints of the programming language or you feel really sorry for the lines of code you just wrote you should probably leave a comment explaining what you've done or why you did it.
-
totoxto2486yThis is also why they encourage you to write so many comments in uni, because when you look back at the work you did in uni you will almost always feel sorry for writing it.
-
I hate such bitches! Yeah, the code speaks for itself. But it does not tell anyone why the author did exactly _that_ right _there_!
And that's what good comments do.
Plus comments can describe situations, states, and the current work flow.
Damn, these idiots should go back to their academimimi and let us do our job! -
kweakzs11686yIMHO a lot of programmers misunderstand what the comments should be. Comments that describe WHAT Is happening on every line are nearly useless and just add extra clutter. However comments that describe WHY is something done accelerate understanding of code.
Related Rants
Code reviewer keeps removing my comments saying, "This will only be read by other programmers, the code should speak for itself".
<hyperbole>
This is the exact opposite to back in uni where for every line of code they demanded 2 lines of comments!
</hyperbole>
rant
comments