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.

[-] Toribor@corndog.social 17 points 1 week ago

"What does this section of code do?"

Run it and find out, coward.

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

Nah. It should be obvious by just looking at it in code. If it isn't, you haven't extracted single purpose methods out of it yet.

[-] magic_lobster_party@kbin.run 2 points 1 week ago* (last edited 1 week ago)

Just having clear and concise variable names often goes a long way. Avoid using abbreviations.

Breaking out the code into functions helps limit the number of variables within a scope, which makes it easier to name them.

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

Programmer Humor

18388 readers
647 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