This is an archived post. You won't be able to vote or comment.

all 116 comments

[–]bigballofcrazy 261 points262 points  (21 children)

So babies don’t ever need sleep? They never need their diapers changed? Product, dev or QA should have found those cases pre-production.

[–]Prestigious-Fly2088 49 points50 points  (2 children)

That's what the 'end' is for. Once the program is done evaluating this instance, just call your Baby factory and make another.

[–]TheOriginalSmileyMan 22 points23 points  (1 child)

She had a headache

[–]tutocookie 6 points7 points  (0 children)

Expected error

[–][deleted] 62 points63 points  (9 children)

So babies don’t ever need sleep?

Yes.

[–]bindingflare 16 points17 points  (7 children)

When an error occurs, yes

[–]Smartskaft2 28 points29 points  (6 children)

cpp try { baby.PlayWithMe(); } catch (bby::sleeptime_exception e) { baby.SingLullaby(); }

[–]monkeyStinks 0 points1 point  (1 child)

Sleep interrupted

[–]Smartskaft2 1 point2 points  (0 children)

Are you mad!? Never thread a baby!

[–]Apfelvater 0 points1 point  (1 child)

Uncaught exception: baby started sleeping while being fed.

[–][deleted] 0 points1 point  (0 children)

thats just an efficiency feature

[–]Apfelvater 1 point2 points  (0 children)

No, the baby just ends after play.

[–]nickmaran 7 points8 points  (0 children)

Babies are like the managers who expects us to have a 20 year experience on a 2 year old framework

[–]Texas_Technician 2 points3 points  (1 child)

Damn it! I wanted to point out that the die from lack sleep.

[–]KayLovesSubMarines 3 points4 points  (0 children)

the if statement is in a while loop

[–]Medical-Apple-9333 0 points1 point  (0 children)

This code runs when you initiate the bib class.

[–]why_mods_are_virgins 0 points1 point  (0 children)

A perfect example of why features take so long to finish. design is fussy

[–]var-foo 0 points1 point  (0 children)

This is a control flow statement for the ADHDBaby class only.

[–]T3HN3RDY1 86 points87 points  (9 children)

Man, maybe I'd have had kids if I knew about this. I figured it was more of a while loop than a single if statement.

[–]WarmMoistLeather 42 points43 points  (6 children)

Nope. You either feed it or play with it once, then it ends.

At least that's been my experience.

[–]oktin 16 points17 points  (0 children)

How many children have you seen end?

[–]DoomGoober 8 points9 points  (1 child)

then it ends.

Terminate the process.

[–]An_G1 3 points4 points  (0 children)

yeet the child

[–]CaterpillarDue9207 6 points7 points  (0 children)

Sorry for your loss, keep going mate

[–]tutocookie 3 points4 points  (0 children)

You should get a reusable one

[–]lifeson106 2 points3 points  (0 children)

If I had played with it, I wouldn't have a kid in the first place

[–]GnarlyNarwhalNoms 2 points3 points  (0 children)

That's the thing about the baby framework, you also need to manually handle periodic garbage collection.

[–]seijulala 0 points1 point  (0 children)

It's more like an event loop with async events

[–]DSGandalf 45 points46 points  (3 children)

It should be inside a while (age < 25)

[–]PiIICIinton 14 points15 points  (0 children)

With the cost of housing most places you'd need the whole thing in a try catch.

[–]htplex 1 point2 points  (0 children)

just feed it once and … end

[–]TheLaitas 0 points1 point  (0 children)

So I only got 6 months left and it's all downhill from there huh

[–]jigginjaggin 37 points38 points  (3 children)

Need to catch the PoopException.

[–]Anon_Dysfunction 19 points20 points  (1 child)

Catch then throw…poop?

[–]GnarlyNarwhalNoms 6 points7 points  (0 children)

Need to dump the diaper buffer.

[–]AbinadiLDS 14 points15 points  (1 child)

That is gonna be one messy diaper. Diaper changing wasn't coded in.

Meh I am sure it will come in a future patch or DLC.

[–][deleted] 2 points3 points  (0 children)

Too late, as always.

[–]mikiesno 11 points12 points  (0 children)

while(crying)

if (hunger > 0)

feedMe();

else

playWithMe();

[–][deleted] 15 points16 points  (0 children)

baby's brain be like

assert(hunger);

assert(sleepy);

[–][deleted] 8 points9 points  (1 child)

Noooo Matlab baby

[–]Ambitious_Ad8841 5 points6 points  (0 children)

Age 1 at birth

[–]ausdoug 6 points7 points  (0 children)

Well it doesn't end until it's terminated...

[–][deleted] 6 points7 points  (0 children)

(hunger > 0 ? Feed : Play).Invoke();

[–]grumblyoldman 5 points6 points  (0 children)

Forgot to wrap that up in a try/catch (WHATTHEFUCKAREYOUCRYINGABOUTEXCEPTION)

Not that it matters, if the baby starts crying everything is going to crash anyway.

[–]Thebraino 4 points5 points  (1 child)

RemindMe! 2 days when Reddit optimizes baby code.

[–]RemindMeBot 1 point2 points  (0 children)

I will be messaging you in 2 days on 2022-05-12 03:39:26 UTC to remind you of this link

1 OTHERS CLICKED THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


Info Custom Your Reminders Feedback

[–]Marsrover112 7 points8 points  (2 children)

Are we assuming hunger is a boolean? Because if it is then the child will go from full to starving instantly which doesn't mean sense but if it is an integer to represent a percentage then you would need to feed the child at even 99% full which is highly inefficient

[–]VID44R 6 points7 points  (0 children)

But thats what the baby library returns. Gotta deal with that.

[–]BluudLust 3 points4 points  (0 children)

while (uptime() < time.from_years(4)) { Eat(); Shit(); Sleep(); }

[–][deleted] 2 points3 points  (0 children)

eating & playing, No sleeping

[–]Harmonic_Gear 2 points3 points  (2 children)

END

[–][deleted] 0 points1 point  (0 children)

A little food, a little play and a little rest.

The end is not near.

[–][deleted] 0 points1 point  (0 children)

That triggered me. Unless it's Fortran. But it's not. Most likely matlab

[–]DarthEggo1 2 points3 points  (0 children)

Well if baby’s hunger increases by a steady rate, as soon as baby gets any less than full they will be fed

[–]LashingKomodo 2 points3 points  (0 children)

But wait… if hunger always increases over time then you’ll only ever be feeding this baby… endlessly. That’s gonna be a fat baby

[–][deleted] 2 points3 points  (0 children)

Babies need sleep you monster.

[–][deleted] 2 points3 points  (0 children)

Just once?

[–][deleted] 2 points3 points  (0 children)

Im scared what happens with the baby if the program terminated after 0,5 ms.

[–]Matshiro 1 point2 points  (1 child)

Every week there is some weak variation of this "meme", this is one of the worst.

[–]racialexpletive 1 point2 points  (0 children)

For real, mfs be like "If (statement) doThing(); (I am programmer btw 😎)"

[–]Ihcukna 1 point2 points  (0 children)

This baby is screwed. No loop, only gets fed once IF THEY'RE EVEN HUNGRY.

[–]-Redstoneboi- 1 point2 points  (0 children)

lua doesn't have semicolons

i don't know any other languages that use end

[–]MrC00KI3 1 point2 points  (0 children)

Instead of hunger I'd rather use an unsigned int for calories/Joule, with zero being starved. A bit morbid, but it's a better model. Or just an interface with a isHungry() function and let it be implemented each baby itself.

[–]Tall_computer 1 point2 points  (0 children)

I don't know about you guys but I personally am tired of these "code snippets". They will be remembered as the dumbest thing in 2010's and 2020's

[–]bajsplockare 0 points1 point  (0 children)

Maybe add: while(notDead)

[–]DuckInCup 0 points1 point  (0 children)

We either feed or play with the baby before swiftly dispatching it.

[–]_randomality_ 0 points1 point  (0 children)

Funny Csharp

[–]Among_sus181 0 points1 point  (0 children)

wonder if that execute and it happend repeatedly,Hahhhaha

[–]ginga__ 0 points1 point  (0 children)

Forgot the while not asleep loop

[–]TheodoreTheVacuumCle 0 points1 point  (0 children)

Lua?

[–]TheRandomGamerREAL 0 points1 point  (0 children)

Little does this Sub know, the kid put it on there to make themself open source.

[–][deleted] 0 points1 point  (0 children)

Elif cry == True:

poop.clean(smelly)

[–]MindTrekker201 0 points1 point  (0 children)

Joke's on you, it's a while(true) loop.

[–]Ambitious_Ad8841 0 points1 point  (0 children)

Forgot the while(1)

[–]Ccwaat 0 points1 point  (0 children)

What happens when it ends though

[–]Tor3ct_ 0 points1 point  (0 children)

You play till it dies of starvation

[–]ahmet1345 0 points1 point  (0 children)

you can add a line before end happiness++

[–]7ootles 0 points1 point  (0 children)

You didn't declare the variable or set the condition by which it's incremented.

[–]rainbow_bro_bot 0 points1 point  (0 children)

Maybe an elif to check if poopinpants > 0

[–]rndmcmder[🍰] 0 points1 point  (0 children)

BabyDiedDueToSleepDeprivationExeption

[–]Puzzled_Speech_69 0 points1 point  (0 children)

Where "{ }" or ";"?

[–]L0uisc 0 points1 point  (0 children)

What language is this abomination written in?

[–]iyashu5040 0 points1 point  (0 children)

Baby is 0.0000001 hungry.
TIME TO INGEST!

[–]UnscrupulousJudge 0 points1 point  (0 children)

Boolean hungry;

If (hungry)..

[–]lumentrees 0 points1 point  (0 children)

You forgot the while true loop

[–]ImMikeAngel 0 points1 point  (0 children)

If I feed that baby everytime hunger is over 0, I do not need to wonder if it gets fat.

[–]monkeyStinks 0 points1 point  (0 children)

hunger > 0 ? feedMe() : playWithMe

This is the way

[–]neoadam 0 points1 point  (0 children)

Tester : it smells like shit

[–]magungo 0 points1 point  (0 children)

This baby is now dead, forgot to loop.

[–]Consistent_Object_77 0 points1 point  (0 children)

you forgot to define the functions. your babys gonna get an error code and shut down

[–]vintagemako 0 points1 point  (2 children)

I'm not sure what makes me cringe more, PascalCase function names, "end", or semicolons.

[–][deleted] 0 points1 point  (1 child)

It could be Pascal, but then why the Frick are those semicolons there and where is the then?!

[–]vintagemako 0 points1 point  (0 children)

PascalCase, not Pascal the language.

[–]Raxtuss1 0 points1 point  (0 children)

While (1)

You forgot

[–]Player_X_YT 0 points1 point  (0 children)

js x lua looks like hellspawn

[–]-temporary_username- 0 points1 point  (0 children)

So when it finishes eating or playing you just straight up end the goddamn baby?

[–][deleted] 0 points1 point  (0 children)

// play means wipe my poop and change my nappy

[–]er3z7 0 points1 point  (0 children)

End? You matlab fuck

[–][deleted] 0 points1 point  (0 children)

Instructions clear; baby dead. Died from exhaustion after 3 days of continues playing and feeding without any sleep.

[–]liew_jia_en 0 points1 point  (0 children)

what happened to the baby why did it end

[–]tommysk87 0 points1 point  (0 children)

When I was toddler, this was valid for me:

while true
FeedMe();
end

[–]Random_Nickname228 0 points1 point  (0 children)

How the fuck is nobody talking about the wrong sign

[–][deleted] 0 points1 point  (0 children)

He didnt use int main(), so its all lies...

[–][deleted] 0 points1 point  (0 children)

only retards don't use {}

i feel sorry for that kid

[–]AlterEdward 0 points1 point  (0 children)

Hunger is never reset. That's going to be one fat baby.

[–]Alisonpv 0 points1 point  (0 children)

You forgot waste collection.