this post was submitted on 13 Nov 2025
1014 points (99.2% liked)
Programmer Humor
27322 readers
723 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 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
i and I are acceptable in small loops. But it depends a lot on the language used. If you're in C or bash maybe it's fine. But if you're in a higher level language like C# you usually have built on functions for iterating over something.
For example you have a list of movies you want to get the rating from, instead of doing
Its often more readable to do
Also if you work with tables it can be very helpful to name your iteration variables as row and column.
It's all about making it readable, understandable, and correct. There's no point having comments if you forget to update them when you change the code. And you better make sure the AI comments on the 2000 lines of three letter variables is correct!
Yeah I script more than anything...python, bash, powershell, etc.
Only terrible code I inherit is the stuff I wrote >=3 months ago. I'll keep saying that three months from now, too.