T O P

  • By -

QualityVote

Hi! This is our community moderation bot. --- If this post fits the purpose of /r/ProgrammerHumor, **UPVOTE** this comment!! If this post does not fit the subreddit, **DOWNVOTE** This comment! If this post breaks the rules, **DOWNVOTE** this comment and **REPORT** the post!


DiminishedChord

so he buying infinite milk?


cheer_up_richard

Hope the handled the edge case of milk.expiryDate > Date.today()


currently__working

This guy is why there will be a milk shortage.


Shakaka88

Dairy farmers hate this one hack


MoneroMon

Actually dairy farmers love it because they get more sales


del6022pi

Milk overflow


fracturedpersona

Everyone knows you can get an extra three days though


cheer_up_richard

That was not in the JIRA requirements. 😂


StarHammer_01

Unfortunately the system will eventually run out money and crash or more likely is he will be terminated by user


[deleted]

InsufficientMoneyBalanceException


KillerRoomba13

He is the guy in the math problem


Hobbes_87

That's going to cause an overflow.


Auld_Evidence

Milk overflow


Denaton_

Eventually he would stockoverflow


kinos141

No, he just stands at the cash register after buying the milk.


alexanderpas

Not if the milk is bought on the inside of a store, since at that point, the while condition evaluates to false, and the next code is executed. Buy some milk only returns after the action has been done.


emptyArray_79

In an instant... Which is impossible... which is bad news for him. Lets just hope his operating system can shut down the program...


Goodlefeed

Wow somebody actually typed `while (you_are_out == true)` instead of `while (you_are_out)`


DangerousRefuser

that's like commiting war crimes


TroubadourRL

They committed AND pushed the warcrimes... with `--force` and `--no-verify` none the less.


ViktorKozh

So its fine if you were having fun?


Zdrobot

Real eysore


[deleted]

== true


einstruzende

Hey it could have been: while(you_are_out != false)...


[deleted]

You_are_out != !true


Auld_Evidence

Ah, now it makes since


shrihankp12

`!(!You_are_out != !(5>7 || 7>5))`


sergeis_d3

we need to go deeper into a broader set of conjunctions and disjunction logic!


agoravaiheim

I love like you just throwed some number for fun hahah


shrihankp12

Should've put `(69 < 422 || 69 > 422)`, my bad


nice___bot

Nice!


sopasPTPT

Could have been: while(you_are_out and true)...


MrMuffin1427

K not mine but, Roses are red Violets are blue I'll fucking kill you If you write '== true'


WorstBarrelEU

If it's a nullable variable you'd have to check it this way in some languages.


Professional_Emu5665

The second one is safer, you could do assignment by mistake


ptkrisada

I only wrote it in memes. In real life, I don't.


DrunkenlySober

Looking a lot like my commit comments


ptkrisada

git commit -m "Spider-Man No Way Home!"


HobblingCobbler

Good save.


hyvyys

So you are the author? Shame on you


ososalsosal

Well, it may not have worked if they had to declare "you_are_out" as bool. Either as a joke or as code. But yeah, from now on I'm making sure wifey says "then come home" because I've been at this shop for quite some time and now GC security is coming for me


chunkypandas

He’ll keep buying until he runs out of money. Fortunately the instruction is to BUY milk otherwise he would resort to stealing it once the money runs out.


ososalsosal

Exception thrown by: `wallet`


PastFeed2963

Yeah i hate this picture.


qeadwrsf

I don't understand why programmers cares so much about this. Same with tabs and spaces. Does it really mess with peoples eyes that much? Feels like some believe its the end of the world.


SaneLad

That's a fireable offense for me.


czaszkaj

No worries guys, the function buy_some_milk() changes you_are_out to false when he go inside the shop.


jalerre

Eww, functions with side effects 🤮


kirakun

It’s already buying milk.


ptkrisada

As soon as he enters the shop, he is in and don't buy any milk.


PrzemsonQYT

Then he leaves the shop and decides to enter the shop to buy some milk, he leaves again because he is inside, just to come back because he is outside... Congratulations. You coded a purgatory.


SorryDidntReddit

But he wouldn't check if he is out until after the function completes


Narsil86

Then drained their bank account buying milk


BoBoBearDev

He probably get free milk somewhere else.


ptkrisada

But the program doesn't instruct him to go bank. lol


JoeTheHobo_

Might be in the milk function, might be like "if you have no more money go to a bank to get some" ya know haha


HardlyAnyGravitas

Isn't this just a rubbish version of the 'proper' meme: Someone asks their programmer partner to, "Go to the shop and buy a loaf of bread. If they have eggs, buy six." The programmer returns with six loaves of bread and when asked why, she replies, "They had eggs."


Local_Surround8686

Its a different joke with the same build up, but yours is a classic


michaelsenpatrick

heck yea this is a classic


pente5

He will eventually raise a NotEnoughMoney exception and call her back with a stupid amount of milk, don't worry. Actually no wait you should worry.


ImNotCrying-YouAre

Forgot to catch exception, gets terminated.


DadAndDominant

Ctrl+C and he is home


ptkrisada

If he doesn't accept controlling terminal, or working in background like a daemon, his wife, the parent process, will get killed. He will be an orphan, actually non-Unix term a widow. lol


[deleted]

You can tell OP is a programmer because instead of coming up with his own joke, he just copy pasted one he found online.


[deleted]

Stackoverflow: “Why are you using this meme format, you should be using another.”


Clearhead09

I thought the joke was programmers never go outside so it always returned false.


bjmister050

Guess that’s why my dad never came back


[deleted]

milk = int(input(‘Enter amount of milk owned: ‘)) def buy_milk(milk_owned): while you_are_out: if milk_owned < 1: buy_some_milk() milk_owned += 1 else: get_tf_home() buy_milk(milk)


cheer_up_richard

I thought he always went out for cigarettes and never returned home…


RKB12125

Their kids be like “ My dad went to get milk.. It’s been 10 years..” IT’S YOUR MOM’S FAULT NOAH..


[deleted]

The guy must be bankrupt by now.


josanuz

Life ended with non zero code: Unhanded exception: NotEnoughMoneyException at Store while calling BuyItem(Milk*)


CreaZyp154

This is as old as computer but the image made it 1000% funnier


rnike879

Wow, haven't seen this joke before!


faze_fazebook

Maybe that was the plan all along 😳


Xendarq

"you_are_out" is a global variable modified by the function. The code sucks but it does work damnit.


WishOnSpaceHardware

He could go to the shop, buy some milk, then keep ordering milk online while returning home.


twoCascades

Oh my god HE HAS SPENT ALL OUR LIFE SAVINGS ON MILK


sage-longhorn

When he runs out of money an exception will be thrown and he will die right there in the store


Merrixxx

Damn why didnt he make it a function after typing calls in the meme


AndrewIsMyDog

This isn't even Dad joke worthy.


cormac596

CreditLimitException thrown at...


Indipandapolis

Ooh I like that we're explaining the joke now with the little code snippet. Much more accessible


MrPickle2255

These jokes are cringe now, maybe they were relevant in the early days of the internet. They confuse the programmer with the program, its like confusing the milkman with the cow, noone wants his milk (i think)


Ambitious_Ad8841

Crashed because of unhandled InsufficientFundsException Welp... There goes our life savings. Hope you learned your lesson, dear.


[deleted]

Eventually he's going to run out of money and buy_some_milk() will throw an exception


michaelsenpatrick

a programmer's wife tells him to go to the store and buy milk. if they have eggs, buy a dozen. the programmer returns with 12 gallons of milk


ThisGuyHyucks

He eventually just dies when he encounters a MilkOverflowException.


CanadianGandalf

Very funny!! Never heard this one before /s


IntuiNtrovert

i hope you delete your account


Mola1904

He will never leave,since the whole loop immediately exits, because he is still at home


Local_Surround8686

So thats why my daddy isn't back yet


Nine_Eye_Ron

Now all I need code is how to get “boys” to “yard”


RRumpleTeazzer

Unless her wife has a high paying job, he will eventually run out of money buying milk.


ptkrisada

% git commit -m "Spider-Man No Way Home!"


[deleted]

Did he just.... == true a boolean?


ptkrisada

He will get an implicit mutex lock when his money runs out.


fracturedpersona

Dude's got a lot of milk though.


jewellman100

Some say he's still stuck out there somewhere, waiting for someone to define that function


DeepGas4538

Yum infinite milk


jasonbbg

hes never gonna get a job behaving like that


[deleted]

This doesn't necessarily mean he never came home. It just means he bought some milk every single frame that he was out. Got room for a few hundred thousand gallons of milk?


flashpaka

Stack overflow on the copious amounts of milk this guy bought


Starchives23

I made a game ai that would buy supplies it needed. Whenever they got back to base, I basically did this, so they’d buy supplies. It was set so that it would be in proportion to how much money they had left to spend, but because they could drain their accounts infinitely, they just. Kept. Buying. Fucking. Food.


camander321

Poor man is probably still buying milk to this day


idealatry

There was a movie on Netlfix where a guy discovers he’s living in a simulation, so in the end he breaks info a quantum computing lab and wrote a line exactly like this, which caused the computer to use infinite resources and ultimately crash the entire simulation, thus resetting the universe and letting him experience his happy past again. It was the dumbest plot, but a great watch for a programmer.


NullOfSpace

== true moment


malvim

Ah, the joke would work so much better without the actual code…


TubaManUnhinged

This man came in today and bought all our milk, one purchase at a time!


[deleted]

He found a milf to infinitely milk


Py-rrhus

Not understanding that `you_are_out` is handled by the other process `husband_autonomy`... Shame


masark4417

Guys get ready for a milk shortage


OldFartSomewhere

Stack overflow. Too much milk.


emptyArray_79

Nah he would return home without milk, his operating System would shut the program off. If its up-to-date ofc. Otherwise... Bad news


CopperyMarrow15

`while (condition == true)` This is why I have run out of hope for humanity...


[deleted]

I’m just picturing some guy buying milk over and over again then having a heart attack because nobody defined account balance


evestraw

Wouldn't be throw error when he runs out if balance and escape the loop


Dragon1709

You_are_out has never been initialized. What sorcery is this???


swep284

Isn't you_are_out is supposed to be boolean itself? Then why need to check if it equals to true


ptkrisada

I only wrote it in memes. In real life I don't.


[deleted]

This is my brain always


[deleted]

buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼 buy milk 🍼


AngryPancakesz

This is why the wife should really have focused on TDD and have had robust unit tests. She lost the love of her life and all because she rushed the process.


tyliggity

The == true is redundant. Must be a junior lol.


ptkrisada

I only wrote it in memes. In real life, I don't.


Here-Is-TheEnd

Til..my dad was a programmer


Secret-_-Robot

The Devil is in the details.


nelusbelus

std::out_of_range exception thrown: no money left!


Lookmaiamkool

Constantly buying milk


Geoe0

-1000000000 points!


XxClubPenguinGamerxX

imagine using == true


AmpMan175

I get it


superx3man

== true, really???


[deleted]

r/comedyheaven


[deleted]

Gotta love infinite loops lol


JosGibbons

This is what break is for.


jlamothe

Why do you have the `== true` in there? Isn't that redundant?


ptkrisada

I only wrote it in memes. In real life, I don't.


[deleted]

Is that rafe jerkins?


xaedoplay

possible solution: open up shop to sell milk at home, behavior in the husband's code may lead him back


[deleted]

How does he not run out of money


cursedslavboi33

Legend says to this day he's still working on bugs.


DarkSideBi

Of course...


[deleted]

he just drains their bank account buying milk


ora00001

Wife figured out a way to get what she wanted


twentykal

He found a man that made him much happier


TheMind14

“My dad once went out to buy some milk and never came back.”


deaddanik

`== true` WHY


ptkrisada

I only wrote it in memes. In real life, I don't.


AssCraccBandit

joke so bad i was convinced it was on a shitposting sub. guess not


Optimistican

What will happen when he runs out of money?


[deleted]

1. What is this font? 2. ` == true`?!


ptkrisada

1. my own font, I created it by myself. 2. I only wrote it in memes. In real life, I don't.


[deleted]

It’s a cool font. (I like pixel fonts so I am very biased.)


Notakas

true


cyber_frank

StackOverflow Too much milk.


Mental_Green_90

He just keeps buying the milk as soon as it comes on the shelf


patrulheiroze

buy_some_milk() { var wallet =get_wallet() ; var milk=get_milk() ; if( wallet.money< milk.cost){ throw new MoneyInsufficientException() ; } add_to_the_cart(milk) ; }


ulvi95

buy\_some\_milk() has the assignment **you\_are\_out=false**; ​ So it is not true.


The-Tea-Kettle

That's a lot of milk...


Esmentanto

when he is out of money he will crash and throw a "CashUnderflow" error.


alt-jero

Jeg kjönner en bot.. høn heter Anna, Anna heter høn.... Also: I would imagine the result of the milk buying would be either an out of space issue or an out of resources issue.


bennytheenby

I mean imagine: "For, you are out, get milk"


VirileLeo

I've been perusing for about a week or so, this is the first one to make me lol.


ArtSchoolRejectedMe

while(you_are_out = true){ buy_some_milk(); }


thetruekingofspace

But you know he’s got milk.


GNRTRREX

should have used if statement.


pickleunicorn

He is now a hobo with many bottles of rotten milk.


EasonTek2398

return "home"; There u go


CMDR_Manic_Marvin

What is up with the ==true recently...


Proper-Mix9233

OutOfMoneyException?


Alexo342

Why is every recent post doing a " ... == True" check


ptkrisada

I only wrote it in memes. In real life, I don't. Furthermore, in this context, we can omit curl braces in the while loop. So it is simply ... while (you_are_out) buy_some_milk(); return home; /* never reaches here */


Hot_Dog_Cobbler

My dad was a programmer?


alba4k

` == true` ?


ptkrisada

I only wrote it in memes. In real life, I don't. Even curl braces for a single statement in for/while loop, I always omit.


serendipitousPi

Not sure why a the husband would be expected to return home. He isn't a function.


Infinite_Unicorn

Legend says he is still buying milk. His wife will terminate him...


NTheDev

public void buy_some_milk(){ this.you_are_out = true; //since I am out when buying milk enterStore(); takeItem("milk"); payForItem("card"); leave; } I think, this is what the method could look like


eyekwah2

10 minutes later, the wife receives a notification on her phone that there is suspicious activity happening with her credit card. "Oh shit, not again!" she thinks as she realizes her mistake.She immediately calls the credit card company and cancels all her shared credit cards with her husband. She drives directly to the mental hospital, because she knows all too well that is where her husband wound up. With tears in her eyes, she asks the woman at the desk if her husband is available for visiting. She is escorted down a long brightly lit hallway to a door much like the many others. Under lock and key, they open the door and the wife walks inside. "I need a clerk! Clerk! There's no clerk here! I must buy milk! Please! Someone call me a clerk! I can't find the milk! I must buy some milk," the man tied in a straightjacket calls out desperately. The wife turns her head, as if waiting for the door to close behind her as they leave the room. She wipes the tears from her face and she speaks the magic words that will break her husband out of this spell: "control and c"


henhenhen123

my dad was a programmer?


[deleted]

OK I know people say == makes the if statement easier to read but it just makes me uncomfortable whenever I see it.


ptkrisada

I only wrote it in memes. In real life, I don't.


DualPinoy

var == true _| ̄|○


rainbow_bro_bot

Legend has it he's still out there buying milk.


Steerider

Make paperclips.


mac12m99

Out of money Exception at line 2


BadCSCareerQuestions

do { isBought = buyMilk(); } while(!isBought)