r/ProgrammerHumor • • Jun 06 '20

It's the law!

Post image
38k Upvotes

1.1k comments sorted by

1.2k

u/holaca9731 Jun 06 '20

Coders that chose the dark side use l

678

u/Mosef- Jun 06 '20

457

u/Specy_Wot Jun 06 '20

| or I or l ??

586

u/Mosef- Jun 06 '20

I || l

392

u/[deleted] Jun 06 '20

Completely valid code but also absolutely cursed

→ More replies (48)
→ More replies (10)
→ More replies (7)

32

u/dumb-on-ice Jun 06 '20

I spent 5 hours debugging a college assignment implementation of mergesort, only to realise I mistook small L for one.

→ More replies (2)

22

u/[deleted] Jun 06 '20

This is my new favorite website

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

39

u/cdreid Jun 06 '20

youre just trying to start trouble sir

28

u/afito Jun 06 '20

I always skip j and l to avoid possible cock ups with that, or with misreading. I always go i, k, m, n and while it does not really make a difference I honestly think it makes it a tad easier to read.

49

u/mangeld3 Jun 06 '20

What the hell are you doing 4+ loops deep?

30

u/Dingens25 Jun 06 '20

Looping over structured 3D data, and then performing an operation on each data point that requires a loop or two nested loops, for example.

→ More replies (11)

11

u/afito Jun 06 '20

It's not really 4+ loops deep, but if I call a function to work the deeper loops, I like to keep the index names constant through the calls. This leads to the point where a certain function may only have one loop but is already the 6th loop so I loop through p isntead of i (which is also no issue with pointers or anything since it's .NET code and doesn't have points anyway).

Is it necessary? Nah. Is it always doable? Nah, obviously some programs run way too deep to keep it up. But when I cycle through part(1), program version(2), batch(3), and testrun(4) to throw a day worth of QA results into an Excel table it works.

This sub jokes a lot about "self explainnatory" and "self documenting" code and while I think we all agree you still need comments, I always felt that making variable and index names unique within reasonable scope massively reduces the possibility for mistakes / eases understanding the code for everyone.

→ More replies (1)
→ More replies (8)
→ More replies (2)

14

u/DandySamberg Jun 06 '20

An I for an i

3

u/[deleted] Jun 06 '20

OiI

→ More replies (1)

5

u/ForeignerLove Jun 06 '20

Coders that choose the light side are not called coders anymore 🤣

→ More replies (5)

1.5k

u/Kooneybert Jun 06 '20

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

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)

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)

6

u/baseball2020 Jun 06 '20

Wait what we’re iterating?!?! Ok do it now! Just in time iteration - jiteration

5

u/[deleted] Jun 06 '20

After a couple of coffees debugging that shit code (that I wrote) late into the night, it's a jitteration alright.

→ More replies (3)

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.

→ More replies (33)
→ 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.

9

u/AndrasKrigare Jun 06 '20

I just make every line of my code in a loop that runs once. That way if I every need to make a loop, the structure is all there.

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

6

u/[deleted] Jun 06 '20

I try and find some sane representation in that case. Even if it's still a letter I'd use the first letter of what it is if that makes sense. Makes it easier to follow in the future.

Eg if you had book, page, word, letter I might use b, p, w, l.

18

u/B4-711 Jun 06 '20

why not just use book, page, word, letter? makes for some very readable code.

→ More replies (4)
→ More replies (16)

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"

16

u/down_vote_magnet Jun 06 '20

It means ā€œindexā€ because iteration 0 makes no sense, but index 0 does.

→ More replies (1)
→ More replies (7)

29

u/Julio974 Jun 06 '20

i, j, k, l, then I start to consider why the fuck I have so many loops

13

u/Axe-actly Jun 06 '20

It's not too nested if you don't have to go back to "a" after doing the whole alphabet.

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

6

u/leo60228 Jun 06 '20

this isn't actually why! the trend originated in fortran, which defined variable types based on the first character in their name. i and j were used for integers, making them the two shortest possible names for integer variables.

→ More replies (1)

5

u/[deleted] Jun 06 '20

The i and j constants come from FORTRAN. Absent an IMPLICIT statement, undeclared variables and arguments beginning with i through n (the "in" group) will be integer, and all other undeclared variables and arguments will be real.

Engineers used to learn FORTRAN for their engineering work. Computer engineers used to study it as part of the engineering classes. They’d get used to naming ints with i and j in FORTRAN and follow that pattern when moving to other languages.

7

u/microbit262 Jun 06 '20

And if you have to make a loop around the i-loop that was not planned before or is inserted later it obviously becomes h, because no one changes the original.

6

u/DaemonActual Jun 06 '20

*Me nesting the OG for loop and renaming the i (and every loop after)*

What heresy is this?!

3

u/Uhfuecu Jun 06 '20

It’s a notation borrowed from math. In a math series the iteration index is represented with i, if there is a need for more indexes you go i-j-k, and eventually greek letters.

3

u/Lygre Jun 06 '20

Basically. I thought it was a callback to the unit vector notations Ʈ, ĵ though

→ More replies (84)

130

u/[deleted] Jun 06 '20

You know the rules and so do I

50

u/meg4_ Jun 06 '20

I know the rules and so do j

9

u/InsideBSI Jun 06 '20

We know the rules and so do k

→ More replies (2)
→ More replies (1)

108

u/creskentydoll Jun 06 '20

In physics calculus dimensions are represented as i, j, and k. I don't know if there's a clear connection but technically i is used to iterate over a 1D surface.

83

u/plaisthos Jun 06 '20

Yes math in general uses i,j,k in sums long before computers were invented

9

u/tralltonetroll Jun 06 '20 edited Jun 06 '20

Integer indices i,j,k are something else than basis vectors i, j, k. (Or overarrow notation, as physicists use, as their definition of vector is quite restrictive.)

8

u/plaisthos Jun 06 '20

Yes. And we often used u,v,w for base vectors in linear algebra but that is all nitpicking when the bigger picture is that all these usages predate CS by decades or centuries

→ More replies (1)

22

u/[deleted] Jun 06 '20

In general, i j k are just commonly used in linear algebra.

→ More replies (4)
→ More replies (5)

190

u/[deleted] Jun 06 '20

I always used "i" as "index", "j" as "jndex", "k" as "kndex"...

24

u/djthomp Jun 06 '20

I use idx, jdx, and kdx, but I kind of like this better.

3

u/Achadel Jun 06 '20

I just use q, qq, qqq...

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

6

u/theoctober19th Jun 06 '20

This one made me burst. Nice one!

3

u/golgol12 Jun 07 '20

Let me show you a better way.

Name your indexes <what index references>Index. You have a bacon[]? You use bacon[ baconIndex ]; You have a list eggs;? You use eggIter;

That way, later on, when you need to mix some egg and bacon together, you just do bacon[ baconIndex ] + eggIter; See how easy that makes things?

2

u/Mya__ Jun 06 '20

I've never been comforatable with i as it's always a vector ( Ć® ) in my head. I usually name the control specifically if it's an independant control or use the array index values/size in relation to the iteration.

is this bad for processing efficiency? I'm not a pro at all. It's easier in my head to make everything relative to each other tho when iterating to make boundaries remain flexible to changing sizes of multidimensional arrays.

413

u/tedshif Jun 06 '20

The story I heard was that Fortran variable names were limited to a single letter, and each letter had a pre-defined type. The letter i was the first in the group of integers, so when people needed a simple variable to increment in a DO loop (Fortran’s for loop) they used i. The letter i standing for ā€œincrementā€ also probably raised its popularity, along with other things. I have no way to verify this, but it’s a neat story, so I thought I’d share it.

95

u/Sjsamdrake Jun 06 '20

Early FORTRAN variable names weren't just one letter, but the first letter of the name determined the default type. Variables starting with I through N were integers.

51

u/TrumpLyftAlles Jun 06 '20

This is the correct answer.

Source: FORTRAN was my first programming language, 1969

15

u/sup3r_hero Jun 06 '20

You’ve been a programmer for over 50 years?

→ More replies (2)

8

u/rubeljan Jun 06 '20

Did you code until your fingers bled?

→ More replies (3)
→ More replies (3)

3

u/r3jjs Jun 06 '20

When they added the ability to declare variables lead to the phrse:

"GOD is real, unless declared as an integer."

→ More replies (7)

35

u/radome9 Jun 06 '20

Fortran variable names were limited to a single letter,

How our species ever made it down from the trees is beyond me.

→ More replies (3)

18

u/[deleted] Jun 06 '20 edited Jun 06 '20

Has more to do with algebra though.

By convention, discrete integers are named after their initial, ā€œiā€ , which also is the first letter of ā€œitemā€. Further variables are simply named by taking the next one.

15

u/[deleted] Jun 06 '20

I kind of like the idea of using i, ii, iii, iv, v, vi... but I feel moving from convention in that manner would annoy my colleagues.

11

u/kloga12 Jun 06 '20

I've seen i and ii sometimes, but going full roman numbers is something I've never seen. Could be cool visually and makes the level of recursion more clear, but you have to type more characters.

→ More replies (1)

4

u/SpaceMathStuff Jun 06 '20

I love the many different takes on what word "i" is the first letter of! Personally I always saw it as standing for "iteration"

3

u/cec772 Jun 06 '20

I’m old enough to have been a FORTRAN teaching assistant in college, and thats what I remember. (But admittedly I my memory is a bit blurry from those days)

2

u/Pbx123456 Jun 06 '20

In FORTRAN integer variables started with I,j,k,,,. A friend that worked at IBM a very long time ago was told by a starting programmer that she had used up all the integer variables.

2

u/SpellSound Jun 06 '20

This is the correct answer. FORTRAN, one the first formal high level languages let you create implicit variables, with "i" being the start of the integers. It's a tradition that has carried on to this day.

Ā 

I think a computing history class (hitting topics like this) should be required for a CS degree. Knowing where it all comes from and how we ended up here can help you understand the "why's" a lot better. It also helps build an understanding and appreciation that we're all standing on the shoulders of giants and their influence is still felt today.

2

u/YetAnotherGuy2 Jun 06 '20

I'm shocked how far down this is and how few know this. What do kids learn these days?

FORTRAN I I which appeared in 1958 used fixed names. Integers had to be I, J, K, L, M & N which is why all example code from that era used I as counter.

It became the dominant language in science computing and as most learned programming at the University back in the days (no one had a personal computer until the late 70s after all) you learned it the science way back then. FORTRAN became the "mother tongue of scientific computing", so naturally when these folks went out into corporate, the room those habits with them

2

u/golgol12 Jun 07 '20

Yep, that's what I heard. However, Fortran can support more than a single letter variable names.

→ More replies (29)

356

u/[deleted] Jun 06 '20

Programmers: name of variable should be self explaining what variable is for

Also programmers: use i,j,x,y,z variables.

179

u/Caenir Jun 06 '20

I and j are so commonly used they are self explaining

129

u/evil_cryptarch Jun 06 '20

As are x, y, and z if you're working with cartesian coordinates.

5

u/highfire666 Jun 06 '20

And T when you're working with temperature or period, but never both. In that case you use temp! Unless you already used temp for temporary variables

→ More replies (5)
→ More replies (20)
→ More replies (1)

38

u/Bobby_Bonsaimind Jun 06 '20

If you use x/y/z for loop variables and they have nothing to do with dimensions, I'm going to figure out where you live and I will nail a dead fish to your doorstep.

2

u/MangoCats Jun 06 '20

It's all self-explanatory when the original coder has left the company.

2

u/shinitakunai Jun 06 '20

For k,v in dict.items() is easy to understand as dicts have key and values.

Those are the cases where I use 1letter variables.

→ More replies (51)

54

u/Butternubicus Jun 06 '20

I end up always using i as an integer iterator and x as an object iterator (eg. List.Select(x=> x...))

I have no idea where I picked it up, but by god it’s the law.

12

u/Mosef- Jun 06 '20

Same, I never noticed the use of x

12

u/I_Was_Fox Jun 06 '20

When I do object iteration, I always do the first letter of the object: people.foreach(p => p...)

→ More replies (7)

4

u/[deleted] Jun 06 '20

I use it for objects (and pointers) - it's an abbreviation for iterator and since an object is referred to as "it" in English, it's pretty damn obvious.

In expression-lambdas I use _ as the name if there is only one argument.

→ More replies (5)

2

u/Sintinium Jun 06 '20

As a Kotlin user I use it as the iterator

→ More replies (15)

45

u/qwasd0r Jun 06 '20

row, col, idx... I'm lawless.

15

u/cdreid Jun 06 '20

We know who you are, we have you on a list. We are coming for you anarchist

→ More replies (2)

4

u/brjukva Jun 06 '20 edited Jun 06 '20

Same. Never use i, j.

→ More replies (3)

3

u/ogtfo Jun 06 '20

Row is not a proper replacement for i. Row implies its storing a row, whereas i implies the index of a row.

Using row for an index is just confusing at best. I'd give row_index or row_number a pass, but row is just a bad choice.

→ More replies (1)

18

u/jensroda Jun 06 '20

Something I find fascinating about programming is that our modern "language" for interacting with computers evolved very quickly, very recently. All these "ancient, forgotten" practices weren't created by ancient people in pre-recorded times, most of the people who standardized these practices are still alive and programming.

Imagine if the English language was written by one person, and you could still ask that person why they chose "the" to be the most common word, or why they implemented so many words from other languages that were already defined to begin with?

Anyway, I'm sure people use "i" so much simply because someone used it like that first, for completely arbitrary reasons, and everyone else did it too because bandwagon.

3

u/RCM94 Jun 07 '20

Except in this example there were ancient people because i,j,k etc were used for summations much before programming was a thing and the concepts are very similar.

→ More replies (1)

17

u/bonbonlable Jun 06 '20

I sometimes use n and k but mostly in Matlab only šŸ˜…

3

u/qatamat99 Jun 06 '20

I use k for dictionaries

11

u/[deleted] Jun 06 '20

I use k when i and j are taken.

→ More replies (6)
→ More replies (2)

3

u/raging_ragdoll Jun 06 '20

That's beacause if you use i you can't use imaginary numbers, or that's what i've been told

3

u/InternalDot Jun 06 '20

You can use j as an imaginary number too, so it’s still doable

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

17

u/[deleted] Jun 06 '20

*laughs in functionals*

3

u/mktiti Jun 06 '20

While eliminating this problem, haskell is still guilty as fuck of using cryptic single letter variables.

Pointfree is cool tho.

→ More replies (1)

13

u/dependency_injector Jun 06 '20

I use x and y if the array represents something surface-like

25

u/li-si Jun 06 '20

Homage to Dijkstra.

2

u/theProfessorr Jun 06 '20

Had a professor that joked about naming his kids i, j, k. Said he loved the name Dijkstra for the same reason.

10

u/[deleted] Jun 06 '20

[removed] — view removed comment

→ More replies (1)

11

u/Noch_ein_Kamel Jun 06 '20

iterator
jitterator
kidzbopirator

2

u/ogtfo Jun 06 '20

Kidzpobirator is a fine metaphor for what your code probably looks like when you're three loops deep.

8

u/mcnut77 Jun 06 '20

Us faux matlab programmers use ii and jj, unless we want to redefine the definition of an imaginary number.

34

u/[deleted] Jun 06 '20

Because i is the index and j is the next letter in the alphabet.

37

u/[deleted] Jun 06 '20

I would say i = iterator. It's only an index if you're accessing an array.

→ More replies (14)
→ More replies (5)

5

u/DownshiftedRare Jun 06 '20

"i" is for incrementor.

"j" is for Joe, who really likes incrementors.

11

u/Michel3951 Jun 06 '20 edited Jun 06 '20

x, y anyone? No?

edit: lowercase x,y

14

u/highfire666 Jun 06 '20

In a nested loop that has nothing to do with cartesian coordinates? You monster!

4

u/NeverBeenStung Jun 06 '20

And he’s also using capitals...grab him!

→ More replies (1)

4

u/nhdw Jun 06 '20

lower case x every time. You are not alone.

2

u/[deleted] Jun 06 '20

Yep x, y, z are my first picks too. It's the way my teacher did it, I liked it, so I keep doing it. The ijk crowd can sue me, xyz will endure!

→ More replies (2)

4

u/Ta1sty Jun 06 '20

We got it from the mathematicians

4

u/almarcTheSun Jun 06 '20

What's the show? This looks so familiar.

4

u/Nielsly Jun 06 '20

The Suite Life of Zack & Cody, that’s mister Mosby in the photo :)

→ More replies (2)

1

u/mightybanned Jun 06 '20

I prefer using camelCase and PascalCase in naming variables. By that way, I cant easily identify them when debugging, it also helps the other co-programmers to read the code easily.

1

u/siraajgudu Jun 06 '20

Yeah it's a good practice

3

u/[deleted] Jun 06 '20

Iterator jiterator baby

3

u/[deleted] Jun 06 '20

We get a lot of this from FORTRAN. FORTRAN got it from mathematics. Here’s a nice write up about it.

https://stackoverflow.com/questions/4137785/why-are-variables-i-and-j-used-for-counters

5

u/kennypu Jun 06 '20

I like to drive people crazy by using i, ii, iii and so on. I have also used i2

4

u/[deleted] Jun 06 '20

I feel like i1 i2 i3 etc might be somewhat clarifying compared to i j k in iterative loops. The number is the loop layer.

→ More replies (1)

4

u/Ivesy3000 Jun 06 '20

This is the way.

4

u/yharnamite_blood Jun 06 '20

Once I tried to use h,k as variables, The FBI was at my doorstep, TRUE STORY.🧐

→ More replies (2)

2

u/Ace-O-Matic Jun 06 '20

Because it's a clear way to signal to anyone reading the code: the variable's purpose as iteration value and its depth.

2

u/[deleted] Jun 06 '20

I'm more of a k and c type.

→ More replies (3)

2

u/SpinatMixxer Jun 06 '20

When I started programming I knew about the i but not the j. When I encountered my first loop in a loop, I was thinking about how to name the new variable.

I did go for i, ii, iii, iiii and so on. Until my collegue saw it and explained me why that was not the way how we gonna do it.

2

u/[deleted] Jun 06 '20

sigh, that's stupid. It's obviously better to do it like i, ii, iii, iv

→ More replies (1)

2

u/CageAnElephantPLZ Jun 06 '20

ppl who use x and y, YIKES

2

u/MrJod2002 Jun 06 '20

Am I the only one who uses i’s and x’s?

2

u/LliLReader Jun 06 '20

Loop variables are generally short lived, so no point in fancy naming unless absolutely necessary.

2

u/[deleted] Jun 06 '20

I mean... I wonder if the variables were chosen because i and j are also popular indices for calculus and linear algebra when dealing with sums and matrices. Like.. what were Newton's indices when inventing calc?

2

u/Bastian_5123 Jun 06 '20

It's probably just i = increment, j is the next letter and k is the next letter after that. ijk in maths probably comes from a similar place, except i = imaginary

2

u/takahashi01 Jun 06 '20

I usually use i and k, because my most common and infuriating error was always mixing up i and j

2

u/589ca35e1590b Jun 06 '20

I use x and y come at me

2

u/kazneus Jun 06 '20

summations over i,j,k for 3d matricies. This comes from math.

2

u/llagerlof Jun 06 '20

Spotted the java programmer.

2

u/ahughezz Jun 06 '20

I need my iterators and jiterators

2

u/Mc_UsernameTaken Jun 06 '20

I use C, just so I can write C++

2

u/Aeium Jun 06 '20

I don't know why everyone does it, but I know exactly why I do it.

i is for iteration.

If you have two nested loops, you can't use i twice (I tried it), so you need to use another letter. j looks like i but it's actually a different letter so it will work.

If you need three nested loops, then k is the next letter in the alphabet, so I guess go with that one.

2

u/klaizon Jun 06 '20

I remember being marked down in college in an introductory programming course for not using c for counter in my loops (as taught but not instructed). I used i, and it was uncomfortable explaining to my professor why i stood for iterator. Some people have hard-coded logic and workflows in their brain that they'll never change.

→ More replies (1)

2

u/StereotypicalCat Jun 06 '20

i = index/indicies?

2

u/Nikarus2370 Jun 06 '20

While in college 1 of my professors got quite salty that I was using x and y as variables for a couple for loops that processed over a 2d array that stored map data for a little roguelike i made.

2

u/rjsh927 Jun 06 '20

I also use k sometimes. I am daring like that.

2

u/knight_vertrag Jun 06 '20

I think its inspired from the math notation of summation where the terms are subscripted with i,j,k usually.

→ More replies (1)

2

u/jeric_C137 Jun 06 '20

Because counter variables in for loops are temporary so it saves time to not think about it.

2

u/seiga08 Jun 06 '20

No you use n for ā€œnumber of iterationsā€ and if you need another tone you use m for ā€œmumber of iterationsā€

2

u/TheGaminja Jun 06 '20

Had a teacher in high school show me resources where they used i, ii, iii, ... That was extreme lawlessness.

2

u/SherlockSilicon Jun 06 '20

Index and jindex of course

2

u/_demoncleaner Jun 06 '20

I personally prefer variables over variabes.

2

u/[deleted] Jun 06 '20

I always thought it meant 'iterator' and that j was chosen because it looked kinda like 'i'

→ More replies (1)

2

u/[deleted] Jun 06 '20

iterator jiterator kiterator, duh.

3

u/[deleted] Jun 06 '20

Started using 'int index' to impress my crush in office. (You know, the man who cares for his variables will obviously care for his gf/wife)

The nested 'for loop' gave me a headache. In walks 'int jindex'.

2

u/[deleted] Jun 06 '20

Pro tips: Use ii instead of a single i. makes finding them so much easier if you e.g. would need to rename your variable.

7

u/wookiee42 Jun 06 '20

No one else on your team is going to stick to that. Plus your code might not throw an error if you accidentally use 'i' or 'iii'. Search for 'for' or 'for (' or ' for ' etc - whatever makes sense in your language. Use the RegEx or boolean logic that your search provides if needed.

→ More replies (2)

5

u/LIGHTNINGBOLT23 Jun 06 '20 edited Sep 21 '24

Ā Ā Ā 

→ More replies (1)

2

u/russellvt Jun 06 '20

Use ii instead of a single i. makes finding them so much easier

Because, those who don't know vim or good regular expressions know nothing about "\s+" and related search patterns.

Notepad++ for Windoze users is also highly recommended, if that's your coding platform of choice... though there are good IDEs out there, too.

2

u/Denziloe Jun 06 '20

Pro tip: don't.

1

u/TreadheadS Jun 06 '20

i is "index" or "iteration", either makes perfect sense. j is just i++

1

u/cdreid Jun 06 '20

Also a and n . If you do otherwise youre an anarchist and We Are Watching You!

1

u/[deleted] Jun 06 '20

Professional have standards

1

u/AvenDonn Jun 06 '20

If you use anything other than x in your lambda we can't be friends

1

u/LepruconX Jun 06 '20

Yeah I don’t know why I do this too maybe I saw my teacher do it?

1

u/TheMogician Jun 06 '20

It's funny because I always used m and n.

→ More replies (3)

1

u/james_harushi Jun 06 '20

i = integer
j = just another integer

1

u/Speedster4206 Jun 06 '20

What’s the default IDE? Notepad??

1

u/-Listening Jun 06 '20

I also want to know the law?

1

u/rust_neutral Jun 06 '20

What's up with foobar? "Fucked Up Beyond All Recognition" is one hell of a reference to perpetuate all of these years.

1

u/[deleted] Jun 06 '20

Index, jndex

1

u/Stalematebread Jun 06 '20

I for either iteration or index, j as the next letter

1

u/[deleted] Jun 06 '20

Increment, index, iteration..

1

u/skhiari1994 Jun 06 '20

i and j is like pissing and shitting on human being

1

u/Danthekilla Jun 06 '20

i = iterator, index, iteration, incrementor

Pretty much however you look at it i is a great name for a frequently used iteration variable.

And j is just the next in the sequence.

Most people then use k and l. Though it's rare to need code to nest that deeply.

1

u/Bollenisback Jun 06 '20

i = increment, iteration, index j = neighbor

1

u/thataccountforporn Jun 06 '20

I mean Index and Jndex, you have to use them!

→ More replies (1)

1

u/scifiburrito Jun 06 '20

me, getting blasted for using n

1

u/ForeignerLove Jun 06 '20

i stands for iteration and j..well it just so happens to come after i in the alphabet sequence

→ More replies (1)

1

u/redditk9 Jun 06 '20

I was once told (probably incorrectly) that using ā€˜i’ as an iteration variable in MATLAB had a performance penalty so now I use ā€˜k’... you know... for ā€œkountā€.

But only in MATLAB. It’s just a habit now for quick MATLAB scripts. Otherwise ā€˜i’ is where it’s at.

1

u/wowy-lied Jun 06 '20

I use "iter" before "I".

1

u/Brothersquid Jun 06 '20

I use i for single for loops but i use r,c for nested for loops. Picked it up in my high school coding class.

1

u/Aldeseus Jun 06 '20

I remember trying to teach my ex python. I had to explain it by showing ā€œfor thing in blahā€

1

u/Sbvv Jun 06 '20

Please, stop doing that, I want refactor easily your s***

1

u/Speedster4206 Jun 06 '20

It’s going up in the ole cubicle

1

u/Dummerchen1933 Jun 06 '20

Except for iterating through points in space, then you have to use x,y,z

1

u/thomasdarimont Jun 06 '20

What would you expect from a generation of programmers who got inspired by a guy named D/ijk/stra.

1

u/letss_Do_thiss Jun 06 '20

What about x,y and k

1

u/Assasin2gamer Jun 06 '20

"It's my opinion, just like a holocaust