this post was submitted on 10 Jun 2024
281 points (94.9% liked)
Programmer Humor
19511 readers
314 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
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
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!
sometimes it's just nice to remember a human wrote a thing