49
irene
108d

Colleague submitted a change to the stream. Just some simple function.

In that function he commented EVERY FUCKING LINE! Including obvious initial assignments.

In one place there's even a three line comment for one "if" with only logging function call where logged message fully describes what the fuck is happening. But no, we need another useless comment for that obvious step.

I can't even... 🤦

Comments
  • 14
    Someone told him of for a lack of comments yesterday and this is his malicious compliance?

    Tbh it's still better than no comments
  • 10
    @epse nope. He's from a foreign team which is higher up in hierarchy than mine. I dunno who reviews and accepts his code, but I can't understand why that even passes reviews.

    Also, he made an obvious NULL reference error just before checking the incoming parameter for NULL-ness. WHICH PASSED REVIEW! 😐
  • 4
    @irene how????
  • 6
    Also there's an

    if(isfalse(var1)){}

    if(istrue(var1)){}

    section without any changes of the var1 (it's a const input parameter) before second one. Instead of "else". 😐 And underneath both of those there is an exact same check which could be checked on the upper level (because it's a check for "should we do anything at all?").
  • 3
    @epse that riddles me as well... 😕
  • 5
    @irene wait a function isfalse and istrue???
  • 5
    @epse macro-functions.

    #define ISFALSE(x) (x == 0)

    Same for ISTRUE.

    Don't ask why. We have to use it. 😐
  • 4
    @irene oh for the love of God!!
  • 7
    There should be a warning in a header comment or in the README: "abandon all sanity and logical reasoning before reading on"
  • 3
    @korrat as if there is a Readme 🙃
  • 2
    // about to write a comment
    // the text typed below will be rendered on dev rant
    // it gets added as a comment to the rest of the
    // comments

    oh no, sorry to hear, sounds excessive @irene :/ :( :(
  • 2
    @irene my bad. My dreams haven't been destroyed yet.
  • 4
    Waiting to find a dev rant post from someone reading:

    "I decided to prank ... so I commented every single..."

    Imagine of that "dev" is here too
  • 3
    Id rather have too much comments than none. 5k lines of cobol code and no comments.. not so fun:(
  • 4
    @Loeina I'd rather have too few. Comments inevitably get copied and pasted elsewhere without being checked, and end up out of date as a result.

    Problem with excessive comments everywhere is that if they're wrong (and eventually some of them will be) there's no automatic means of checking, and someone will one day rely on their incorrect content.

    Generally speaking, if you code needs lots of inline comments for it to make sense, it's crappy code that should have been written differently.
Your Job Suck?
Get a Better Job
Add Comment