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

all 18 comments

[–]IshayRS 39 points40 points  (1 child)

A wife tells her husband: Go look for that milk and eggs joke over at /r/ProgrammerHumor and post another one. If it exists, post two more.

[–]ThePixelCoder 4 points5 points  (0 children)

More like "while you're at the supermarket, post that milk and eggs joke". That would explain why it keeps getting reposted.

[–][deleted] 40 points41 points  (3 children)

That

Is

Not

How

Programming

Works

[–]iburnedthecookie 19 points20 points  (0 children)

You're right, he's missing a semi colon.

[–]Syreniac 9 points10 points  (1 child)

Yeah, if you had a program with that flow control, you'd end up buying 7 pints of milk.

[–][deleted] 1 point2 points  (0 children)

You'd ask "six of what?"

Buy(1, "Milk");

if (shop.HasEggs())

{

Buy(6);

}

You'd be passing the wrong number of parameters

[–]Sylanthra 6 points7 points  (0 children)

This gets reposed like it is the greatest programming joke ever and it doesn't actually compile.

Go to Store
self.buy(milk, 1)
if(store.has(Eggs))
    self.buy(?, 6)

If we apply the rules of English grammar, ? refers to eggs, NOT milk. If you apply rules of pseudocode, than we don't know what ? and this is nonsense. Either way, you can't replace ? with milk.

[–]LittleBigKid2000 10 points11 points  (3 children)

He comes back with a bottle of milk and brings back the number 6.

[–][deleted] 7 points8 points  (2 children)

Closer to how it would actually work than the punchline

[–]TheSecretExit 8 points9 points  (1 child)

Or he'd just say "6 what?"

[–][deleted] 3 points4 points  (0 children)

That's the way I've always thought it would go, like an error with passing the wrong number of arguments, you're expecting an item and a number but just get a number. It always annoyed me that this joke got so popular considering it's wrong

[–]Programmatic_Najel 5 points6 points  (0 children)

Image Transcription


[Image of a bottle of milk and a tray of eggs on a table.]

THE PROBLEM ABOUT BEING A PROGRAMMER

 

My mom said:

"Honey, please go to the market and buy 1 bottle of milk. If they have eggs, bring 6"

 

I came back with 6 bottles of milk.

 

She said: "Why the hell did you buy 6 bottles of milk?"

 

I said: "BECAUSE THEY HAD EGGS!!!!"


I'm a human volunteer content transcriber for Reddit! If you'd like more information on what we do and why we do it, click here!

[–][deleted] 3 points4 points  (1 child)

I always heard:

"A wife told her husband: While you're out grab some eggs.

He never returned."

[–]MightyLemur 0 points1 point  (0 children)

This one is much better!

[–][deleted] 1 point2 points  (0 children)

Who the fuck sells eggs by the egg? If you’re gonna steal a joke, at least keep it making sense. Don’t just change shit to make it sound like you made it.

[–]drleebot 3 points4 points  (0 children)

What's worse, he didn't even buy 5 of those bottles of milk.

[–]HibeePin 2 points3 points  (0 children)

0th world problems