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
-
I'm ok with a big chunk of commented out code.....provided it is a mostly contiguous block.
Messy but I get it.
Mass renaming functions.....not sure I like that at all. -
I worked on figuring out some specific shit in some code. It took like 2 to 3 weeks. Then I find it doesn't work! So I gave up and commented that bitch out. But there is 3 weeks worth of pain in that code. Not willing to let go yet...
-
Well i have seen some very big softwares written in java and other verbose languages, and my seniors would usually ask me to either create a temporary new file or adding my code at the bottom/start but not to remove working code because "something could happen".
I agree that this is a stupid thought in the age of modern ides, which can trace all the usages pretty easily. But they are right in their own way i guess. Some code is super freakishly coupled to be removed.
I have rather learned some jetbrains tricks to ignore such mess (select multiple lines, ctrl+ . ) -
Hazarth95014yJesus, let the old code die. No one is ever going to touch it again. I used do to that when I started out, and I seen my colleagues do it.
After I seen the same commented code in the codebase after 2 years, when the codebase has already moved far far ahead and none of it was useful for at least ... well 2 years tbh I finally understood that there's no point keeping commented code around... maybe for a few days if its still a 50/50 you might use it... but honestly these days I don't event let commented code through Code Review unless the programmer gives me a good reason.
It's always easier and more up-to-date to rewrite and re-test the code when you need it than keeping it around "just in case". It just confuses others and makes the codebase harder to navigate. -
@N00bPancakes I like commenting out functions which use old practice so that they would give me inspiration to solving a problem in the future, I have a really bad hoarding issue...
800 line file.
Could be 300 lines but despite having version control, the devs didn't have the balls to remove any of the code. Just commented it out or appended _old to the function names.
"It's easier to undo than version control"
Sure, but how much time are you spending wading through the waist-high swamp of shitty, useless code?
rant