Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
It's been awhile since I've written a for loop. I've sort of arrived a point where if I have occasion to use one, it's because I'm probably not processing my data properly.
-
C0D4681385yForeach() anyone?
I rarely stumble upon a need to use for loops anymore, unless I need to track index/keys -
What the fuck is a loop nigga just (0 to 10).zip(0 to 10), dont be a fucking cretin, a mumbling idiot, a fool.
-
kleopi8735ywhen i need a nested loop im prob doing something wrong... or math at which point i made a mistake already anyways
-
kleopi8735y@Lor-inc if they cant be avoided by streams or matrix-calculations, yeah probably. in that case i use x y z as variables usually, or row column
-
I once worked on a codebase that had i and j as fields as well as local variables used in said loops, and they were being used to hold the values of (local) i and j at various weird points.
Could've written a programming puzzles book with that guy's code. -
wonwon02205yuse "I" and "l" for more clarity
(capital i and lower case L)
it's even funnier when using "or" statements
if I || l:
print("much clear")
To the people that mistake i and j in nested loops: Have you considered giving these different names?
rant
oh no i confused the two
pick a different name then you fuck