24
Leave a Reply

avatar
24 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
0 Comment authors
ehmohteeohLBXZerowillskatestimingfountaincaptainjon Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
thatguynamedDon
Guest
thatguynamedDon

Or just

>Array.map()

ehmohteeoh
Guest
ehmohteeoh

Loop indexes go i, j, consider different structure, k, start over.

LBXZero
Guest
LBXZero

Square Root of Negative 1 is Iterator?

willskates
Guest
willskates

r/technicallythetruth

timingfountain
Guest
timingfountain

I’m pretty new to programming so can someone explain why you would need a loop variable (in terms of java)

captainjon
Guest
captainjon

In high school I made my variables shit in various foreign languages. And when I got stuck on something hearing my teacher curse when tracing my code made it really hard to maintain a straight face. Plus having my friends snicker in the back made it even harder!

axeonthra
Guest
axeonthra

Biggest improvement I made in my first 2 years of programming in industry was to use ii instead of i.

KerouacSlut69
Guest
KerouacSlut69

Oh cool this joke

coladict
Guest
coladict

In electrical engineering they taught us this is `j` there, because `i` is already taken.

Anarch157a
Guest
Anarch157a

Am I the only weirdo here who uses ‘l’… you know, for **l**oop ?

gmtime
Guest
gmtime

`for (auto ?=0;?<20;?++)`

`for (auto ?=0;?<?;?++)`

joostlasniper
Guest
joostlasniper

j?

gergnerd
Guest
gergnerd

i will have you know that all my variables are rational sir!

EdEddNEddit
Guest
EdEddNEddit

What do you mean? I rarely name my variables squareRootOfMinusOne

ElongatedMuskrat122
Guest
ElongatedMuskrat122

Jk

MasterFubar
Guest
MasterFubar

As an electrical engineer, that’s my *second* choice for a loop variable.

The first one is **i**.

not_mean_enough
Guest
not_mean_enough

No reason to make it so complex.

z_the_fox
Guest
z_the_fox

#define j sqrt(-1)

#define i sqrt(-1)

MrMagnesium
Guest
MrMagnesium

k

dullbananas
Guest
dullbananas

Communists would name it “us”

m_Nebula
Guest
m_Nebula

True that

crusty_cum-sock
Guest
crusty_cum-sock

If you’re a proper Java programmer then you should be doing:

(assumes iterating over a list containing People objects)

for(int iteratorVariableThatIteratesOverTheCollectionThatContainsObjectsPertainingToPeople = 0; iteratorVariableThatIteratesOverTheCollectionThatContainsObjectsPertainingToPeople < aListOfObjectsThatHoldsObjectsPertainingToPeople.size(); iteratorVariableThatIteratesOverTheCollectionThatContainsObjectsPertainingToPeople++)
{
//code
}

metraton1
Guest
metraton1

I’m an engineer, that’s “j” for me 😛 But loops still use “i” tho.

Richardohyeah
Guest
Richardohyeah

ah yes the classic for loop

for (int square_root_of_negative_one = 0; square_root_of_negative_one < index; square_root_of_negative_one++)

{

}