this post was submitted on 18 Dec 2025
866 points (98.4% liked)

Programmer Humor

27914 readers
1006 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
[–] MotoAsh@piefed.social 11 points 1 day ago* (last edited 1 day ago) (1 children)

I did not say comments should directly explain what the code is obviously attempting to do.

[–] ChickenLadyLovesLife@lemmy.world 12 points 20 hours ago* (last edited 20 hours ago) (1 children)

My favorite thing about the "all comments are bad" crowd is that their first example is almost always something like this:

// Add 1 to x
x = x + 1

Like, nobody that thinks comments are good and important would ever add a useless comment like that. The point of commenting is to add documentation (usually the only form of documentation that a future developer is ever going to read) only to code that would otherwise be inscrutable.

[–] Hudell@lemmy.dbzer0.com 2 points 16 hours ago* (last edited 16 hours ago) (1 children)

You'd think that, and yet I've once worked in a project in a fortune 500 company that basically wouldn't even compile if we didn't add comments like that. No kidding the compiler enforced specific comment patterns so if you had a line do x = x + 1, it would not compile if it was not preceded by a comment that started with "Add" and included "1" and "to x". Even in dev mode if you wanted to just try something you had to comment everything.

The original dev was super proud of this tools that generated HTML documentation about everything based on those comments. And the whole documentation was stuff like:

*price*: The price
[–] MotoAsh@piefed.social 3 points 14 hours ago

Every good idea can be taken to a ridiculous extreme.

and that... is ridiculous.