this post was submitted on 06 Jul 2024
1089 points (99.5% liked)

Programmer Humor

19452 readers
232 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
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 14 points 3 months ago (1 children)

"What does this section of code do?"

Run it and find out, coward.

[–] [email protected] 1 points 3 months ago (1 children)

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.

[–] [email protected] 2 points 3 months ago* (last edited 3 months 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.