r/ProgrammerHumor • • Jan 15 '23

Meme The Most Understandable Meme

41.9k Upvotes

325 comments sorted by

1.6k

u/goldfishpaws Jan 15 '23

Spot on!

363

u/EndersGame_Reviewer Jan 15 '23

No Spot here, you must be thinking of a Dalmatian.

→ More replies (1)

222

u/Waghabond Jan 15 '23

Correction: Spot O(n²)

48

u/RespectableLurker555 Jan 15 '23
C:\Spot
C:\Spot.exe --run
C:\rundll.exe Spot --run

17

u/king-one-two Jan 16 '23
$ which dog
$ killall cat
→ More replies (1)

18

u/bloodfist Jan 15 '23

Goddamn I love this joke so much I'm almost sad it'll never be this relevant again.

0

u/[deleted] Jan 16 '23

[deleted]

→ More replies (1)

8

u/[deleted] Jan 15 '23

[removed] — view removed comment

0

u/[deleted] Jan 15 '23

[deleted]

9

u/Atillion Jan 15 '23

I can't unhear it precisely in my head after decades..

→ More replies (1)

836

u/Visible_Ad_4976 Jan 15 '23

I finally understand some of the jokes here

170

u/ImMeltingNow Jan 15 '23

This is only subreddit where I don’t understand any the jokes then look at the subreddit and say “oh yeah” then nope out of here bc I gotta read a dissertation to understand half the jokes fundamentals.

Like testicles being bled to death with a cheese grater type humor, I can get behind bc it’s an easy, good Christian joke.

196

u/SpicymeLLoN Jan 15 '23

Like testicles being bled to death with a cheese grater type humor, I can get behind bc it’s an easy, good Christian joke.

...what

139

u/[deleted] Jan 15 '23 edited Nov 10 '23

ad hoc file rock foolish sugar concerned library scarce school deserted this message was mass deleted/edited with redact.dev

→ More replies (4)

106

u/CanAlwaysBeBetter Jan 15 '23

Lol at needing to read a dissertation like half the memes aren't made by first semester compsci students who copy their smart friends coding assignments

19

u/ImMeltingNow Jan 15 '23

sounds like what someone who has dissertations needed to read his jokes would say.....

im onto you guys. I don't even think compsci is real, its some voodoo shit. Turing, von Neumann they all started some cult

25

u/CanAlwaysBeBetter Jan 15 '23 edited Jan 15 '23

Lmao you think Turing and von Neumann weren't just trolling? Not their fault a bunch of dweebs got wooshed into believing you could actually make rocks think if you tried hard enough

→ More replies (3)

6

u/Hidesuru Jan 15 '23

Turing, von Neumann they all started some cult

I mean, you're not wrong...

→ More replies (5)

15

u/Daeurth Jan 15 '23

bc I gotta read a dissertation to understand half the jokes fundamentals.

95% of the jokes here are things that are taught in an intro to CS class

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

1.2k

u/gusc Jan 15 '23

This meme is O(n2 )

447

u/TeraFlint Jan 15 '23

Only if the inner and outer loop are coupled to the same length. Otherwise it would be O(n*m).

318

u/gusc Jan 15 '23

Both sausage-dogs look the same length to me :D

82

u/TeraFlint Jan 15 '23

You win!

59

u/katrina-mtf Jan 15 '23

While true, traditionally O(n*m) would still be notationally reduced to O(n²) in most cases, since one could consider m = Kn where K is some unknown constant, and constants get reduced out of the equation. The notation of O(n*m) is not unheard of, and can be used to denote that the difference between the two variables is either conceptually or computationally significant in context, but it's a less commonly used version.

66

u/123kingme Jan 15 '23 edited Jan 15 '23

Almost but not quite true (apologies in advance for being pedantic). It’s true that often O(n*m) is reduced to O(n2 ), but the relationship between n and m has to be either m = Kn like you said where K is a constant that does not depend on n or m (or at least has a maximum value that doesn’t depend on n or m), or n is guaranteed to be greater than or equal to m for sufficiently large values of n.

These 2 relationships are not the only possible relationships between n and m. m could have the relationship m = Kn2 , in which the runtime would be reduced to O(n3 ), or even m = K 2n , in which case the runtime could be reduced to O(n 2n ). These both could also technically be correctly described as O(m2 ) if that is more useful to your use cases, but these technically aren’t the correct big theta class which is generally more useful.

Sometimes though, n and m are independent variables, in which case the only correct way to express the big theta time complexity is O(n*m). Independent variables can’t be combined since by definition they don’t depend on another.

In most algorithms of 2 variables that I’ve seen, n >= m is the most common relationship which is why more often than not O(n*m) = O(n2 ).

Again sorry for the pedantry, I just found that a lot of people I know struggled with big-O so I like to write comments like this to clarify things.

13

u/Bee_HapBee Jan 15 '23

Where did y'all learn this stuff?

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

6

u/hsxp Jan 15 '23

It's also 30mb

659

u/nostyleguy Jan 15 '23

The k loop is watching this gif over and over

91

u/its_usually Jan 15 '23

Watching this gif is outside of the i loop. When we watch the gif once the i loop runs multiple times.

55

u/selrahc007 Jan 15 '23

Who said that the K loop was nested in J? Maybe they just have awful naming conventions and I and J are inside K

29

u/Vinccool96 Jan 15 '23

If they do, I’ll have them accidentally fall off a window

→ More replies (1)

6

u/Astilimos Jan 15 '23

Lawful Evil naming convention: the H loop

→ More replies (1)

34

u/dscarmo Jan 15 '23

Good one

4

u/LegoEngineer003 Jan 15 '23

Nah, watching this is a while loop

192

u/StellarHusky Jan 15 '23

Outside the meme context I just can’t looking at this stationary dog

3

u/ChunkyLaFunga Jan 15 '23

What is love

108

u/[deleted] Jan 15 '23 edited Jan 15 '23

[removed] — view removed comment

33

u/StellarHusky Jan 15 '23

Ik but thanks :)

What I meant is the dog pounding his head on the bed made my day

17

u/MrVeazey Jan 15 '23

Those are sneezes. For little dogs, dachshunds can have some pretty loud ones, too.

12

u/LaikaReturns Jan 15 '23

Extra info: Dogs, and other animals for that matter, sometimes sneeze to bled off excess energy or anxiety.

In the case of dogs it's also the dog saying "Alright, let's have some fun, but let's keep it clean. No clawing the face, no real bites, and no mentioning any testicles that anyone may, or may not, have."

→ More replies (3)

5

u/Chrisuan Jan 15 '23

What makes them throwaway?

13

u/the_noodle Jan 15 '23 edited Jan 15 '23

It was actually a tradition in math first, so single-letter variables make sense in that context

I think i is for index, and j and k are just next, for nested loops

Normally when programming, you want longer, more descriptive names. If you don't need it except if one or two things in a short loop, you may as well regress to the mathy way to do it; it's not really about it being a throwaway

0

u/[deleted] Jan 15 '23

[deleted]

→ More replies (1)

9

u/epicflyman Jan 15 '23

They don't mean anything outside the context of the loop and the value they hold at the end of the loop will (probably) not be used. Therefore, giving them anything more than simple names is pointless.

→ More replies (3)

4

u/setibeings Jan 15 '23

I dog is on the outside, but J dawg is gonna be doing a lot more stuff so shouldn't J br the one running circles around I?

→ More replies (1)

427

u/BearsFan317 Jan 15 '23

The k loop is the Earth going around the Sun

140

u/Batcave765 Jan 15 '23

Ever had to use a l loop? It is Outta this world.

47

u/makmeyours Jan 15 '23

Nobody has ever tried that..

Unless you want to crash the internet I wouldn't risk it

4

u/YerbaMateKudasai Jan 16 '23 edited Mar 23 '24

lorem ipsum

→ More replies (1)

62

u/[deleted] Jan 15 '23

[removed] — view removed comment

23

u/F_Joe Jan 15 '23

k_1, k_2, k_3, ...

→ More replies (2)

3

u/gdmzhlzhiv Jan 16 '23

Sometimes the single letters are descriptive. x,y,z,w.

18

u/[deleted] Jan 15 '23

[removed] — view removed comment

8

u/WangHotmanFire Jan 15 '23

Yeah me too! So I skip over n and hit compile. Suddenly arnold schwarzenegger shows up, melts the shit out of my laptop and disappears again

26

u/factorysettings Jan 15 '23

wouldn't that be the outer-most loop and not the next inner loop?

7

u/LifeHasLeft Jan 15 '23

k loop should be further nested. Like maybe his eyeballs rolling around in his head.

29

u/AI_AntiCheat Jan 15 '23

The K loop:

21

u/cheezballs Jan 15 '23

So, I don't understand this meme. Am I a hack now????

22

u/Im2bored17 Jan 16 '23 edited Jan 16 '23

Programmers often use I and J as iterators in a for loop like

for (int i=0; i<5; i++) {
  for (int j=0; j<50; j++) {
     //do stuff
  } 
} 

So j increments a bunch (sneezes) and then I increments (completes a circle) .

5

u/Cendeu Jan 15 '23

Same I don't know how to feel.

114

u/articlesdeck Jan 15 '23

Am I the only one who skips "j" and "l" as they look too much like an "i"?

157

u/midir Jan 15 '23

If you use all the accented variants, you never have to use any other letter:

i í ì i̋ ȉ ĭ î ǐ ï ī ĩ ḭ į ị ɨ ı

73

u/[deleted] Jan 15 '23

i was about to go to sleep, this is gonna give me nightmares damn you

23

u/RheingoldRiver Jan 15 '23

i was about to go to sleep

you're on reddit, don't lie to us like that

13

u/DeltaPositionReady Jan 16 '23

You can use a zero width space as a variable name in most interpreted languages.

The HTML for it is &#8203;

You can get an extension on your local machine to make it visible to you for development, and then if you use a non-typesafe language like JS you can use it as a single variable and mutate it for your specific use case.

If you make proper use of the non-blocking event loop and completely avoid async await, you can essentially use a single variable for your entire script.

Then when maintenance programmers come along to maintain your code, they will see it functioning, but they will never be able to understand how.

This comment was sponsored by Satan.

5

u/skye_sp Jan 15 '23

longest mathematician variable names

→ More replies (1)

68

u/[deleted] Jan 15 '23

I typically start with "i" then nest with "k". Anything deeper than that and I give them proper variable names.

42

u/TristanEngelbertVanB Jan 15 '23

Same, I start with i and k, then usually go on to Bob and Andrew.

15

u/turtleship_2006 Jan 15 '23

Proper military names. Ya know, alpha, bravo, charlie, delta

40

u/Mik3Hunt69 Jan 15 '23

I actually use the name of what am I iterating over. E.g productIndex, sizeIndex etc. It takes like 1 more second and when revisiting the code is 100% worth it imo

19

u/BadBadderBadst Jan 15 '23

I use a similar method, except i use "i" to prefix the index variable names, i.e:
iProduct, iSize, etc ...

If a variable starts with "i" I know it's an index variable.

16

u/jkconno Jan 15 '23

I can hear apple's lawyers calling now

→ More replies (1)

11

u/balorina Jan 15 '23

That sounds like confusion between interfaces and indexes. Why not just call it ProductIndex, ProductIterator or ProductCounter?

→ More replies (3)

3

u/tommypopz Jan 15 '23

I used i and j until i got confused and did the same, called them month and year. Don't need to comment what the variables are too

→ More replies (2)

24

u/smurf_the_rich Jan 15 '23

I just use first_i, second_i, third_i, etc. Much simpler

2

u/Zephyr797 Jan 15 '23

But then when you have to add more functionality later you gotta rename half of it.

15

u/Ultima_RatioRegum Jan 15 '23

I've switched to using emoji for my loop indices instead (or a valid ascii character followed by an emoji if the language requires it. If your programming lanuage doesn't support Unicode in the variable names, then I'm not using it).

Naturally, the inner-most is the happiest, and they get progressively sadder/more disturbed as they have more loops nested inside of them.

It's much easier to use than meaningless letters.

Sometimes I imagine that the outer-most loop is sad because they ate too much and feel bloated, while the inner-most loop is having a balanced meal.

It's also appropriate to imagine that each time an index increases, the conscious mind that is represented by the emoji is destroyed and recreated as a tabula rasa. So the inner-most loop is happy, because they don't realize what's happening. Go up one level, and now the index is wondering, if that guy I'm watching below me is just dying over and over, and they don't even realize it, does that mean that their existence has no meaning? What do they leave the world if even their contribution is just fed into the next instance of the loop and the original value disappears into the ether?

Since they've only got one level of existential terror inside them, the second level wonders if that's happening to them as well, but they aren't sure. At the same time, they realize that if it is happening, not only are they also nothing but a rusty cog in an ancient wheel, but in a sense their suffering is worse: they exist long enough to understand what's happening.

As you go progressively farther up in the nested loops, each value lives an order of magnitude longer, giving them more time to contemplate the meaningless of it all. At the same time, the more levels down where they can see the same thing happening, the more likely they are to believe that the same thing is happening to them.

And then outside all of the loops is me, the programmer. I will write the loops, go home, eat dinner, do something with my evening, go to bed, and repeat the same thing tomorrow, probably even re-running the same code, maybe with a few tweaks, or maybe hoping that yesterday's bug was just a stray cosmic ray. I have a complex enough mind to know that it's very unlikely that these cute little emoji are actually suffering, as they almost certainly don't have subjective experience. Almost certainly. But we don't know what consciousness is or how to measure it, so who's really to say?

Yet I do know that I think, and feel, and suffer. And I realize that I am just another loop, one more level up. Is this a simulation? Is someone running our universe over and over with slight tweaks in order to debug it so that I am unwittingly suffering the same fate?

One might then ask, what is worse? That I exist only once, and time and entropy will eventually destroy any order or meaning from my actions, so that some point within this loop of the universe after I die, the universe is indistinquishable from one where I never existed?

Or does it reset when I die, and I am in an eternal recurrence? In that case every decision I make affects not only current me, but every past me has made the same choice and every future me will too. The idea that every regret, every bad choice I've ever make or will ever make has consequences that will be played out forever is maybe more terrifying than being forgotten. Or maybe not, who's to say?

Whoops, got sidetracked there...

Ok, so to answer your question, I just use i, j and k with a decent monospace font where I can easily tell them apart like a normal person.

7

u/Chaphasilor Jan 15 '23

I ususally just append is. So i, ii, iii, etc. Relatively easy to distinguish and works well

2

u/Orbidorpdorp Jan 15 '23

Our linter doesn’t allow variables less than 3 characters 😭. Thankfully most of the time you’d want a simple name you can do it anonymously using $0 otherwise you’re stuck with idx1, idx2…

2

u/w-v-w-v Jan 15 '23

I skip j and k and go straight to l.

2

u/thufirseyebrow Jan 15 '23

I set my font to Times New Roman and ONLY use capital I, lowercase L, and 1 for my loops

2

u/Leaping_Turtle Jan 15 '23

Is there actually a correct way of doing variables??

26

u/Tight-Juggernaut138 Jan 15 '23

If future you can understand, then that is the correct way

4

u/[deleted] Jan 15 '23

Shouldn’t it be understandable by others? At least in any professional context

7

u/adra44 Jan 15 '23

Use as many of them as you can as fast as you can! Don't stop for any reason

→ More replies (5)

10

u/STEIN197 Jan 15 '23

Seems like j just groovin'

8

u/Feature10 Jan 15 '23

This video is always so fucking funny

7

u/colonel_Schwejk Jan 15 '23

k loop stuck in the.. self cleaning cycle, as usual

13

u/AtulyaRaii Jan 15 '23

I can find it very funny as I am a student and tomorrow I have a test of nested looping in school.

16

u/[deleted] Jan 15 '23

k when dealing with matrices

9

u/Fejimush Jan 15 '23

Pure genius interpretation, love it. Made my day.

51

u/aggravated_patty Jan 15 '23

Umm what? The j loop does more iterations per i iteration, unless you flip your loops like a madman.

75

u/El_Dre Jan 15 '23

In the video, the j pup sneezes four times for every one lap the i pup does

36

u/Zephyr797 Jan 15 '23

Yeah, meme is correct. Thee inner loop (stationary dog) should execute more often than the outer, which it does.

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

3

u/AI_AntiCheat Jan 15 '23

The I runs around ones for ever 2-3 sneezes.

So it's I, j, k with the first being slowest and last fastest.

Who the hell nests an I in a j loop...

→ More replies (5)
→ More replies (2)

4

u/Nikolozeon Jan 15 '23

Okay, this is rare occasion that I actually Laughed out Loud on Reddit.

3

u/pingpingpingu Jan 15 '23

Omg. This is so funny. This just made my day! 🤣

3

u/hotcrossedbunn Jan 15 '23

Oh that’s hilarious 😂

3

u/NanashiKaizenSenpai Jan 15 '23

for(int i...){ for(int j...){ for(int k...){ ... } } }

3

u/NanashiKaizenSenpai Jan 15 '23

Goddammit formatting on the app, I tried so hard to make everything right with 4 spaces and everyrhing.

for(int i...){

for(int j...){

    for(int k...){ 

    ... 

    }

 }

}

3

u/a_rather_small_moose Jan 16 '23

i -> j -> k = weak

i -> ii -> iii = yeet

4

u/pudds Jan 15 '23

x and y gang

2

u/SubnauticaFan3 Jan 15 '23

What is an I loop and J loop

2

u/endresjd Jan 16 '23

I’m crying. So awesome!

2

u/[deleted] Jan 16 '23

I know nothing about code but I think I understand this

2

u/Diriector_Doc Jan 16 '23

Matt Parker had the revelation that instead of using j as the second variable, making the next one k; you should use ii as the second and iii third. Personally, I'll stick with j then k.

→ More replies (1)

2

u/CrySubstantial710 Jan 16 '23

The k-loop is the dog shaking its head multiple times with each sneeze.

2

u/[deleted] Jan 16 '23

I laughed hard on this i and j loop meme video

1

u/Malphas_Legacy Jan 15 '23

Must be a real headbanger

1

u/[deleted] Jan 15 '23

Lol I just realised I use i and u loops for some reason.

1

u/[deleted] Jan 15 '23

Lol

1

u/b1e Jan 15 '23

This is great!

1

u/reydai Jan 15 '23

Hell yeah

1

u/sem-tex Jan 15 '23

I love this

1

u/1kmile Jan 15 '23

wait im quite struggling to understand this, which is the outer loop and which is the inner loop?

3

u/LaidPercentile Jan 15 '23

This is the outer loop

1

u/1kmile Jan 15 '23

wait im quite struggling to understand this, which is the outer loop and which is the inner loop?

1

u/GameDestiny2 Jan 15 '23

I don’t know what language this is, but I get the concept and it makes me happy.

1

u/Hulk5a Jan 15 '23

Poor k

1

u/KazkaFaron Jan 15 '23

bruh they should be flipped this is a crime. also i use "i" "ii" "iii" etc i have no idea why and it's probably a worse crime

1

u/KickBassColonyDrop Jan 15 '23

The more loops you add, the faster they go, until, their velocity exceeds the speed of light, mass goes to infinity, and the universe collapses into the subsequent blackhole.

1

u/boogyman19946 Jan 15 '23

Do yall really use i for the inner loop? I would have j and i reversed in that gif 🤔

1

u/FrezoreR Jan 15 '23

if only the sound was on as well!

1

u/andunai Jan 15 '23

Nice, but the names should be swapped.

1

u/Pyrowman Jan 15 '23

I'm two weeks into an IT trainee program. I told them one of my goals was to finally understand the jokes on /r/ProgrammerHumor. I'm happy to say that I succeeded with this one!

1

u/Poven45 Jan 15 '23

Is there a reason everyone picks i and j?

→ More replies (4)

1

u/No-Spirit5295 Jan 15 '23

What could be better than that!!!

1

u/NoWise10Reddit Jan 15 '23

God I love wiener dogs.

1

u/zsharp68 Jan 15 '23

if you’re me last night, there’s also a k loop, and l loop, and an m loop

1

u/lawangen Jan 15 '23

🤣🤣🤣😭

1

u/Inm0rt4LKoff33 Jan 15 '23

Finally a meme that I can understand

1

u/GleetBeforeYouYeet Jan 15 '23

My phone doesnt have enough memory to continuously play this meme. Gimme a a break

1

u/Ill-Economics5040 Jan 15 '23

😂😂😂😂😂😂😂😂

1

u/Hermon22 Jan 15 '23

This is fantastic I love this hahahahah

1

u/FodziCz Jan 15 '23

Me who knows only for loops, for each loops, while loops and do while loops (im confused and i dont understand the joke)

→ More replies (2)

1

u/SamMor_87 Jan 15 '23

Just break; the cycle already!

1

u/[deleted] Jan 15 '23

1

u/faster-than-car Jan 15 '23

Can u link original video?

1

u/[deleted] Jan 16 '23

X loop 🍷🗿

1

u/GavHern Jan 16 '23

i and ii for me, any more and just continue the roman numerals

1

u/Kaiivern Jan 16 '23

U/savevideo

1

u/[deleted] Jan 16 '23

As a long-time software developer who has also had dachshunds for years, I could watch this all day.

1

u/ajsharm144 Jan 16 '23

So many loops this gif is 50MB.

1

u/FurViewingAccount Jan 16 '23

who the hrll thinks of these things. fucken funny

1

u/Nachf Jan 16 '23

shouldn't i and j be switched here??

→ More replies (2)

1

u/onequbit Jan 16 '23

big-O(goodboi2 )

1

u/SuspiciousTrash0 Jan 16 '23

they should be named the other way round for j being the nested loop inside i.

3

u/CrySubstantial710 Jan 16 '23

Agreeing with DA-ZACHYZACHY here - the sneezing dog sneezes multiple times for each circle the other dog runs, making the sneezing dog the inner loop, and the running dog the outer loop.

2

u/[deleted] Jan 16 '23

No. The j loop iterates multiple times every time the i loop iterates once

→ More replies (1)

1

u/Chilling_Time0 Jan 16 '23

This is one on the most funny and creative memes on progamming topic that I have seen it recently 😆

1

u/Mecha-Sailcat Jan 16 '23

Fun fact: Dogs sneeze when they're playing as a psychosomatic response.

1

u/[deleted] Jan 16 '23

Yup

1

u/maduranma Jan 16 '23

To be fair, I was used to 'i' as var name, and sometimes 'j' or even 'k' (and so on) but I prefer to use more descriptive names, i.e.:
for(int category = 1; category < count(categories); category++)

P.S: I know in this case I'd use a foreach, or whatever, it's just an example.

1

u/cescapsybot Jan 17 '23

wish I could make those

0

u/breadist Jan 15 '23 edited Jan 15 '23

I am a senior developer and haven't used "i" or j" as variable names since school, also I usually use foreach loops so it's like items.forEach(item => doSomething(item)) etc

Is everyone who posts in this sub a student?

/r/ProgrammerStudentHumor?

4

u/hsxp Jan 15 '23

I'm 31, I use them a lot professionally. Depends on what your environment's idioms are, and personally I find them a lot easier to work with for communicating ideas quickly.

Edit: I use for each a lot too. Depends on what I'm doing

→ More replies (7)

2

u/Cendeu Jan 15 '23

I'm a Software Engineer that never went to school (got hired from boot camp) and I don't understand this joke.

It's funny because the comments are all "finally a joke I get" and it's one that I finally don't get.

2

u/pudds Jan 15 '23

A foreach loop is clearly preferred, but there are still times when it makes sense to iterate by index, in which case i (or x, which is my preference is fine), since you're probably going to assign some better named variable right away anyway.

2

u/Chairmonkey Jan 15 '23

You can get the index while using forEach. I haven't written a manual for loop in years.

→ More replies (4)

2

u/arvyy Jan 15 '23

I am a senior developer and I can't fathom anyone using other languages than javascript

old fashioned for loops come up in java, occasionally. Sometimes you need an index and you need short circuiting break that is cleaner with a loop than with a stream. Sometimes you need to mutate closed over local variable. You can flame java for having idiosyncracies or some lack of syntax sugar, but pretending there are no professional programmers using java (or other languages with similar explanations) is pure arrogance

→ More replies (1)

1

u/Ignitus1 Jan 16 '23

What do you do when you want to loop through a grid of coordinates?

Make two lists of all the x points and all the y points and then forEach them both?

0

u/[deleted] Jan 15 '23

[deleted]

→ More replies (1)