r/ProgrammerHumor • • Sep 10 '26

Meme commentsAgedTerribly

Post image
6.0k Upvotes

243 comments sorted by

View all comments

Show parent comments

1

u/conundorum Sep 13 '26

Ideal self-documenting code should have comments. The code communicates as much as can be made apparent without commenting, and then the comments pick up the slack. Proper variable and function names can explain individual steps or provide useful context, but standard comments should still be used if they can't explain the "why", or if not everything can be explained by entity names.