1505
you are viewing a single comment's thread
view the rest of the comments
[-] Maalus@lemmy.world 6 points 1 week ago

How bad programmers comment their code. Good programmers don't comment at all and let the code speak for itself, leaving commenting to some obscure and arcane implementation the coder left in after a week long binge on caffeine and gummy bears.

[-] BombOmOm@lemmy.world 11 points 1 week ago* (last edited 1 week ago)

Code should absolutely speak for itself. But the occasional comment is still good to explain the 'why' of the code when the why isn't very obvious, often due to a niche requirement. Also any time you have to break out a hack, that needs comments up the ass, what was the bug, what URL did you find the fix at, why does this hack work, etc etc. It's very satisfying to go back and remove those hacks after they are no longer needed, often because the underlying technology fixed the bug that had to be hacked around.

[-] Maalus@lemmy.world 2 points 1 week ago

Yeah, hence me mentioning the arcane code nobody knows what it does.

load more comments (1 replies)
load more comments (7 replies)
this post was submitted on 06 Jul 2024
1505 points (99.4% liked)

Programmer Humor

18388 readers
1167 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 1 year ago
MODERATORS