663
(page 2) 38 comments
sorted by: hot top controversial new old
[-] got2best@lemmy.world 3 points 2 years ago

OMG the PRNDL

[-] Gotoro@lemmy.world 3 points 2 years ago

I always use x or y, coming from Python background

[-] psysop@lemmy.world 2 points 2 years ago

I'm honestly prefer short but (usually) complete words. Somewhere along the line I realized that being explicit really helps when you need to change it later.

load more comments (3 replies)
[-] Lewistrick@feddit.nl 2 points 2 years ago

chuckles in Python

[-] menturi@lemmy.ml 2 points 2 years ago

I started using the first letter of the thing I am iterating over. This is particularly helpful with nested loops so I can easily remember which index variable corresponds to which thing.

[-] joneskind@lemmy.world 1 points 2 years ago

I thought it come from mathematical sequences, but actually it doesn't. My best bet is that i is the shorthand for index

[-] roi 1 points 2 years ago

When my brain doesn’t work I’ll resort to naming them the single of the plural. Like keys turns into key when i don’t wanna call it “objkey” or “outrageouslylongnamethatmayormaynotbeafittongwordtodescribeakey”

[-] Zucca@sopuli.xyz 1 points 2 years ago

Well. I guess I'm then a some kind of heretic then. 🤷

[-] librecat@lemmy.basedcount.com 1 points 2 years ago

don't mind i but personally always use index or x, y, z for games

load more comments
view more: ‹ prev next ›
this post was submitted on 09 Jul 2023
663 points (100.0% liked)

Programmer Humor

38603 readers
101 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 6 years ago
MODERATORS