57

Dude, for the hundredth time, stop leaving random chunks of commented out code all over the place in case we "need to find it easily later"...

This is literally the reason we use git.

No, I will not pass it in a code review. The same as last time. And the time before...

Dahhhhh

Comments
  • 7
    That's insane. If you want to save a string of text, put it in your keepass, people.
  • 4
    Ouch... looks around uncomfortably...
  • 7
    C0D4 enters the room.

    πŸ˜‚this is funny and sad all at the same time,

    I'm still deleting commented out blocks from a previous dev, entire if/else blocks but then under it is the replacement logic 🀷‍♂️

    There was 1 class that had over 2k lines of commented out code, my pull request was misleading and felt like a massive refactor has occurred.
  • 12
    At work we call this a "meeseeks"

    You'll routinely hear people call "hey [name], meeseeks in [pr]." The picture of mr meeseeks in code reviews is the #1 reason for declination.

    Apparently anthropomorphizing your shit makes them less offensive :)
  • 4
    @SortOfTested meeseeks as in Mr. Meeseeks from Rick and Morty?
  • 4
    @SortOfTested πŸ˜‚πŸ˜‚oh I'm stealing that one.
  • 8
    @Pyjong
    Yep. That comment/unused reference/etc just wants to die πŸ˜€
  • 0
  • 0
    I had this happen to commented out I left in, too.

    Why did I leave in that code?

    Well, some months later, a different dev got to work on the same code, and he came up with a brilliant simplification.

    He spent a week with this, but in the end, it turned out it didn't work this way due to some arcane, unforseeable specifics.

    The implementation he spent this week on and that had to be rolled back in the end?

    Yeah, looked eerily similar to the code I had left in there, commented out... you know, so other devs could see that this was tried before, but didn't work.

    I understand the reasoning behind not wanting commented code in there, but you purists are like those folks washing their hands five times in an hour because of bacteria and stuff.

    Nobody in their right mind will go through the git history to find stuff like that...
  • 6
    @mksana git history on a file and you'll find your previous attempts 🀷‍♂️
  • 1
    @C0D4 Stealth edit on my part. Nobody will do such a thing.
  • 2
    @mksana πŸ˜‚good thing I'm nobody and have trust issues.
  • 3
    @mksana Isn't your story proof that *didn't* work, as the dev ignored your commented out code and tried the same thing anyway? In any case, commented out code doesn't mean "I tried this before and it didn't work, so don't try again". If that's what you mean, and that info has to be in the code, then just leave a genuine comment somewhere - not a commented out block of code.
  • 0
    @mksana The situation you describe proves you wrong. You never leave commented out code in a Git repo. It just creates garbage that any sane dev will skip while reading, and more need to scroll.
  • 1
    @AlmondSauce:

    No, the commented out code was purged by someone and the story was what followed.

    The code included a comment hinting at the fact that doing it this way won't work as well, but that was purged, too.

    And, as I wrote, I generally understand the reasoning and support the idea, but being overzealous is never a good thing, imo.

    In that spirit, let's not be overzealous and agree to disagree on this one. πŸ˜‰
  • 2
    What about leaving manifestos in the comments?
  • 0
    @Demolishun
    I mean, I have been known to leave my dissertations regarding permanent revolution as the solution to the abuses of the proletariat by the timocratic autocra which maintain their stranglehold on power purely by merit of their anarchocapitalist privilege which renders pure form democracy the truest form of suffering and permanent slavery binding the average man's perception of value to that which his wealth can acquire. But I mean, that's just me, and maybe Plato.
  • 1
    @SortOfTested Yeah, mine was a bit less sophisticated: "free beer, women, and guns".
  • 1
    @Demolishun
    I concur, though I think we may have a different definition of free women ;)
Add Comment