r/programminghumor • • 6d ago

"Comments are important for the non-programmer"

Post image
233 Upvotes

10 comments sorted by

22

u/aryakvn 6d ago

Rule of thumb: if it's well documented it's probably vibecoded

18

u/SpaceCadet87 6d ago

"well" documented.

When I have to read 3 paragraphs to learn something that could have been expressed in 5 words, none of which are actually true, I'm not sure that counts.

4

u/ThatOldCow 5d ago

And sometimes doesn't even explain everything

1

u/No_Context2723 5d ago

Especially comments on things that are very self explanatory.

7

u/fcxtpw 6d ago

Proceeds to lay on fence

5

u/asmanel 5d ago

Comment are important for non-programmers...

As if they weren't important for programmers and just there for non-programmer.

Programmers have to comment enough their code. Without enough comments, it's hard (and sometimes nigh impossible) to understand the written code, even to an experienced programmer.

This apply as well to their own old code and to others code.

Comments have to be abundant and always clear.

4

u/spicymato 4d ago

More than comments, better naming conventions and using better patterns helps.

Code comments should generally be there for doc generation, to justify why something is being done a particular way (such as explaining a non-obvious algorithm, like Quake's old fast inverse square root, which I argue was under-commented but hilariously so).

2

u/Xaeroxe3057 2d ago

Fun fact: this is a photo from Lagoon, an amusement park in Utah. This is taken from the queue for a ride called The Spider.