this post was submitted on 06 Jan 2024
88 points (98.9% liked)

Programmer Humor

19187 readers
1198 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
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 5 points 8 months ago (4 children)

Writing really good comments is an under-appreciated skill.

[–] [email protected] 3 points 8 months ago (2 children)

Even though comments are very helpful, often it's even enough to name variables and methods/functions really good. At least do that. You don't want i, j and value. Believe me. You want rowCount, colCount and deliveryOption instead. You just may not know it now, but you will, when it has to be changed in a few months.

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

Where comments are useful most is in explaining why the implementation is as it is. Otherwise smart ass (your future self) will come along, rewrite it just to realize there was indeed a reason for the former implementation.

load more comments (1 replies)
load more comments (2 replies)