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
-
C0D4681465yC0D4 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. -
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 :) -
mksana2485yI 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... -
@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.
-
@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.
-
mksana2485y@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. π -
@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. -
@SortOfTested Yeah, mine was a bit less sophisticated: "free beer, women, and guns".
-
@Demolishun
I concur, though I think we may have a different definition of free women ;)
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
rant