A Random Pattern

Archive for May 25th, 2007

Programming Joke

Friday, May 25th, 2007

A friend and I were standing around the grill, watching the burgers cook. You know, if you don’t watch them they don’t get done. ;)

Another friend walks up and comes up with this immensely clever line:

“How many programmers does it take to grill hamburgers?”. (I should mention said friend is a salesman. :P )

My first reaction is to offer a mocking half-laugh at this ‘joke’ (though admittedly, most of my jokes are worse). However, the programmer in me can’t resist the challenge of providing a technically correct answer.

“1”… Even though there are clearly two of us standing there.

From the salesman I receive a confused look and a “Huh?”. Moments later, my programmer friend starts laughing.

The salesman asks “What, is that some inside joke or something?”

The griller explains. “Let’s say you have an array of 10 numbers. You would expect them to be numbered 1 through 10. But the computer will number them 0 through 9 instead.”

I’m not sure if the next look from my salesman friend was more confusion, disgust, or some potent mixture of both. ;)