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
-
That sounds like a fantasy character name, like Olaf the butcher or Helen the wise
Datas the bind, son of Stack the overflow -
@ocab19 that's what most of the other comments are like (it's so annoying) - but this one stood out as being particularly ridiculous
-
kamen69178y@ocab19 That's what you get for complaining that the code is not commented. For me, the sweet spot is only commenting what is not obvious right away.
-
@kamen I actually complained that he didn't comment his code, because he usually named variables like:
int n;
char c;
void func()
And the sort. -
Sounds more like somebody was annoyed having to document something like that and wrote this trollcomment
-
@ocab19 He sound like a troll, but single character variables makes you a monster in my book.
-
Looks like the sort of comment MonoDevelop places automatically for you, most of the time it's quite good (basic but good) but then you do get the odd one like this...
-
monnef3138y@kamen Yeah, I agree. Try to make code as self-documenting as possible and when something is not obvious only then add a comment. Our client insists on documenting almost everything so e.g. for a class UsersDataAccessor I have to write a useless comment like "Users data accessor" or if I feel chatty "A class used for accessing users data". It only takes up space, clutters code with useless information. What a waste of time...
-
@monnef maybe you could throw in some info on where the user info is retrieved from? Or if you feel particularly helpful perhaps what other parts of the code you'd see should invoke the method? I mean something other than merely making a sentence of the three words that made up the method name...
-
@monnef come to think of it, why not explain a bit what kind of data is retrieved? I mean the comments are there for the poor guy that didn't write your code, and that needs to figure out in 5 minutes where some weird bug happens, possibly not related to your method. Don't make him have to read a Wikipedia article on how accessor method patterns work just to understand whether or not this function plays a part in that bug.
-
monnef3138y@siljamicke It is not really expected than anyone else will ever touch this code except me. Also it is very obvious what the class does, it's only a few lines of trivial code (just creating components with only argument "this"). Requiring comments for every class, method and function is just a massive waste of everybody's time, it only leads to ignoring comments because they are in 99% cases useless 😞.
-
@monnef well if you put it like that I fully agree 😁
But in the noise of everything else, the faster you can determine if I need to understand a piece of code, or can safely gloss over it, the better I think. Maybe the perfect comment for your method should be "Move along, nothing to see here." 😉
Related Rants
This is the kind of code comment I have to contend with
undefined
commenting