What Kangaroos & Beachballs Can Teach You About Code
During some of my presentations I’ve told a funny story that has circulated around the internet. The story goes that a group of programmers working on Operation Phoenix added herds of kangaroos to a helicopter flight simulator, reportedly because the roo’s reactions to a helicopter could give away the location of a helicopter (or just for laughs).
To do so, they inherited code originally used to model infantry reactions to helicopters, changed the image from a soldier to a kangaroo, and called it a day.
The Aussies buzzed the virtual kangaroos in low flight during a simulation. The kangaroos scattered as expected, to nods and congratulations… and then the group did a double-take as the kangaroos reappeared from behind a hill and launched a barrage of weapon fire at the helicopter.
This is an amusing illustration of the Gorilla Banana Problem from classical object-oriented programming:
“The problem with object-oriented languages is they’ve got all this implicit environment that they carry around with them. You wanted a banana but what you got was a gorilla holding the banana and the entire jungle.” ~ Joe Armstrong, from Coders at Work
I retold this story during a visit to Australia. After the talk was over, my wife approached me laughing. She has heard me tell the story a few times.
She had been thinking I was talking about a real helicopter flight, and she was confused about how a group of Kangaroos got their hands on weapons and learned how to fire them at anything, and what on earth this had to do with programming.
She wondered to herself “why does he keep telling this story?”
It only dawned on her that I was talking about a software simulation this time because I told a bit more of the story to the Australian crowd:
According to an account by Dr. Anne-Marie Grisogono, head of the Simulation Land Operations Division at the Australian DSTO (Defense Science and Technology Organization) the programmers had not implemented missiles yet, so instead of missile fire, the programmers were shot down by large multi-colored beachballs.
I thought this story was funny the first time I heard it, but I’ve been laughing at “why does he keep telling that story?” a lot more.
How can you avoid the Kangaroo Beachball Problem?
He spends most of his time in the San Francisco Bay Area with the most beautiful woman in the world.