this post was submitted on 14 Mar 2025
588 points (99.3% liked)

Programmer Humor

21487 readers
1667 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 13 hours ago* (last edited 13 hours 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 2 points 5 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 1 points 5 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 2 points 13 hours ago

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