this post was submitted on 14 Mar 2025
670 points (98.8% liked)

Programmer Humor

21486 readers
1550 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
[–] vaionko@sopuli.xyz 3 points 1 day ago* (last edited 1 day ago) (2 children)

You don't comment what something does, ir can clearly be seen from the code itself. You comment why you do it.

[–] Gumbyyy@lemmy.world 3 points 15 hours ago (1 children)

"Clearly" is also subjective. What might be perfectly clear to me reading my own code may be really confusing to someone else, and vice versa. Especially if the person reading the code isn't as familiar with the language as the person who wrote it, or if the code is using some syntactic sugar that isn't super common, or plenty of other reasons.

[–] vaionko@sopuli.xyz 2 points 15 hours ago

True. It's more like there's no need to comment an if statement with "checks if a is larger than b"

[–] rockerface@lemm.ee 3 points 1 day ago

Yes, that would be the context I'm talking about