this post was submitted on 06 Jul 2024
1528 points (99.4% liked)

Programmer Humor

19111 readers
528 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] 17 points 2 months ago (19 children)

Good code is self-explanatory. You should only comment your code if it does something unexpectedly complicated.

That being said, it's always a good idea to write a manual, about how to use the code. Don't document how it works, because those who can code will understand it anyways, and those who can't, have no need to understand it.

[–] [email protected] 12 points 2 months ago (11 children)

Hard disagree. It's a lot easier and faster to understand a function that is prefaced with a small line of text explaining what it does rather than trying to figure it out yourself.

It's not about whether you can understand the code or not, it's about efficiency and clarity.

[–] [email protected] 7 points 2 months ago

Yeah, just 15 seconds and jot down a comment. Whenever I’m even hesitant, I just leave a comment. Doesn’t hurt anything and it can always be removed if not needed

Easier to remove later rather than add it after the fact

load more comments (10 replies)
load more comments (17 replies)