The room got quiet. What on God’s Green Earth was I going to do to them? The idea was simple: break into small groups, be given a small choice of patterns and programming idioms to choose from, take time to plan out a performance: a skit, a song, a poem, whatever. It had to have somethingto do with the pattern.To help get creative juices flowing I prepared a set of scenes and scenarios they could use for inspiration:
- Police Station
- In Bed
- Bowling Alley
- On the Subway
- On Line at the Movies
- Lecture Hall
- Immigration Checkpoint
- Wedding Alter
- Jedi Academy
- Dog Park
- Marooned Desert Island
- Music Studio
- Zombie Attack!
- Reading of a Will
- Your Mother Visits
- Blind Date
- Grooming Incident
- DANCE OFF!!
- Job Interview
- Making a Presentation
- Providing Tech Support
- Bumping Into Your Ex
- Scooter Accident
- Drug Deal / Drug Bust
But first I had to guess who would go first. One group said, “No, no, we got it.” So I let them go first.
Group One One of the three stood up and said “Hmm… I wonder what order the groups will go in?” Another one shouted out “next()!”, and the third walked to an arbitrary group and said “You go.” They were an Iterator. Get it? How wonderfully meta. They declared the order for all the other groups.
Group Two demonstrated the Open/Closed Principle through a creative attempt at breaking through a Genie’s cave. Also the best part was that the genie wore the sparkliest cape and mask.
Group Four performed a set of Strategy implementations by using different strategies to learn … about Design patterns. Very nice, and meta, yet again.
Group Five was kinda funny. Three bank robbers preparing to do their thing. One says “I’ll handle the money.” Another says “I’ll do crowd control.” The third says “I make great toast!” Cohesion. Brilliant.
Group Six reenacted Composite. They also used a scenario from the board, and the least likely, I might add — Immigration Checkpoint. The composite operation was approving a visa. One officer gave permission by getting permission from a collection of other officers.
Group Three, which was mine, reenacted the Observer pattern (using the Your Mother Visits scenario, I might add.) Here’s the quick story:
- Scene 1: Mom surprises son by showing up unannounced, complains that the house is a mess. Son gives Mom an Android phone as a present, but before Mom leaves, Son registers an Observer with the phone. Observer is another actor, wearing a cape and a Superman-shaped O on his chest. Off they go.
- Scene 2: Mom goes to the bar. Observer runs back to son and says “Mom’s at the bar” and runs back. Then Mom goes to the store. Observer runs back to son and says “Mom’s at the store.” You get the idea. Eventually Observer says “Mom’s on her way to your apartment.” Son scrambles to clean apartment.
- Scene 3: Mom surprises son by showing up unannounced, but now the apartment is clean! Mom is impressed. Son is smug. Better living though patterns.
The event was a surprising success, and even the most cynical of the group happily wore their capes. The group asked me to not take photos, so I have none to share with you.
I strongly encourage giving Design Pattern Theater a quick run at your local reading group. Don’t skimp on capes.