A few years back, I lived and worked in Northern Virginia, a sprawling collection of suburbs just outside Washington, DC. It’s a place of malls and strip malls, office buildings and office parks, a territory inlaid with and surrounded by perpetually packed freeways carrying government workers and contractors home to planned communities. It’s a place people live because of a job.
At the time, I had a job I liked very much, and so did some people who worked across the highway-wide street. We all got to do challenging things with computers and we had a lot of freedom as to how we went about it. We became friends.
Some evenings, after work, we’d gather at one or another of the area’s strip mall Middle Eastern cafés. We’d order big plates of kabobs and rice and hummus and pita and try to best one another at the ideal combination of flavors of shisha to share in the hookahs that are the cafés real draw. On warm nights we’d sit outside and watch the sons and daughters of wealthy diplomats preen for one another in an endless contest for the nicest car, the chicest clothes, the most beautiful partner on your arm. Farsi music videos blared and the suburbs around us were all but gone in the hanging smoke.
And then, when the plates of food were replaced with mint tea and Turkish coffee, we played a game.
The game is called Zendo. It’s made by a company called Looney Labs who, like many clever small game companies, reuse a set of universal pieces for a number of their products. Zendo is played with signature plastic triangles called Icehouse pieces, as big and as varied a set as you care. The triangles are hollow, allowing them to be stacked. They have a small “pip” on each side that designates a point value. The triangles come in just three sizes, but are available in a whole variety of colors and opacities.
A round of Zendo begins by designating a “master”. In her mind, the master comes up with a rule that describes multiple configurations or structures made up of the triangular pieces. A rule might be: “blue triangles must always have a red triangle stacked atop them”. Or: “the total number of pips in the structure must be divisible by two”. The master builds one structure that satisfies the rule alongside one structure that does not, and the two structures are marked accordingly with white and black stones respectively.
Each turn, a player who is not the master builds a structure from the shared pile of spare triangles. Each structure a player builds is marked with a stone designating its adherence to the master’s unspoken rule, just as with the master’s original example structures. If a structure fits the master’s rule, an additional green guessing stone is earned by the player that built it. A player can trade a guessing stone for a guess at the rule, asked of the master in front of the other players. Play proceeds until someone correctly guesses the master’s rule.
That, modulo some details, is the game.
Zendo and Understanding Programming As A Collaborative Endeavor
Zendo is a game of inductive logic. Anyone can enjoy it, but programmers take particular delight in it. In broad strokes, a round of Zendo mirrors the intellectual process programmers engage in when debugging. You know there’s a rule in the machine undermining the task you’re trying to accomplish, but you don’t know what the rule is, so you build and rebuild and think and observe and rebuild again until you understand the rule, and then you win.
Zendo’s process of becoming gradually un-blind could even be said to be a metaphor for how many of us learn to program, particularly if you’re self-taught. You’re thrown into a black nexus of thousands of unknown rules and made to reason in the dark. With each rule you discover, a little less dark. (I’ve been programming in earnest for sixteen years and presently find myself in a sort of early-evening twilight, plus a couple of sconces in the corner and maybe a night light.)
For me, the interesting thing about Zendo is not its parallels to the task of programming as an individual, but thinking of the game as a model for collective problem-solving.
One strategy for Zendo is to hole up in your mind, obsess over the structures you’ve built, and try to crunch through every possible permutation on your own. This approach works well if you’re a genius, I’d imagine, but most of us are not. It’s also a good way to lead yourself astray, convinced that you can see the general shape of the master’s rule when in fact you’re thinking along entirely the wrong lines.
A more broadly applicable strategy is to throughly observe the plays of your opponents and treat “solving” the round as a kind of computation distributed across all the players. Together, you and your fellow players are brute forcing the problem of discovering the rule. Every (motivated) player at the table decreases the time it takes to win.
The best rounds of Zendo I’ve ever played are ones in which the master has chosen a devilishly hard rule, a rule so difficult to guess that the players cease to be in competition with one another and are instead in a collective war against the inscrutability of the master. When one player finally wins, it’s due to the combined efforts of all the players building structures, making guesses, exploring the solution space. That shared victory is a wonderful moment.
Flashes of brilliance are few and far between. Even when they strike, turning a brilliant insight into something reproducible is almost always an effort beyond just one person. Programming lore is full of stories of lone-hacker-in-the-night heroism, but the reality of what we do is one built on collaboration: between pairs, amongst teams, amongst companies in the marketplace, amongst universities and laboratories, amongst contributors to open source projects.
I write this by way of encouraging you to:
- Play a round of Zendo. It’s out of print, but you can still buy Icehouse pieces.
- Remember that people are everything. It’s easy to get caught up in a problem, particularly if you aren’t a naturally collaborative person. Don’t forget that the people you work with – peers or partners, managers or interns – complete your work and vice versa. If you don’t at least observe the successes and failures of their work, you’re going to be that much more in the dark.
One last thing about Zendo: it’s not much fun to be the master until someone guesses the rule.