A software developer's wife asked him to get a gallon of milk from the store

3 months ago by RacerX to c/programmer_humor

"... and if they have eggs, get a dozen, " she added.

He later came home with 12 gallons of milk.

"Why'd you get so much milk!?!" his wife asked.

He replies, "THEY HAD EGGS!"

Susaga 109 points 3 months ago

Alternate version:

"While you're there, pick up some bread," she added. He never returned.

path: 0 24874433, hotness: undefined, score: 109, children: 3
0xDREADBEEF 18 points 3 months ago

and when he returned empty-handed he answered "I then set the bread back down"

path: 0 24874433 24874576, hotness: undefined, score: 18, children: 1
CalcProgrammer1 10 points 3 months ago

Obviously someone else then took the bread, the only way to break the cycle.

path: 0 24874433 24874576 24879706, hotness: undefined, score: 10, children: 0
MonkeMischief 7 points 3 months ago

"Some say he's still there picking up bread to this day..."

path: 0 24874433 24889960, hotness: undefined, score: 7, children: 0
CallMeAl 29 points 3 months ago

Should have gotten 13 gallons.

path: 0 24873913, hotness: undefined, score: 29, children: 8
Oisteink 27 points 3 months ago

No - he was asked to bring 1 or 12, not 1 and 12

path: 0 24873913 24873965, hotness: undefined, score: 27, children: 6
CallMeAl 33 points 3 months ago

try reading it again. Wife clearly says "and" not "or"

path: 0 24873913 24873965 24873999, hotness: undefined, score: 33, children: 4
vinnymac 22 points 3 months ago path: 0 24873913 24873965 24873999 24874480, hotness: undefined, score: 22, children: 3
CallMeAl 7 points 3 months ago

Doesn't change it.

Wife adds 1 gallon of milk to shopping list;

Wife adds ( eggs, dozen) gallons of milk to shopping list;

Shopping list has 1 gallon and a dozen gallons for a total of 13 gallons.

path: 0 24873913 24873965 24873999 24874480 24874784, hotness: undefined, score: 7, children: 2
4am 1 point 3 months ago

Found the BSAs

path: 0 24873913 24873965 24878516, hotness: undefined, score: 1, children: 0
RacerX 6 points 3 months ago

I like the discussion in this thread.

path: 0 24873913 24883597, hotness: undefined, score: 6, children: 0
HairyHarry 29 points 3 months ago

"Buy two forks. Buy two forks for every fork you buy."

path: 0 24874793, hotness: undefined, score: 29, children: 4
WhiskyTangoFoxtrot 22 points 3 months ago

:(){ :|:& };:

path: 0 24874793 24876061, hotness: undefined, score: 22, children: 3
HairyHarry 12 points 3 months ago

Aahh, the ol' botox lips, raised monobrow, grumpy face and the two toothed irony wiking emoticons.

path: 0 24874793 24876061 24881898, hotness: undefined, score: 12, children: 1
tetris11 1 point 3 months ago

isn't this loss?

path: 0 24874793 24876061 24881898 24890090, hotness: undefined, score: 1, children: 0
newton 7 points 3 months ago

This is old ,the forkbomb !

path: 0 24874793 24876061 24876271, hotness: undefined, score: 7, children: 0
Wilco 8 points 3 months ago

What? They apparently had eggs. If, then, else.

path: 0 24874927, hotness: undefined, score: 8, children: 0
Codpiece 6 points 3 months ago

Requirements unclear.

path: 0 24873845, hotness: undefined, score: 6, children: 0
AlteE 2 points 3 months ago

I still don't understand why he managed to get 12 gallons and not 11 or even 10.

path: 0 24873886, hotness: undefined, score: 2, children: 5
unitedwithme 14 points 3 months ago

So get a gallon of milk, and IF they have eggs, get a dozen (gallons of milk). Basically this is an if statement meaning if X is true, do this. Well normally we think get a dozen would be get 12 eggs, but because "have eggs = true" that meant get 12 gallons of milk. The opposite would've been eggs=false and he'd come home with 1 gallon.

I'm not a Dev so I can't write the code better, but I understand the language enough

path: 0 24873886 24874042, hotness: undefined, score: 14, children: 4
db2 17 points 3 months ago

eggs?(milk=12):(milk=1);

return milk;

path: 0 24873886 24874042 24874096, hotness: undefined, score: 17, children: 0
AlteE 6 points 3 months ago

Ahh, my bad. I forgot that in English dozen means 12 but dosens means 10*n with n > 1.

path: 0 24873886 24874042 24874082, hotness: undefined, score: 6, children: 2
unitedwithme 11 points 3 months ago

NP. We don't even use dosens in America so I learned something new!

path: 0 24873886 24874042 24874082 24874133, hotness: undefined, score: 11, children: 0
eager_eagle 2 points 3 months ago

people say tens for multiples of 10

path: 0 24873886 24874042 24874082 24875461, hotness: undefined, score: 2, children: 0
programmer_humor
programmer_humor

@programming.dev

login for more options
33653
2567
7610

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
    • If the mod doesn't find it funny, you're banned. Ha-ha!... For real: do not use the community for "statements". There are other places for such content. Keep it chill and funny.

go to feed...