this post was submitted on 10 Jun 2024
282 points (94.9% liked)

Programmer Humor

19114 readers
545 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
282
submitted 2 months ago* (last edited 2 months ago) by [email protected] to c/programmer_humor
 

Comment from my group project teammate. You don't need to comment every line lol

(page 2) 16 comments
sorted by: hot top controversial new old
[–] [email protected] 0 points 2 months ago* (last edited 2 months ago) (1 children)

It's not that bad. It definitely helps in long functions.

I'm an advocate for code commenting itself, but sometimes it's just better to comment on what you're doing, and in those cases it helps to over commentate.

Instead of letting the reader interweave code reading and comment reading, I think it's better to do either. Either you go full self describing code, letting the reader parse it as code,m, or you abstract everything, making it more of an explanation of your reasoning, and abstract lines that may look too complicated.

Not every comment needs to be useful, but I still write them to not have this switch between reasoning and thinking in code. It can also double as rubber duck debugging too!

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

sometimes it's just nice to remember a human wrote a thing

load more comments
view more: ‹ prev next ›