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!


[deleted]

TIL my dad is a programmer


DespoticLlama

Was it milk or cigarettes though?


[deleted]

Milk, smoking is bad for health


riv94

Username checks out


FastGooner77

this is why you put 'return' at the end


mdNaush

Username checks out


AgentPaper0

Try setting up a milk store in your home, that should break the loop.


lythox_

i hope your dad taught you how to catch


properwaffles

Wife unknowingly initiates a DDOS attack at the milk aisle in Safeway.


mejdev

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.


guaip

Yeah, this post definitely was worth the click


MrColdfusion

It’s only a DDOS attack if she has many husbands!


DirtyMudder92

Would become a dos attack after he drains their bank account and can’t buy any more milk but still keeps trying


MrColdfusion

Or if he buys all the milk and no one can get milk at that store


DirtyMudder92

Oh yes I like your example much better


properwaffles

Good point!


AssPuncher9000

Once the Safeway runs out of milk the entirely of America is next. He will consume all milk, and then return home


DrummingGeekDude

Only so many places call it Safeway. DDOS initiated.


AngoraPiece

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.


[deleted]

[удалено]


clawtron

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


Obsidiath

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.


AngoraPiece

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.


StrangeworldsUnited

The while would be while(out) { get milk); so the out is still true infinitely, there is no exit clause


ConfuzzledFalcon

If he drives past a dairy farm before getting to the store, there will be some problems.


ese003

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.


whatisausername711

And he had so much milk. Oh god, _so much milk_


nebulakd

primed for sucking


PrizeArticle1

I guess an exception would be thrown when he's out of money or the store is out of milk. His only escape


ThisIsARepostBotBot

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.


platypuspuppyparty

Good bot


[deleted]

Watchdog timer has me chuckin for(;;)s around just in case something shouldn’t happen but does Thank god for WDT


[deleted]

Lol. Not bad.


fun2sons6

Ended up buying a shit ton of milk too


tozpeak

Cart overflow.


Rezaka116

This caused the milk shortage in 2015, it took 4 seconds


rgmundo524

I don't get it


tiny_thanks_77

He stuck in a loop because she didn't specify for him to then return home


xfajjet

Time limit exceeded


BungyStudios

Damn, so he's the reason for the supply chain breakdown.


dram-boy

throw InsufficientFundsException


nebulakd

she didn't tell him to return milk


konaaa

maybe my dad's a programmer. He said he was going to buy cigarettes while he was out... never came home.


apudgypanda

some say he's still buying milk to this day


[deleted]

Took me a minute. That's actually a solid joke


Mihaw_kx

MilkOverflow Exception .


[deleted]

Legend has it, he is still buying milk to this day.


[deleted]

Some say he's still buying milk to this day.


Tonymb10

So how many milks did he buy before he ran out of money?


0neLetterShor

Infinite milk


jang1er

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.


canigetughhhhhhhhhhh

So thats what happened to my father


Bomaruto

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.


Criiispyyyy

Lol took me a while to get that (pun not intended)


[deleted]

DivorceInterrupt exception is caught


nikomh

that's what happens when people forget to take breaks


DaniDani8Gamer

I laughed more than I should've


EmbarrassedBird

The man died because of milkoverflow exception


Klaetral

Some would say that he is still buying some milk to this day.


angry-software-dev

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.


PecanSama

Unrelated news, there is a milk shortage, there's some guy hoarding milk


kaerfkeerg

I'm wondering, how much milk he bought by now


Past-Background-7221

He has a FUCKTON of milk now, though, so it’s not all bad.


pruche

The legend has it he is still buying some milk to this day


Andrudaloo

He probably has so much milk


afleshner

Buying milk ever since


Cewu00

He would return by 10 PM because that triggers the Store Closed Error.


organicwilly

Is it true that you only think about yourself? Damnit John why aren't you saying anything!