All products featured on WIRED are independently selected by our editors. However, we may receive compensation from retailers and/or from purchases of products through these links.
To write a computer program, you'd normally sit at a traditional workstation and type. Or at least click.
An innovative computer scientist has created a gesture-controlled interface for building simple programs. A camera captures the movements of the programmer—jumps, high-fives, sideways leans, and hand claps are converted into code. As if that isn't absurd enough, the system is named Bodyfuck.
It comes at a time when we're moving beyond keyboards and mice for our computing needs. Those input devices aren't dead; they just make less sense when they aren't attached to a full-on computer. Instead, we touch our gadgets' screens, or just speak our wishes. Innovation around gestures is happening quickly—TVs, cars, and game consoles have all been modified to capture and understand gestures—and it appears the technology is poised to give us a more convenient and simple way to interact.
But what if a gesture-control system was purposely built to be as inconvenient and exasperating as possible? That's the idea behind Bodyfuck. The gesture-input scheme was created to develop programs for an existing language called Brainfuck, which is also deliberately maddening. And as you may have noticed, both their names are equally inaccessible.
Bodyfuck isn't new—the project was first presented to the public back in 2010—but Brainfuck is even older. The esoteric programming language was created in 1993 for Amiga OS by Urban Müller. It's intentionally bare-bones, because Müller's main objective was to make it work with the smallest possible compiler required to turn code into an executable program.
Brainfuck consists of eight commands, none of which are alphanumeric characters. And because it's so simple, the code you need to create in order to do anything is painfully tedious to write and nearly impossible to read, even for programmers familiar with the language. And this is why it's called Brainfuck.
bodyfuck - copy from nik hanselmann on Vimeo.
Coding in Brainfuck is like writing War and Peace using a rotary telephone—and that's if you use a normal keyboard. Using Bodyfuck to write Brainfuck code is as if the rotary phone is hooked up to a game of Dance Dance Revolution, and the only way to move the wheel is to perform certain moves. Coding a program looks like you're doing an interpretive dance for ten minutes. It gets exhausting.
"There is a kind of myth that modeling the world digitally is somehow a clear expression of logic," says Bodyfuck creator Nik Hanselmann. "I thought a fitting way to show that was through absurdity: The software I wrote really didn't care that I had to sweat and bleed to write 'hello world,' but I did. There are lots of moments of despair, joy, and absolute incredulity when confronted with digital models of behavior and I wanted see those moments to be expanded, which resulted in programs such as a six-minute choreography just to get the sum of two numbers."
Given the impending wave of gesture-control devices, Bodyfuck may be more relevant now than when it was first conceived. Hanselmann, who now works as a creative technologist at The New York Times Research & Development Lab, created Bodyfuck as part of his Master of Fine Arts thesis project at the University of California, Santa Cruz. He describes it as an art piece, although "it could also represent a view on gestural programming as well—one will most likely look a little silly." When he worked on the project, motion-sensing cameras such as the Kinect weren't available yet, so he used a Macbook Pro and its on-board iSight camera.
Although Hanselmann says that building a Brainfuck interpreter "is probably one the more straight-forward programming language interpreters one could write," the video processing for the project was a lot trickier. He wrote that in C++, and he says a dedicated motion controller would have come in handy for building that piece of the puzzle. However, creating Bodyfuck in a pre-Kinect world was also a fitting obstacle for the project.
"There is no doubt that had something like the Kinect or Myo been a resource during my thesis, it would have made certain parts easier," Hanselmann says. "But that would kind of be missing the point, wouldn't it?"
Having to move around like you're eating peas using a prize claw and a single chopstick in order to input a string of simple commands isn't the only frustrating part about using Bodyfuck. For example, there is no way to backspace if you perform the wrong motion or if the system registers your movement incorrectly. All you can do to correct things is double-clap to erase the entire program. Then you need to start over.
Here's the entire list of commands.
Of course, Bodyfuck (like Brainfuck) isn't intended to be taken as a serious tool for programmers. However, while Hanselmann while creating the system, he learned some useful things from all of the absurdity. After all, programming is about problem solving, and something as minimal and frustrating as Bodyfuck is sure to stoke creativity.
"I've continued to think a lot about how novel ways to program," Hanselmann says. "I've been collaborating on a graphical programming language that will hopefully prove to be more functional and practical than Bodyfuck."