Programmer logic in everyday life


Recommended Posts

HA! Nice one :laugh:

Link to comment
Share on other sites

Just did a programing module in my course, people from the other group were our clients... All I can say is "THIS"

Link to comment
Share on other sites

didn't really understand it -- oh well.

Programmers take everything literally as our instructions to the device are literal.

So the condition as expressed literally was to bring back 6 cartons of milk if the store had eggs in stock.

A "normal" person would interpret it to mean bring back 6 eggs if they have any eggs and one carton of milk. As they would do what makes the most sense even if that isn't the literal request.

Link to comment
Share on other sites

I have some other good programmer jokes.

What does a programmer use for birth control?

His personality.

Why did the programmer cross the road?

Because that's what he did last year.

What's the definition of an outgoing programmer?

He stares at your feet when he talks to you instead of his own.

Link to comment
Share on other sites

function grocery_trip($eggs){
$milk = 1;

if($eggs){
$milk = 6;
}

return $milk;
}
[/CODE]


 :D I like the ternary operator version as well:
[code]
int
get_milk()
{
	return ( shop_has_eggs() ) ? 6 : 1;
}

Link to comment
Share on other sites

Hahaha! If it wasn't so damn expensive to do that and it would require me to get my lazy ass back to the store, I'd do that!

Link to comment
Share on other sites

I don't see the joke. the senario is completely logical.

6 bottles of milk bitch! that's what you asked for, suck em down!

Yeah a few more anger control classes to go to.... :/

Link to comment
Share on other sites

:D I like the ternary operator version as well:

int
get_milk()
{
	return ( shop_has_eggs() ) ? 6 : 1;
}

Just cos I want mine to be shorter :p

<? $milk = ($eggs ? 6 : 1) ?>

Link to comment
Share on other sites

  • 5 months later...

Not sure this hasn't been posted before. If it has, I apologise. (I searched before posting.)

My mother told me:

Go to the grocery store and get me two bottles of milk. If they have eggs, buy six.

When I returned, she looked inside the bag and shrieked: "Why the hell did you buy six bottles of milk?"

I replied: "Because they had eggs."

Link to comment
Share on other sites

This topic is now closed to further replies.