this post was submitted on 09 Jul 2023
631 points (94.0% liked)
Programmer Humor
32461 readers
797 users here now
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
WTF, I have never used nor seen "j."
I don't usually have to name these variables these days though. Pretty much everything I use has foreach or some functional programming type stuff.
And like that, the off-by-one mistakes disappear.
It was very common in text books when showing nested loops
j
is for a loop in a loop.foreach is useful when you don't need to know the index of something. If you do, conventional i, j, k, etc. are useful.
A lot of it depends what you're doing (number crunching, for instance) or if you're in a limited programming language (why won't BASIC die already?) where parallel arrays are still a thing.