this post was submitted on 05 Jun 2025
216 points (98.2% liked)

Programmer Humor

23844 readers
2965 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 6 points 1 day ago (14 children)

Except those imports were used by a huge section of code you temporarily commented out, and now you'll need to manually select a dozen imports to get it working again when you come back to it.

(Sure you could have just commented out the unused imports, but the linter auto-sorted them and you're feeling too lazy to copy-paste a dozen scattered lines)

[–] [email protected] 13 points 1 day ago (1 children)

Use a good IDE, and readding the imports is pretty easy.

I find commented code to be a bit of a smell on its own, just delete it, and if you really need it again, dig it out of source control.

[–] [email protected] 10 points 1 day ago

Yeah. My last job, a PR with commented out code typically wouldn't get approved. Either leave it in version history, or stick it on a branch

load more comments (12 replies)