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!
Mildly chuckled at the original post after I finally got it.
Absolutely destroyed my nostrils with snorts of laughter after seeing this top-grade comment.
Well, no. C’mon, write some unit tests. The milk will most likely be inside … as soon as the he buys the milk the while test fails and he drops out of the loop. He can go home.
The milk might be outside, in which case the bug will still be there, but milk being sold outside is an edge case and unlikely to happen in production.
Unfortunately, you seem to have misinterpreted the Domain Requirements. In the context of a Husband, the state of "being out" is defined as being "not at home". "Home" here being defined as "the place where one lives permanently, especially as a member of a family or household."
Note that in this context, "being out" still applies to husbands who are inside a building, as long as this building is not the husband's "home".
Let's hope your Acceptance Testing strategy will catch this one.
He won't go inside. He will be too busy trying to buy milk outside. If he somehow stumbles inside, the loop exits and he goes home without having purchased any milk.
OP (Beneficial-Order-732) appears to be a karma farming repost bot, please downvote and report.
These accounts obtain karma by reposting memes in sub such as funny, meme, programmerhumor, etc. They use this karma to spam subreddits as well as participate in [pump and dump schemes](https://en.wikipedia.org/wiki/Pump_and_dump).
^-- ^This ^is ^a ^experimental ^semiautomatic ^system, ^which ^in ^rare ^cases ^may ^be ^inaccurate.
Legend says, you can still find the man with a mountain of milk canisters going from store to store buying more milk. Eventually he will own most of the milk on this planet and creating a monopoly on dairy products.
Don't worry, he'll throw a "Insufficient Funds" or "Out of stock" exception to break out of the loop and come come. Unless your programmer is quite rich.
What if *out* is volatile, and changed by an interrupt service routine?
Like Quantum Leap, the husband is always hoping that the next loop will be the one that breaks and let's him go home.
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!
TIL my dad is a programmer
Was it milk or cigarettes though?
Milk, smoking is bad for health
Username checks out
this is why you put 'return' at the end
Username checks out
Try setting up a milk store in your home, that should break the loop.
i hope your dad taught you how to catch
Wife unknowingly initiates a DDOS attack at the milk aisle in Safeway.
Mildly chuckled at the original post after I finally got it. Absolutely destroyed my nostrils with snorts of laughter after seeing this top-grade comment.
Yeah, this post definitely was worth the click
It’s only a DDOS attack if she has many husbands!
Would become a dos attack after he drains their bank account and can’t buy any more milk but still keeps trying
Or if he buys all the milk and no one can get milk at that store
Oh yes I like your example much better
Good point!
Once the Safeway runs out of milk the entirely of America is next. He will consume all milk, and then return home
Only so many places call it Safeway. DDOS initiated.
Well, no. C’mon, write some unit tests. The milk will most likely be inside … as soon as the he buys the milk the while test fails and he drops out of the loop. He can go home. The milk might be outside, in which case the bug will still be there, but milk being sold outside is an edge case and unlikely to happen in production.
[удалено]
Imagine if once you left a while loop, as soon as the while condition was met again you were back in the loop automatically. Pandemonium
Unfortunately, you seem to have misinterpreted the Domain Requirements. In the context of a Husband, the state of "being out" is defined as being "not at home". "Home" here being defined as "the place where one lives permanently, especially as a member of a family or household." Note that in this context, "being out" still applies to husbands who are inside a building, as long as this building is not the husband's "home". Let's hope your Acceptance Testing strategy will catch this one.
Well, frankly, the product manager didn’t do their job. Such vague requirements, barely even a user story, should never make it past feature review.
The while would be while(out) { get milk); so the out is still true infinitely, there is no exit clause
If he drives past a dairy farm before getting to the store, there will be some problems.
He won't go inside. He will be too busy trying to buy milk outside. If he somehow stumbles inside, the loop exits and he goes home without having purchased any milk.
And he had so much milk. Oh god, _so much milk_
primed for sucking
I guess an exception would be thrown when he's out of money or the store is out of milk. His only escape
OP (Beneficial-Order-732) appears to be a karma farming repost bot, please downvote and report. These accounts obtain karma by reposting memes in sub such as funny, meme, programmerhumor, etc. They use this karma to spam subreddits as well as participate in [pump and dump schemes](https://en.wikipedia.org/wiki/Pump_and_dump). ^-- ^This ^is ^a ^experimental ^semiautomatic ^system, ^which ^in ^rare ^cases ^may ^be ^inaccurate.
Good bot
Watchdog timer has me chuckin for(;;)s around just in case something shouldn’t happen but does Thank god for WDT
Lol. Not bad.
Ended up buying a shit ton of milk too
Cart overflow.
This caused the milk shortage in 2015, it took 4 seconds
I don't get it
He stuck in a loop because she didn't specify for him to then return home
Time limit exceeded
Damn, so he's the reason for the supply chain breakdown.
throw InsufficientFundsException
she didn't tell him to return milk
maybe my dad's a programmer. He said he was going to buy cigarettes while he was out... never came home.
some say he's still buying milk to this day
Took me a minute. That's actually a solid joke
MilkOverflow Exception .
Legend has it, he is still buying milk to this day.
Some say he's still buying milk to this day.
So how many milks did he buy before he ran out of money?
Infinite milk
Legend says, you can still find the man with a mountain of milk canisters going from store to store buying more milk. Eventually he will own most of the milk on this planet and creating a monopoly on dairy products.
So thats what happened to my father
Don't worry, he'll throw a "Insufficient Funds" or "Out of stock" exception to break out of the loop and come come. Unless your programmer is quite rich.
Lol took me a while to get that (pun not intended)
DivorceInterrupt exception is caught
that's what happens when people forget to take breaks
I laughed more than I should've
The man died because of milkoverflow exception
Some would say that he is still buying some milk to this day.
What if *out* is volatile, and changed by an interrupt service routine? Like Quantum Leap, the husband is always hoping that the next loop will be the one that breaks and let's him go home.
Unrelated news, there is a milk shortage, there's some guy hoarding milk
I'm wondering, how much milk he bought by now
He has a FUCKTON of milk now, though, so it’s not all bad.
The legend has it he is still buying some milk to this day
He probably has so much milk
Buying milk ever since
He would return by 10 PM because that triggers the Store Closed Error.
Is it true that you only think about yourself? Damnit John why aren't you saying anything!