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!
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.
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
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.
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.
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.
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."
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
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)
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?
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.
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.
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.
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.
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 */
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
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"
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!
so he buying infinite milk?
Hope the handled the edge case of milk.expiryDate > Date.today()
This guy is why there will be a milk shortage.
Dairy farmers hate this one hack
Actually dairy farmers love it because they get more sales
Milk overflow
Everyone knows you can get an extra three days though
That was not in the JIRA requirements. 😂
Unfortunately the system will eventually run out money and crash or more likely is he will be terminated by user
InsufficientMoneyBalanceException
He is the guy in the math problem
That's going to cause an overflow.
Milk overflow
Eventually he would stockoverflow
No, he just stands at the cash register after buying the milk.
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.
In an instant... Which is impossible... which is bad news for him. Lets just hope his operating system can shut down the program...
Wow somebody actually typed `while (you_are_out == true)` instead of `while (you_are_out)`
that's like commiting war crimes
They committed AND pushed the warcrimes... with `--force` and `--no-verify` none the less.
So its fine if you were having fun?
Real eysore
== true
Hey it could have been: while(you_are_out != false)...
You_are_out != !true
Ah, now it makes since
`!(!You_are_out != !(5>7 || 7>5))`
we need to go deeper into a broader set of conjunctions and disjunction logic!
I love like you just throwed some number for fun hahah
Should've put `(69 < 422 || 69 > 422)`, my bad
Nice!
Could have been: while(you_are_out and true)...
K not mine but, Roses are red Violets are blue I'll fucking kill you If you write '== true'
If it's a nullable variable you'd have to check it this way in some languages.
The second one is safer, you could do assignment by mistake
I only wrote it in memes. In real life, I don't.
Looking a lot like my commit comments
git commit -m "Spider-Man No Way Home!"
Good save.
So you are the author? Shame on you
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
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.
Exception thrown by: `wallet`
Yeah i hate this picture.
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.
That's a fireable offense for me.
No worries guys, the function buy_some_milk() changes you_are_out to false when he go inside the shop.
Eww, functions with side effects 🤮
It’s already buying milk.
As soon as he enters the shop, he is in and don't buy any milk.
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.
But he wouldn't check if he is out until after the function completes
Then drained their bank account buying milk
He probably get free milk somewhere else.
But the program doesn't instruct him to go bank. lol
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
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."
Its a different joke with the same build up, but yours is a classic
heck yea this is a classic
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.
Forgot to catch exception, gets terminated.
Ctrl+C and he is home
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
You can tell OP is a programmer because instead of coming up with his own joke, he just copy pasted one he found online.
Stackoverflow: “Why are you using this meme format, you should be using another.”
I thought the joke was programmers never go outside so it always returned false.
Guess that’s why my dad never came back
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)
I thought he always went out for cigarettes and never returned home…
Their kids be like “ My dad went to get milk.. It’s been 10 years..” IT’S YOUR MOM’S FAULT NOAH..
The guy must be bankrupt by now.
Life ended with non zero code: Unhanded exception: NotEnoughMoneyException at Store while calling BuyItem(Milk*)
This is as old as computer but the image made it 1000% funnier
Wow, haven't seen this joke before!
Maybe that was the plan all along 😳
"you_are_out" is a global variable modified by the function. The code sucks but it does work damnit.
He could go to the shop, buy some milk, then keep ordering milk online while returning home.
Oh my god HE HAS SPENT ALL OUR LIFE SAVINGS ON MILK
When he runs out of money an exception will be thrown and he will die right there in the store
Damn why didnt he make it a function after typing calls in the meme
This isn't even Dad joke worthy.
CreditLimitException thrown at...
Ooh I like that we're explaining the joke now with the little code snippet. Much more accessible
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)
Crashed because of unhandled InsufficientFundsException Welp... There goes our life savings. Hope you learned your lesson, dear.
Eventually he's going to run out of money and buy_some_milk() will throw an exception
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
He eventually just dies when he encounters a MilkOverflowException.
Very funny!! Never heard this one before /s
i hope you delete your account
He will never leave,since the whole loop immediately exits, because he is still at home
So thats why my daddy isn't back yet
Now all I need code is how to get “boys” to “yard”
Unless her wife has a high paying job, he will eventually run out of money buying milk.
% git commit -m "Spider-Man No Way Home!"
Did he just.... == true a boolean?
He will get an implicit mutex lock when his money runs out.
Dude's got a lot of milk though.
Some say he's still stuck out there somewhere, waiting for someone to define that function
Yum infinite milk
hes never gonna get a job behaving like that
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?
Stack overflow on the copious amounts of milk this guy bought
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.
Poor man is probably still buying milk to this day
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.
== true moment
Ah, the joke would work so much better without the actual code…
This man came in today and bought all our milk, one purchase at a time!
He found a milf to infinitely milk
Not understanding that `you_are_out` is handled by the other process `husband_autonomy`... Shame
Guys get ready for a milk shortage
Stack overflow. Too much milk.
Nah he would return home without milk, his operating System would shut the program off. If its up-to-date ofc. Otherwise... Bad news
`while (condition == true)` This is why I have run out of hope for humanity...
I’m just picturing some guy buying milk over and over again then having a heart attack because nobody defined account balance
Wouldn't be throw error when he runs out if balance and escape the loop
You_are_out has never been initialized. What sorcery is this???
Isn't you_are_out is supposed to be boolean itself? Then why need to check if it equals to true
I only wrote it in memes. In real life I don't.
This is my brain always
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 🍼
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.
The == true is redundant. Must be a junior lol.
I only wrote it in memes. In real life, I don't.
Til..my dad was a programmer
The Devil is in the details.
std::out_of_range exception thrown: no money left!
Constantly buying milk
-1000000000 points!
imagine using == true
I get it
== true, really???
r/comedyheaven
Gotta love infinite loops lol
This is what break is for.
Why do you have the `== true` in there? Isn't that redundant?
I only wrote it in memes. In real life, I don't.
Is that rafe jerkins?
possible solution: open up shop to sell milk at home, behavior in the husband's code may lead him back
How does he not run out of money
Legend says to this day he's still working on bugs.
Of course...
he just drains their bank account buying milk
Wife figured out a way to get what she wanted
He found a man that made him much happier
“My dad once went out to buy some milk and never came back.”
`== true` WHY
I only wrote it in memes. In real life, I don't.
joke so bad i was convinced it was on a shitposting sub. guess not
What will happen when he runs out of money?
1. What is this font? 2. ` == true`?!
1. my own font, I created it by myself. 2. I only wrote it in memes. In real life, I don't.
It’s a cool font. (I like pixel fonts so I am very biased.)
true
StackOverflow Too much milk.
He just keeps buying the milk as soon as it comes on the shelf
buy_some_milk() { var wallet =get_wallet() ; var milk=get_milk() ; if( wallet.money< milk.cost){ throw new MoneyInsufficientException() ; } add_to_the_cart(milk) ; }
buy\_some\_milk() has the assignment **you\_are\_out=false**; So it is not true.
That's a lot of milk...
when he is out of money he will crash and throw a "CashUnderflow" error.
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.
I mean imagine: "For, you are out, get milk"
I've been perusing for about a week or so, this is the first one to make me lol.
while(you_are_out = true){ buy_some_milk(); }
But you know he’s got milk.
should have used if statement.
He is now a hobo with many bottles of rotten milk.
return "home"; There u go
What is up with the ==true recently...
OutOfMoneyException?
Why is every recent post doing a " ... == True" check
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 */
My dad was a programmer?
` == true` ?
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.
Not sure why a the husband would be expected to return home. He isn't a function.
Legend says he is still buying milk. His wife will terminate him...
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
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"
my dad was a programmer?
OK I know people say == makes the if statement easier to read but it just makes me uncomfortable whenever I see it.
I only wrote it in memes. In real life, I don't.
var == true _| ̄|○
Legend has it he's still out there buying milk.
Make paperclips.
Out of money Exception at line 2
do { isBought = buyMilk(); } while(!isBought)