Pretty image

Jeff Langr, Tim Ottinger, and I have invited you over to the pub for a friendly game of cards. You’re thinking maybe poker or pinochle, but Jeff and Tim suggest Agile in a Flash. I overrule everyone and announce that we’re going to play Bizarro Poker. I ignore the grumbling.

“In Bizarro Poker,” I explain, “you hold your cards backwards, so that everyone but you can see them. The goal of the game is to figure out what your hand is.” From five decks of standard playing cards, I remove all jokers, face cards, and tens. I shuffle the decks together. Tim folds his arms and glares at me, while you and Jeff look skeptical, but I’ve supplied cookies, so nobody actually gets up and walks out. “And in Bizarro Poker,” I go on, “suits are ignored. Only the values on the cards matter.”

I then bring out from under the bar a second deck. These cards look different. They are ordinary index cards, and a few words are written on the face of each one.

“These are the Question Cards,” I say. “Each one has a question on it regarding the other cards. We will each draw a Question Card in turn, reading it aloud. When you have asked your question, you then answer it aloud.”

Tim frowns. “Surely you mean that everybody else has to answer it?”

“That sounds right, doesn’t it?” I answer. “But this is Bizarro Poker, so you don’t do what sounds right. You ask the question and then you answer it yourself.”

“Whatever,” Jeff says. “Let’s get started.”

I deal three cards to each of the four of us, face down. “Now pick up your cards and hold them so that everyone but you can see what you have.” When we have all done this, here is what you see:

  • Jeff: 2 of hearts, 4 of clubs, 8 of spades

  • Tim: 4 of spades, 5 of diamonds, 8 of spades

  • Mike: A of diamonds, 5 of hearts, 5 of spades

  • You: (you don’t see your cards)

I now place the Question Deck on the bar within reach of all of us. “The player at the dealer’s right starts.”

“Oh, I guess that’s me,” Tim says. He draws a card from the Question Deck. He reads, “Are there more than two players who have the same total?” He looks at everyone else’s cards and answers, “Yes. And we’re out of cookies.”

I refill the cookie plate while Jeff draws a Question Card. His question, “How many different even numbers do you see on the cards?” gives him no trouble. “Four,” he says promptly. “And how is it possible that Tim and I both have an eight of spades?”

“Multiple decks,” I explain. “There could be as many as five of any particular card in play. Besides, I told you that in Bizarro Poker we don’t pay any attention to suits. So you should just think of those as eights.”

“Yes but if there are—”

Tim interrupts, “OK, I know what I have. Does that mean that the game is over?”

“It does,” I say, “And if you’re correct you win. But everyone gets a chance to be a winner. Does anyone else know what their hand is?”

You look carefully at the cards in everyone else’s hands and reflect on what you’ve heard. You know that Jeff is a smart and serious guy and wouldn’t be mistaken, nor would he bluff. So—yes, you know what you have!

What cards do you hold?

This simple puzzle has an interesting history. I’ll leave it as a banus exercise for you to track down the original form of the puzzle and to check out the other puzzles created by its tricky inventor.

Solution to Last Issue’s Quiz

Many of the technical terms that we use every day in programming also have a common meaning more or less unrelated to their programming meaning.

A bit is something you use to control a horse; a fork is something you eat with; inheritance explains where you got those blue eyes or that white elephant.

Last issue’s quiz presented ten lists of programming words that have a different meaning in ordinary conversation. We ran all the words through our handy-dandy Cryptogram Machine, so they would not be immediately recognizable.

We organized the words into these ten lists as an aid to solving. In each list, the words—taken in their ordinary meaning rather than their programming meaning—share a common theme. The themes and the decrypted words are:

The Write Stuff:

  • Binding

  • Page

  • Type

  • Author

  • Library

  • Editor

  • Sequel

  • Word

Construction:

  • Dock

  • Factory

  • Block

  • Architecture

  • Assembly

  • Loader

  • Link

  • Driver

Animal, Vegetable, Mineral:

  • Tree

  • Leaf

  • Root

  • Python

  • Ram

  • Virus

  • Worm

  • Bug

  • Ruby

Baseball Been Very, Very Good to Me:

  • Catch

  • Throw

  • Base

  • Double

  • Swing

  • Tag

  • Hit

  • Run

  • Error

Conversation:

  • Dialog

  • Declaration

  • Expression

  • Argument

  • Comment

  • Smalltalk

Sew What:

  • Lint

  • Spool

  • Thread

  • String

  • Loop

  • Patch

Theater:

  • Cast

  • Actor

  • Character

  • Script

  • Mask

Kid Stuff:

  • Sandbox

  • Swing

  • Pop

  • Cookies

Grab Bag:

  • Path

  • Fencepost

  • Stream

  • Float

Discards:

  • Garbage

  • Dump

  • Heap

  • Trash