r/ProgrammerHumor • • Jun 06 '20

It's the law!

Post image
38k Upvotes

1.1k comments sorted by

View all comments

1.5k

u/Kooneybert Jun 06 '20

The iteration variable makes sense to be called i. j is just the next number in alphabet.

0

u/[deleted] Jun 06 '20

[deleted] — view deleted comment

168

u/Motylde Jun 06 '20

More like: j=i+1

98

u/DudeitsCarl Jun 06 '20

I think it’s j == i+1

135

u/Polywoky Jun 06 '20

You forgot the single-quotes:

'j' == 'i' + 1
→ More replies (29)

14

u/BesottedScot Jun 06 '20

i += 1

j = i

30

u/Axe-actly Jun 06 '20

j = ++i;

One line better than 2. Me big brain.

→ More replies (1)
→ More replies (3)
→ More replies (1)
→ More replies (1)
→ More replies (6)

375

u/RedMantisValerian Jun 06 '20

i stands for iteration, j stands for jiteration

198

u/kakakaan Jun 06 '20

I think “i” stands for index.

→ More replies (18)

49

u/rookie_butt_slapper Jun 06 '20

Let's not forget k for kiteration.

→ More replies (10)

29

u/the_last_n00b Jun 06 '20

It's pronounced giteration, not jiteration

23

u/trixter21992251 Jun 06 '20

yeah, jithub says so, too

→ More replies (1)
→ More replies (6)

69

u/frosted-mini-yeets Jun 06 '20

None of you have ever had nested loops and gone i, j, k, l?

57

u/MattTheGr8 Jun 06 '20

I do a weird thing and skip L and go right to M, to avoid confusion between lowercase L and numeral 1, which look identical in some monospaced fonts.

135

u/_zsa Jun 06 '20

If you nest 4 for loops you should apologize and retire.

35

u/xorgol Jun 06 '20

My defense to all criticism is that the choices were driven by domain-specific issues. It's not necessarily true, but it sure shuts people up :D

→ More replies (2)
→ More replies (31)
→ More replies (7)

34

u/[deleted] Jun 06 '20

Once you reached the end of the alphabet you may be in some deep trouble.

That's some serious O(n4 ) shit you got going there, kiddo. Better hope n is small any you never need to debug that mofo.

→ More replies (5)
→ More replies (23)

13

u/[deleted] Jun 06 '20

i = iteration
j = just the next letter
k = keep going
l = last one

14

u/[deleted] Jun 06 '20

m = maybe one more?
n = no more please
o = oh no
p = please, I beg you to stop
q = qq

→ More replies (2)

12

u/[deleted] Jun 06 '20

I didn't know it meant iteration. I use i for "item"

→ More replies (9)
→ More replies (46)