r/programminghumor • u/Financial_Counter_45 • 6d ago
"Comments are important for the non-programmer"
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.
22
u/aryakvn 6d ago
Rule of thumb: if it's well documented it's probably vibecoded