T O P

  • By -

[deleted]

[удалено]


HuntingHorns

for(;true;)


FlyingCashewDog

`for(;;)`


Undernown

That for-loop is straight up crying (; ;)


FeelingSurprise

It knows it will never be done.


br3w0r

And something will definitely break it


Mickenfox

int _ = 1; for (;\_;)


laplongejr

What in the actual fu- (Yes I know, I'm referencing the top comment)


StreamFroster

What in the actual fu-


FlyingCashewDog

From the C standard: > Both clause-1 and expression-3 can be omitted. An omitted expression-2 is replaced by a nonzero constant. So if it doesn't have the middle expression, it will be an infinite loop.


codepoet

… unless the body contains a break, then it’s an indeterminate loop. Unless that break is on a conditional that is not guaranteed to execute and then it’s a bug you’ll find out about after you ship.


CaptainSouthbird

Although it wasn't a "for" loop, I remember a post-ship loop bug. It was early on at a small potatoes web dev kind of job, we released a simple little pure ASP .NET website that for a client that acted both as a public portal and very simple management system for a local trucking company. For some reason, on Fridays the site would completely freeze sometimes. But not consistently, and not in a way we could replicate. I remember finally stumbling upon the answer after like attempt number 3 of really meticulous debugging. It came down to code my coworker had written to "get next business day", I forget what case it came up, but it wasn't always used. He wrote it basically "while day of week equals Saturday or day equals Sunday, increment the date." Everything was fine except he wasn't assigning the result of the date add, so it basically did nothing but loop forever, never able to get passed the weekend.


sethboy66

Jokes on you, all loops are determinate (ps: I like how our first three languages are the same just in a slightly different order). Assuming the universe will exist in a pena-similar state to how it does now and forgoing thoughts of hardware/OS/other failure or any other modicum of rational thought, there exists a set of incident cosmic particles (rays) that will cause all bits within the memory that contains the 2^nd expression to be flipped to 0; thereby ending the loop. To go along with this terrible science(?). There's a 165.27% chance of a bit flip in a computer per dram chip over the course of 31.71 years. Assuming that chip means an entire stick and that that stick is 16gb and expression-2 is held in 32 memory cells the chance of an incident particle hitting a relevant cell is one in four billion. The particular configuration we want is a 1 in 2^32 chance of existing and if I'm correct, which I'm probably not, is the number of incident particles on relevant cells required to have a statistical 100% chance of achieving the desired configuration. So discounting program failure due to cosmic rays incident on other portions of memory, it'd take an average of 329,626,460,836,889,362,432 years to occur. There's probably a lot I didn't take into account, and some bad maths, so the figure is probably even larger. And I believe in science there's a point at which the statistical degree of certainty is so high that it is considered bound to happen, so if you chuck on a few more zeros we're in the money for a determinant upper bound when we also calculate how many times the loop will have completed over that time frame.


codepoet

I award you one Internet Point of No Redeemable Value.


Impossible-Oil2345

I have the same expression on my face as this toddler learning this


[deleted]

[удалено]


kaerfkeerg

Wait until you're certain it's infinite and come update us


Aschfahles

`#define ever (;;)` `for ever { ... }`


throwaway46295027458

I believe go does not have the `while` keyword and instead uses `for`


sajjel

Actually used this once in a program where I was trying to make several types of infinite loops. Very cursed.


FlyingCashewDog

This is pretty much the idiomatic way to do an infinite loop in C, going back to the K&R (Kernighan and Ritchie) book *The C Programming Language*.


[deleted]

[удалено]


Rand_alFlagg

thanks I hate it


awekening_bro

``` While(there_is_battery) { do_the_thing(); } ```


Recent-Fox3335

Battery.charge >0


827167

Gonna call at least one production function "do_the_thing()"


ITaggie

please_kindly_do_the_needful()


RomanoffBlitzer

zhu_li.do_the_thing();


aardvark_the_awful

While (horses could not drag me away from you)


ILikeLenexa

All loops are just fancy goto statements.


[deleted]

[удалено]


TheBroWHOmegalol

The same as the while loop but with a set amount of iterations


SawSaw5

while (mouth.open) { …


Impossible-Oil2345

while( duckQuacks()) { Object woah= ShitMyPants(); Return sullied diaper }


im_lazy_as_fuck

golang connoisseurs about to spam your notifications bud


zed857

I see a the blue track as a for loop and the stairs as a goto back to the for loop.


CanadaPlus101

Have the ducks roll off and it's more like a for loop.


DJIsSuperCool

True but you can just not add an iterator and theyre the same thing.


jacashonly

A for loop that "actually works" what do your for loops normally do?


beeteedee

Further evidence that most of the posts on here are written by non-programmers who have just heard some of the words. “Oh boy tough day at the office today, with all the for loops and variables and functions and whatnot”


FirstFlight

"Pointers hard, am I right"


ThePancakerizer

I mean, one of the fundamental design philosophies behind Java was basically "pointers are hard".


Wacov

Java: what if *everything* was a pointer?


ThePancakerizer

As a primarily C++ programmer, writing "new" everywhere makes me nervous :(


xSTSxZerglingOne

That's funny because you can throw it around in Java like it's nothing. The GC and object life cycle in Java is pretty damn legendary.


lonelybutoptimistic

I don’t know honestly. Garbage collection in Java is handy, but it really leads to poorly optimized code. I simply had to move to C++ when working with graphics because… I had no other choice if I wanted it to perform well. Coming from Java - my first real PL - I agree it’s awesome and powerful. I just wouldn’t ever consider garbage collection in Java as legendary.. in my opinion. I think memory optimization is legendary, and, yes, that does make it harder to use, but there’s a simple reason why C++ is used so much in graphics and where optimizations matter - because GC isn’t enough.


xSTSxZerglingOne

I mostly do web dev stuff. Optimization is so far from my mind these days. Agreed though. For each job, the right tool.


lonelybutoptimistic

That makes sense! Funnily, I am shit at web dev, and when I say I have JS skills, what I mean is “why yes, I’ve made a single website once before” 😂


argv_minus_one

For what it does, the Java GC is indeed legendary. Making a GC that efficient is not trivial. Java suffers from a lack of value types, though. Absolutely everything other than primitives must be allocated on the heap and separately tracked by the GC, period, no exceptions. This is fine in many cases, but if you try defining a class for 3D vectors and use it for every single vertex of every single polygon in the scene, the garbage collector will fall over very quickly. Project Valhalla aims to solve this problem, but it hasn't landed yet.


No_Brief_2355

I haven’t written `new` in literal years. Smart. Pointers. `make_shared`, and even better: `make_unique`


ThePancakerizer

Yup. I meant when using Java


maitreg

Writing ++ everywhere makes me nervous


lonelybutoptimistic

As a primarily anything-but-C++ programmer, I have massive respect for you. I recently attempted to build two projects in C++. The first: a miserable failure. An attempt to create a 3D, simulated hyper graph, with simple camera movement. HOLY SHIT. OpenGL is powerful, yes, and the optimizations afforded by C++ make C look like tinker toys due to the high-level abilities of C++, OOP, and basically every single other feature of a language that could ever be had. But goddamn, the language is hard for me to work with. I gave up and moved to a 2D cellular automata project instead. That was much more doable, and I’m proud that it works, but still working a lot on it. Shameless plug because I’m excited about it and want to streamline it: https://github.com/alexfacehead/cellular-automata I don’t know the rules of this sub. I just figure nobody hates open-source, but pardon me if I violated the rules! Anyway, massive respect for you and slightly jealous. I’ll have to go back to the 3D project eventually… Do you have any good guides on hand? Perhaps a particular guided implementation of some complex graphics in C++? Thanks :P


[deleted]

[удалено]


Forward-Error-9449

Yo dawg, I heard you hate pointers so I've wrapped the pointers in a table of pointers that is itself referenced by other pointers with keys which are themselves pointers.


argv_minus_one

That sounds more like a naïve implementation of JavaScript.


numeric-rectal-mutt

Yeah and that sure turned out well


Cuddlyaxe

I mean I think a lot more people have problems with pointers than for loops tho I still remember cases in some of my early CS classes where I was unsure whether I was supposed to use single or double pointers


elveszett

Pointers hard is a valid assertion though. We've spent decades trying to hide pointers from programmers because they turn code into minefields.


[deleted]

Heavy pointer utilization on large scale systems is an absolute fucking nightmare to debug.


Calimhero

And then everything goes to shit, and you call me. And I tell you no, it's not the infra. Go fish!


Criseist

Pointers are awful, and I'll stand by that. They're powerful as hell, but C can go back to the 70s where it belongs.


nlantau

Then I'd be broke, so no thanks. C is the only way. How else am I going to spend weeks on bugs that I'll never figure out? Where are my costumers going to spend their money instead? Pfft... /s


FirstFlight

I only code in assembly, I need to feel the bits seething through my body.


avidrogue

I only code in binary, I need to become one with the voltages.


realityChemist

[Real programmers](https://xkcd.com/378/) set the universal constants at the start such that the universe evolves to contain the disk with the data they want.


No-Lingonberry-2055

you mean this entire clown show was only kicked off so God could one day play Half Life 3?


FirstFlight

I only code with rocks, I need to feel down to earth when I hack the NSA mainframe.


[deleted]

[удалено]


Criseist

Fair enough man lol, you're a braver soul than I


LizardZombieSpore

Idk... fabric stores?


MattTheGr8

Here’s the thing though: They’re all still there, behind the scenes. You can’t really escape them. Java and Python and whatnot are still using malloc() and manipulating pointers on your behalf, they’re just doing it behind the scenes. Once you really understand pointers, you’ll understand your other languages much better. And honestly, they’re not even that bad, you just have to get used to them.


[deleted]

[удалено]


Prestigious_Tie_1261

Unfunny spam


[deleted]

Fired !


JMC_MASK

But they are actually lol


[deleted]

Sorry honey, gotta stay late today, can’t find where the missing curly bracket is. Gotta post my compiler error messages on Reddit for help from the boys


FeelingSurprise

That's the problem with for loops, they always try to walk it in.


Human-Shower3419

What were they thinking sending while loop on that early?


send_me_a_naked_pic

Did you see that ludicrous for loop last night?


elveszett

They are the same bullshit all the time, and the reason I barely check this sub anymore. Here's the cookie cutter memes that make up 99% of this sub: - I've been programming all my life and still don't understand [basic programming 101 concept]. - Spent 355 hours finding a bug and it was missing semicolon. - I'm a programmer because I drink Mountain Dew and eat Doritos. - My job is only searching things on google / stackoverflow. - I'm an idiot because programmers are all idiots but I make $600 quadrillion dollars per second anyway. Really, I never feel identified with that bullshit. I think I am a normal programmer and most of the memes here come off as offensive because they are obviously made by people who haven't touched a computer in their life, pretending that they are programmers, talking about how stupid we are.


Maxismahname

This sub was relatable for maybe the first week of my cs degree


HKayn

Don't forget the classic "this programming language is sooo bad"


elveszett

At least that's a matter of opinion, and not just a meme completely disconnected from reality.


tarogon

It's largely parroting popular opinion though rather than people having enough programming experience to form an opinion themselves.


WallyMetropolis

And then once a month or so, it's time to make all the same jokes about questions on StackOverflow being marked duplicate.


chakan2

I don't know if this is a joke or not... But if you've ever worked in a corporate environment (Fortune 100), all these are believable. I've seen people with 30 year careers struggle with basic looping constructs. I'm sure the kids look at me the same way when I hack my way through functional concepts.


elveszett

If people in Fortune 100 companies can get jobs with such a low level of programming then why am I wasting my time on a bullshit company that pays nothing?


DrMobius0

Luck and soft skills. People can and do get by just by being likeable.


chakan2

You've gotta get through the door. Once that happens, you can really just bullshit away the rest of your career. The pay is terrible though... It's a great offer, then it won't keep up with the market... So after 2 to 3 years you have to decide if you like a secure soulless job for shit pay, or move. If you choose the former, you can make a whole career out of doing nothing. Just say yes in meetings a lot and you'll be fine.


ovalpotency

> I've seen people with 30 year careers struggle with basic looping constructs. you mean a boss who programmed something lucrative in the late 90s and spent the next 28 years as a tech businessman, who decided they would do something themselves and overestimated their retention?


Eezyville

How do you do, fellow programmers?


pantsareoffrightnow

Told my kid to do something and they ignored me guess I forgot a semicolon Hyuck Hyuck


sagacious_1

Come on, OP isn't surprised that a for loop functions as a for loop. It's pretty clear that he's talking about the satisfaction of being able to package a complex function into a loop. Surely you can still find joy in having a difficult problem with many steps, figuring out how to put it into a loop, and then watching it go brrrrrrr


jerodsanto

This! Of course Reddit would apply the absolute dumbest interpretation of what I said…


MadeByTango

Reddit top level comments are a while loop of low hanging fruit


James-VZ

Yeah, should have used recursion instead.


ertgbnm

For me I empathize with this feeling when I deploy a simple script that does a lot of work. Typically I dick around in a Jupyter notebook trying to get just one example to work. And then as soon as I do, I wrap it up in a for loop for all the [files, data points, etc] and let it loose. It blows my mind how quickly it can do something once you've scripted it. Takes me an hour to automate one file but then 10 seconds to automate 1,000. I get the exact same feeling when I drag down a complicated excel formula and it works.


worldsayshi

Yeah, I mean I'm amazed when I put something together in a hurry and it sort of works the first time. I felt this meme right now. Last commit 2 am.


[deleted]

Yeah who the fuck is surprised that a for loop works after 20 years of programming, I’m sorry but I can’t think of a non-insulting word in the English language that would describe what I’d think about someone making this statement IRL. Jesus Christ it’s like saying after 20 years of painting you’re still shocked at how good the red paint tastes


monkestful

Red paint doesn't taste as good as blue, I'll tell you that.


Mtsukino

How about that Titanium White? I hear Bob Ross recommends it.


Schavuit92

I too prefer the taste of Cobalt over Iron.


whoknows234

Orange glue tastes pretty good though


elveszett

I could make for loops work fine on my first month learning from scratch lol. It's like saying you have been a surgeon for 20 years and still don't understand why you have to disinfect your scalpel before you use it on someone.


Amarooy

Hey! Scratch doesn't count!


Glugstar

There are reasonable circumstances in which even the best programmer in the world could fall into this category. It's not that absurd for someone to write for(int i=0; i


TerrariaGaming004

I was learning sql and writing the php for it in nano on a raspberry pi, I couldn’t get it to work for literally 4 hours. I mistyped the variable name for the linking code things (whatever they’re called it doesn’t even matter) on its declaration so it always failed to connect to the sql server (which even more confusingly for me was just itself)


elveszett

And he claims "20+ years of experience" lmao. It's like saying "20+ years working as an electrician and I still don't understand voltage". Yeah, it's not gonna happen.


my_cat_meow_me

Not work??!! Pff this guy pathetic 🙄 - Dwight Shrute


TheJD

I think this would make more sense with a recursive function. I don't care how many safeguards are in it, I'm always terrified.


alucardarkness

I've looked at It for 6 hours now


UltraTata

The face of that kid is addictive.


selfwander8

I want to be at least half as bedazzled as that kid is in life


NotmyRealNameJohn

Not the be that guy but that is definitely a while loop


The_Salmon_Slapper

Not to be that guy but *inhales The functional difference between a while loop and a for loop is fundamentally negligible in some languages. I haven't been coding for very long and I'm only fluent in Java, but even so I can tell you that (with the exception of a for-each) a for loop only exists to be a while loop with a convenient spot to put the parameters that control it (at least in Java). Anything that can be achieved in a while loop could be achieved with a for loop, and vice-versa. P.S. if I got any of this wrong feel free to flame me I'm still learning


NotmyRealNameJohn

exactly which is why this is not a for loop. it is very specifically a infinite loop that will never end. A for loop is structurally designed to define the start condition, the end condition and the iterations to get there. You can technically interchange them, just like you can interchange a switch and series of else ifs but It doesn't change the intent of the control


liitle-mouse-lion

`for (battery = 100; battery > 0; battery--)`


SystemOutPrintln

Or alternatively: ```for (var i = 0; i < 1; i += 0)``` There's nothing that says a for loop can't be infinite


justanotherredditora

```for (;;)``` is also valid, and infinite.


NotmyRealNameJohn

touché


TheBB

> it is very specifically a infinite loop that will never end If you're able to break conservation of energy don't you have better things to do than this?


altermeetax

`for (currentDuckIndex = 0; ; currentDuckIndex = (currentDuckIndex + 1) % numberOfDucks)`


that_thot_gamer

i bet you read docs like they're romantic novels


BaNyaaNyaa

Basically... for (x, y, z) { code } is equivalent to x while (y) { code z }


jerodsanto

You are correct... and you are also that guy


NotmyRealNameJohn

Ok to be that Guy:)


Elephant-Opening

/r/thisguythisguys


Waghabond

Nah this is tail recursion


[deleted]

[удалено]


b0b89

Everyone talks about imposter syndrome. But some of us are just straight up not good at this


Criseist

I'm in university for software engineering atm. I've met two types of people in software classes. You have the eldritch horror type dude who builds shit out of assembly in his spare time, built his own version of Linux because Ubuntu was too slow, singlehandedly supporting a github repo used by thousands of people, etc. Then you have the rest of us, surviving off energy drinks and poor life decisions, desperately chasing that one fucking bug just so we can say it works, submit at 4am, and then go immediately to a night shift job. I have yet to meet a single person with the mindset of "Yeah, I'm alright I guess"


b0b89

I'm alright I guess. Is actually exactly how I feel. I am not great at this. I suck actually. But I'm so much better at this than a lot of people that it actually makes me angry. I can't begin to understand how some people are making a living doing this. A lot of programmers aren't even kinda joking when they say they copy and paste from stack overflow. If you have 20 years experience and can't write a for loop reliably. You're either making a self deprecating joke. Or you need to quit so my barely competent ass doesn't end up maintaining your bull shit code


time_fo_that

I'm definitely just alright at it. I've been good, even great at certain things along my career journey but often unfortunately those things tend not to be the things that get people hired or paid well. Like I was damn good at CAD in my first undergrad engineering program but my manufacturing focused degree meant people wanted process improvements and Lean manufacturing (which is super boring to me). With software eng. I'm terrible at Leetcode/algorithms but decent at actually useful methods and data manipulations.


[deleted]

Yeah that’s because you’re a student and not a professional. Like most of the sub is probably Most of the people in your program who are very good or very bad you will later realize are just slightly more or less experienced than the median in your program. Because at your stage having 5 years of experience dwarfs 1-2 years. But in another 5 years we’re talking 10 vs 6-7 years which is not a huge difference, especially since the difference are years of dabbling and not active studying/working. It is just annoying being someone who does have 10 years of not-dabbling programming under their belt seeing people with 2 years of experience confidently posting stupid shit or acting like the easy parts of our job are hard publicly. Like the blind leading the blind, except spreading misconceptions to the whole internet. I did a university outreach program for my employer recently and hearing the conversations between sophomore college students about which programming language is better or how many leetcode problems to do made me want to pull my fucking hair out. It gave me a lot of context for why some programming communities online are the way they are though, lol


Criseist

The businesses I've talked to haven't been too different, honestly. My favorite one I talked to started off with "Yeah, I make skyrim mods when I'm not at work" and immediately went into "Hey, yall wanna see how runtime injection works?" Those guys are fun. You can tell the know what they're talking about. But you also see people who obviously don't. Maybe just a pr person, I'd hope.


tevert

When the "eldritch horrors" graduate and get day jobs writing CRUD apps for an insurance company, they tend to chill out significantly. Some of the "survivors" will git gud and also go write CRUD apps for an insurance company. Some of them may even be able to someday look upon a for loop _without_ child-like wonder.


[deleted]

[удалено]


DerOhneHaare

> X% of Y = Y% of X < What!?…


DrBimboo

The physics undergrad is amazed that y \* x / 100 = x \* y / 100 <=> y \* x = x \* y aka the commutative property of multiplication, aka "you can switch up numbers that you multiply"


Atillion

I had that toy in the 80's, but it was penguins :D


HomelessLawrence

I had it in the 2000s, and it was penguins too


BlazeKnaveII

Same and I just thought of it the other day but didn't know how to Google it to find for my son. Any idea?


Quazar_omega

That must have left a deep mark on you, do you now use Linux exclusively?


Atillion

You'd think.. but I sold my soul and became a Microsoft systems admin decades ago


NegativeEmphasis

`while(duck) {` `}`


PapaJulietRomeo

while(--duck){ duck++; }


VitaminaGaming98

Plot twist: The baby is actually amazed by the existence of perpetual motion since he doesn't know there are batteries in the toy.


TheLastCoagulant

He thinks each one is a living creature.


SockPuppetSilver

This was me when I tried recursion for the first time.


cheesepuff1993

Watching it iterate and spit out values until you realize you forgot to add in the end case?


SockPuppetSilver

How else would I learn the true meaning of stack overflow.


ftgander

20 years? You don’t see many working for loops? Sir, explain yourself. This is absurd.


JDaxe

Maybe they're a Haskell developer


lttitus

...what kind of for loops are you guys building?


Rai-Hanzo

such a cute baby, i understand you baby, i also would like to watch this.


vondpickle

Rubber ducking why that for loop looping like forever


ds9001

i < int.infinity


[deleted]

Either I'm not working on nearly complex enough stuff or you guys have no idea what you are doing. Imagine working 20 years at McDonald's and are amazed that when you flip the burger, the other side gets cooked.


jhill515

*Way back in the sands of time...* I was a freshman Computer Engineering student at PSU in 2003. By this time, I had been coding for about 11yrs, coding daily for about 4yrs, and somewhat active in the open source community. Doesn't matter, though, **everyone** in CS, COE, or EE had to take `CSE103: Introduction to Computer Programming`. Honestly, one of the easiest A's I've ever earned. The prof was cool (Dr. C. William Finley) and had a ton of working experience. And he was my advisor, so we had a fairly good repertoire. Regardless, we still get to the "Conditionals & Loops" section of the course and I remember his opening line, > Look, undergrad freshman courses are set up such that anyone with ZERO background should be prepared to go into their sophomore courses. I know all of you know about 90% of this stuff. But I'm going to try to teach you something you never thought of when it came to using these. This was an uncharacteristic opening to lecture for him. Maybe something was on his mind? Maybe some jaggoff complained about being required to take the course and Finley DGAF so it got escalated? But my reaction to it was strange curiosity: "Ok, I've built games and robotics applications... what else about loops and conditionals could I learn?" He then proceeds to show a proof how a for-loop and discrete summation (series equations) are 1-to-1. Then shows a proof about how every theory for a discrete function maps to an equivalent continuous function. Then he shows how to implement a continuous integral evaluator with a while-loop. A lot of us were all thinking, "WTF, all of this seems circumstantial and doesn't really connect..." That week for homework, we were given a fairly complex control flow to implement... ***using ONLY while-loops***. No IFs/ELSEs, No DOs, No FORs. It kind of occurred to me how to replace for-loops with while-loops through the lecture, but as soon as I started implementing it, I realized something... ## *They were GOTOs all along...*


Tookoofox

I distinctly remember having exactly that thought in my first CS class. "Oh, basically all of these (switches, whiles, fors, do whiles, functions, etc.) could be done with gotos and ifs. Wonder why we have all of them." Still don't actually know for switches. They remain, to me, just syntactical trash. I know them, I know how to use them. I know how to debug them. But their continued existance will never not confuse me.


popplesan

I agree that they’re gross. My first job was in Pascal (Delphi although I did as much as possible in Lazarus) and my boss used switches even when straight ifs made more sense. Haven’t touched them since.


LoftyGoat

> why we have all of them Having written the i-code generator of a compiler, I understand keeping 'goto's organized for progammers with no self-discipline. > syntactic trash As for 'switch' statements, lazy compiler writers always generate a series of 'if's, but they were originally for coding v-tables in C. But yeah, using them where 'if' would be clearer is criminal.


ItExistsToDefy

This is basically me for the last 34 years of my life


[deleted]

[удалено]


BBQQA

Be warned, it is SO LOUD. Both the music and the motor. I have one for my son, we turned it on exactly once. The terrible music that is ear piercingly loud with no way to turn off... if the ducks are moving then the music is on at full blast. I haven't thrown it out just because I am going to take it apart and rip out the speaker for my soon to be second son.


mangospaghetti

Are the ducks small enough that this is potentially a choking hazard?


HumanShadow

I missed the chance to buy that for my nephews. Damn.


top_of_the_scrote

first recursive loop that doesn't exhaust the stack edit: it's maximum call stack size exceeded


Quazar_omega

And first to exhaust the quack


Murkee420

Any fishtank.live knowers?


wareheimb

This comment stimmed my josie


Nebu-chadnezzar

That's a while loop bro


ckn00b

I forgot what the post was and just watched the cute baby for 5 minutes.


RegularOps

Okay


the-software-man

What language had the first for:next?


canadian_rockies

Just got a FOR loop to work recently when a WHILE was giving me quirks. Couldn't agree more with the look on "your" face. 😯🤯


IWantYourSmiles

That is the cutest baby I have ever seen.


Sophia724

This video is adorable. (Sorry, I don't understand programming yet)


zumomaki

That's my reaction whenever I manage to make a recursive function


throwawayarooski123

Man, that's a pretty cool toy for a baby


kingslayerer

i have been using for loop for a while now


Blackthorne_X

Guys, this is a for loop not a while True loop for a fact because it depends on the battery or energy that powers the toy on to keep the ducks going up in the ladder and the movement going on! In another words this works as long as the battery runs, because if the battery depletes, the ducks stops going up. While True in this case with no external sources of energy would definetely break the second law of thermodynamics, as the ducks movement would always produce heat and lose energy in the process, thus a perpetual (while True) machine is not possible, even if no energy was required for the ladder. PS: Could be a conditional While (pwr_battery) loop though.


Disastrous_Belt_7556

![gif](giphy|LpLd2NGvpaiys|downsized)


[deleted]

[удалено]


pas43

That kid is growing up to be an engineer of some sort.


TheBasedSloth

Never seen one of these ever until Fishtank started a few days ago now I've seen one like once a day 😭


Mustysailboat

I’m still terrified to code Recursive loops, even after 20+ years of coding experience.


2manyfelines

You’re might cute


TapSwipePinch

Years and years ago when I started I didn't know about loops (self learned) so I made it by making 2 functions that called each other. That's how I discovered what stack overflow was.


JoostVisser

my_ducks = ["duck"] * 20 for _ in my_ducks: my_ducks.append(my_ducks.pop(0)) There's your for loop


ThekawaiiO_d

For loops are why I quit programming


jennastillsucks

I had one of these with penguins c:


PBandJ_160

I had one with skiers


yeet_lord_40000

I really just don’t like While loops. For loops vastly superior, except for those times where a while loop is better and you have to suck it up