Welcome Guest! To access all forums & features, please register an account or sign-in. → Why register?



Programmer logic in everyday life


35 replies to this topic - - - - -

#1 V9s

    Resident Fanatic

  • 740 posts
  • Joined: 21-May 05
  • Location: Karachi

Posted 05 June 2012 - 08:27

Posted Image


#2 +Odom

    Resident Elite

  • 1,389 posts
  • Joined: 09-August 06

Posted 05 June 2012 - 11:02

lol (Y)

#3 +devHead

    The stars, like dust...

  • 2,367 posts
  • Joined: 08-August 01
  • Location: Arizona... Among The Trees
  • OS: Windows 8 Pro

Posted 05 June 2012 - 11:05

Ah classic!! I love it! (Y)

#4 Ben Dyson

    Neowinian

  • 92 posts
  • Joined: 01-September 10
  • Location: Cornwall, United Kingdom
  • OS: Mac OS X

Posted 05 June 2012 - 11:08

HA! Nice one :laugh:

#5 Hum

    totally wAcKed

  • 54,360 posts
  • Joined: 05-October 03
  • Location: Odder Space
  • OS: Windows XP, 7

Posted 05 June 2012 - 16:22

didn't really understand it -- oh well.

#6 ThunderBuddy

    Sir Derpy McHerperton III

  • 1,590 posts
  • Joined: 04-October 10
  • Location: Ayrshire, Scotland
  • OS: Windows 8 Pro
  • Phone: HTC One X - Revolution HD 18.2

Posted 05 June 2012 - 16:27

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

#7 spacer

    I'm awesome

  • 5,374 posts
  • Joined: 09-November 06
  • Location: Connecticut, USA
  • OS: Windows 7
  • Phone: Nexus 4

Posted 05 June 2012 - 16:37

It's funny because it's true. :laugh:

#8 LogicalApex

    Software Engineer

  • 4,995 posts
  • Joined: 14-August 02
  • Location: Philadelphia, PA
  • OS: Windows 7 Ultimate x64
  • Phone: Nexus 4

Posted 05 June 2012 - 16:38

View PostHum, on 05 June 2012 - 16:22, said:

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.

#9 Hum

    totally wAcKed

  • 54,360 posts
  • Joined: 05-October 03
  • Location: Odder Space
  • OS: Windows XP, 7

Posted 05 June 2012 - 16:40

^ Oh -- I thought of the programming 'easter eggs' -- didn't see how there would be any on milk bottles.

#10 tsupersonic

    Neowinian Wise One

  • 5,339 posts
  • Joined: 30-September 06
  • Location: New York
  • OS: Win. 8 x64
  • Phone: HTC One (AT&T)

Posted 05 June 2012 - 16:46

Ha, nice one.

#11 Skwerl

    Neowinian Ancient

  • 1,379 posts
  • Joined: 02-August 01
  • Location: Austin, TX
  • OS: Windows 8
  • Phone: HD7

Posted 05 June 2012 - 16:48

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.

#12 threetonesun

    Neowinian ULTRAKILL

  • 11,279 posts
  • Joined: 26-February 02

Posted 05 June 2012 - 16:52

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

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

return $milk;
}


#13 simplezz

    Resident Elite

  • 1,830 posts
  • Joined: 01-February 12

Posted 05 June 2012 - 17:18

View Postthreetonesun, on 05 June 2012 - 16:52, said:

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

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

return $milk;
}

:D I like the ternary operator version as well:

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


#14 threetonesun

    Neowinian ULTRAKILL

  • 11,279 posts
  • Joined: 26-February 02

Posted 05 June 2012 - 17:31

Ah, I was gonna use the ternary, but I figured for anyone who didn't get the joke wouldn't get that either. :laugh:

#15 +McKay

    Emperor of the Moon

  • 2,800 posts
  • Joined: 29-August 10
  • Location: Atlantis
  • OS: Windows 8
  • Phone: LG Nexus 4

Posted 05 June 2012 - 20:13

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!