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
-
Dahhh, you've stumbled across one of my "junior programmer pet hates". Why is it that when (many, not all) programmers start out they think it's good practice to comment nearly every line with some superfluous comment that adds nothing?! Arrgh!!
Sorry. I realise that's not what this rant is about.
In any case, my "programming while someone watches", or heck just "typing while someone watches" is an incoherent mess. Always.
Can't be dealing with the pressure of someone looking over my shoulder, whether I'm coding or just writing a support ticket. -
VaderNT16346y@AlmondSauce agreed, this is a prime example for self-explanatory code. All the comments and docstrings you see here are just visual noise.
-
Kage9256y@AlmondSauce I often see a comment that's just the method name. like O REALLY?
// set completed
public function setCompleted(completed) {
this.completed = completed;
} -
spacem18446yI see this which is worse imo
// set name
public function setCompleted(completed) {
this.completed = completed;
} -
@AlmondSauce because I had a professor in college that literally insisted on it. I had an if condition once that she commented and took off a point for "what if it's false?"
I added
else {
// do nothing
}
She gave me the points back. -
@WorksOnMyBox That professor should not be teaching programming in any capacity.
-
Learny96y@AlmondSauce in college the professors smash it into your head that you must comments as many lines as possible. You lost point if you don't. L. O. Fking L .
-
Seriously.... Stop this garbage nonsense.
You are increasing the effort needed to maintain the shit per comment line.
Just e.g. realize that it's stupid to add only two ints If you can add many ints via a variadic funtion...
It adds now multiple ints.
addInts still describes perfectly what it does.
Garbage comments not.
I really get angry ...
If u ever needed to untangle maintained comment vs unmaintained comment in a global refactoring, you know what I mean.
All the unmaintained comments lead you down a rabbit hole :(
Related Rants
upvote if your'e doing this
joke/meme
fun