A new season of Layer Tennis started up last night (after a four year hiatus) with two exhibition matches. Layer Tennis is a continuation of an earlier tradition, perhaps born on usenet, where two designers toss images back & forth in a public forum, playing off of each other’s work for competition and entertainment.
I have neither training nor inclination towards design, but I do have enough interest in the subject to drive me to compulsively refresh in anticipation of the next volley. There is something appealing about watching two artists locked in an exchange within tight constraints while a third participant – a writer with an expert eye – provides play-by-play and color commentary. While I was enjoying yesterday’s “Kleon vs. Anderson” match I started to think about the difficulties of orchestrating similar high jinks in the world of programming.
There are ten volleys, and each combatant has a budget of a mere 15 minutes to deliver the next blow. I can’t be certain, but I imagine that the entire event is time-delayed 15 minutes to give the commentator a similar budget of time to deliver their observations to the audience. I believe that there are deliberately very few rules, other than the dimensions of the resulting image and an obligation to somehow incorporate elements of the prior image. They otherwise appear free to use any tool at their disposal: paper, found objects, knives, cameras, scanners, and of course software.
A naive translation into a competitive event between two programmers would keep the 15 minute constraint, and the total number of volleys. I think this would be essential, because it really does need to be an event that would play out in an afternoon.
The constraint that the image be a standard size could be translated into a push to a git repository. This would provide a natural way for the audience to observe the match.
The final rule – that the sparring partners are not allowed to ignore each other – needs no translation. Programming does bring some interesting spin, however. You could call a function or use a structure defined by your opponent. Or, alternatively, it might be acceptable to refactor it in some way that preserves some recognizable aspect. Or maybe a volley would be returned with another program that uses some part of the prior volley as input, or produces some part of it as output.
I’m tempted to say that there should be no additional rules, in order to maximize creative liberties. However, we might want to impose an additional constraint that the result be runnable. We also might want to forbid loadable resources that were not created within the time budget.
Perhaps the most difficult question would be whether or not to allow libraries: allowing them would open the door to leveraging vast quantities of effort expended prior to the match, and forbidding them would open a difficult question of exactly what constitutes part of a standard acceptable library – for certainly there’s not much that can be done with exactly zero library functions. Another good question is whether we have to restrict ourselves to a single language and environment. Could a volley written as a Haskell program on FreeBSD be returned by volley in SceneKit on MacOS X that animates the tokens from the
As I imagine what it might be like to participate in such an event, I find the most terrifying rule to be the 15-minute time limit. The results would likely be much less impressive than the images in Layer Tennis. Expect the match to look nothing like the demo scene. Instead, expect something closer to the Fizz Buzz end of the spectrum.
If I’m playing, that is. I would love to see what some of the more talented hackers could do under such tight pressure.
The programming world does already have at least one game that we play out in the open, but it lacks the dueling banjos appeal of Layer Tennis. I’m thinking of Code Golf, of course, which can produce impressive and entertaining results in a short amount of time. (Follow that last link and compare the dates of some of the answers to how long ago the question was asked.) But even here we have no idea how many hours of thought and coding happened prior to the question being asked.
Code Golf has a different kind of constraint: how terse can your code be? The challenge in the last paragraph, for example, is wondering what could fit within a Tweet. It doesn’t care if my submission comes after a month of late-night hacking.
The programming world also has programming contests, but even those provide several hours for the contestants to hack. Moreover, they are given a fixed set of problems to solve, which squelches creativity.
Code Pong, as I am imagining it, may not even be possible. Layer Tennis, to use music as metaphor, is more like improvisational performance, whereas programming is more like composition, where short bursts in the psychological state of flow yield more modest fruit. Still, it might be interesting to try.