80

This is the kind of code comment I have to contend with

Comments
  • 43
    That sounds like a fantasy character name, like Olaf the butcher or Helen the wise

    Datas the bind, son of Stack the overflow
  • 5
    As far as irrelevant comments go, this is one of the better ones.
  • 3
    Best comment is //TODO coding
  • 12
    "Binds the data" wouldn't be a great comment either. I used to work with a guy that wrote comments like:

    string username; //The name of the user
    int age; //The age of the user

    And I was all like
  • 2
    @ocab19 that's what most of the other comments are like (it's so annoying) - but this one stood out as being particularly ridiculous
  • 2
    @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.
  • 2
    @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.
  • 2
    Sounds more like somebody was annoyed having to document something like that and wrote this trollcomment
  • 1
    @ocab19 He sound like a troll, but single character variables makes you a monster in my book.
  • 0
    Swift?
  • 0
    @RazorSh4rk hahahahah wtf 😂😂😂
  • 3
    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...
  • 0
    @DeveloperACE C#
  • 0
    @alycejenni oh. I recognized the documentation comment style
  • 0
    @DeveloperACE making a mental note never to venture into swift then ;P
  • 0
  • 0
    I find people who write terrible code write even worse comments
  • 6
    @Rabb hey thats not true

    I dont write comments and write terrible code
  • 4
    @ocab19 hey look what I just found
  • 0
    @RazorSh4rk you sir are awesome. ++
  • 1
    @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...
  • 0
    @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...
  • 0
    @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.
  • 0
    @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 😞.
  • 2
    @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." 😉
Add Comment