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

Programmer Humor

19623 readers
507 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
(page 2) 50 comments
sorted by: hot top controversial new old
[–] [email protected] 3 points 4 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] 1 points 4 months ago

This is true, but it’s easier and faster to parse plain English and so if I don’t adequately comment my code the first time. I will be commenting it when I have to return to it for whatever reason. Honestly the second round of commenting is more verbose and clearer than the function x does y style of comments I tend to make when coding the first time

load more comments (18 replies)
[–] [email protected] 2 points 4 months ago (1 children)

A real comment in our junior year game engine codebase.

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

Fs.?g??yy V>

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

At work we let Typescript and descriptive naming document our code. Only when something is a workaround or otherwise weird will we add comments. So far it has worked great for us.

load more comments
view more: ‹ prev next ›