this post was submitted on 10 Jun 2024
282 points (94.9% liked)
Programmer Humor
19512 readers
314 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
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I am not a programmer, I just barely wrote one bash script in the past. But I'd say more comments are better than too few.
When I later wanted to edit it, I got completely lost. I wrote it with absolutely no comments.
While this is true, an alternative is to name your variables and functions descriptively so that when you see
number_of_cats
you know that variable is the number of cats, andbuyAnotherCat()
is a function that increases the number of cats.