41

upvote if your'e doing this

Comments
  • 9
    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.
  • 3
    @AlmondSauce agreed, this is a prime example for self-explanatory code. All the comments and docstrings you see here are just visual noise.
  • 4
    @AlmondSauce I often see a comment that's just the method name. like O REALLY?

    // set completed
    public function setCompleted(completed) {
    this.completed = completed;
    }
  • 2
    I see this which is worse imo

    // set name
    public function setCompleted(completed) {
    this.completed = completed;
    }
  • 5
    @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.
  • 1
    @WorksOnMyBox That professor should not be teaching programming in any capacity.
  • 1
    @Kage Yup, or comments on a setter method saying "set (variable name)"...
  • 1
    I cannot type when someone watches, though
  • 2
    @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 .
  • 1
    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 :(
Add Comment