When David Fincher hired me to build software effects sequences—animations of code and computer interfaces—for Zuckerberg’s and others’ monitors in The Social Network, he threw hackers everywhere a bone we’d been slavering over for a long time.

At one point during the project a set decorator asked me, “Why did they hire you?” After the ensuing moment of crushing self-doubt passed, I answered, “So it doesn’t end up like Swordfish.” Sullen, he confessed he’d worked on the movie.

Movie code has been in the news lately thanks to moviecode.tumblr.com and those reporting on it. Earlier this year, Wired gave a shout-out to The Social Network and another project I worked on with Fincher’s team, The Girl With the Dragon Tattoo:

[D]irector David Fincher gets it right: When his characters—like Lisbeth Salander in The Girl with the Dragon Tattoo or Mark Zuckerberg in The Social Network—enter the digital realm, their coding language is consistent with what they’re trying to accomplish. Lisbeth at least knows SQL code, while Zuckerberg is using legitimate code that appears to have been created for the film.

Indeed, the code that appeared in The Social Network, in both text and deployed (i.e. webpage) form, was written just for the movie. But why?

Three reasons why you should consider real code for your movie

1. You’d be surprised how many people can spot a fake

This was what first got me excited about the Social Network project. Finally, someone was making a movie that would portray software realistically. The more people I talked to about my new project, the more I realized, it’s not just professional geeks who notice dumb software effects sequences. Other people who are going to call you out include:

  1. Investment bankers who script Microsoft Excel
  2. Designers and 3D artists who write ActionScript and MEL
  3. High school cheerleaders who learn HTML in the computer lab
  4. Any of the millions of untrained-but-still-very-skilled hobbyist programmers
  5. Anyone who knows a software engineer (as you can see, we’re absurdly vocal about BS code in movies, hence this post)

These days, everyone codes.

2. When you use real code, you get real interfaces for free

When you build a set, you actually build it. You have a mason lay the tile and a carpenter put up the trim. You also have the carpenter hang the door on hinges, drill a hole and install a doorknob. Why?

In The Social Network, as in most movies with code, characters interacted with the deployed form of the software others were building/hacking, too. In one scene, Zuckerberg codes “Facemash.” In another, tipsy college students use the website to rank one another’s photos. Later, Mark and his colleagues write, in scene after scene, Facebook. Interleaved with those scenes are others where engrossed early adopters use the product. We used the same code for both sorts of scenes, on the one hand in text form and on the other running on a real web server.

It’s not only the Social Network that has this interplay between code and interface. Swordfish could have benefitted from a tighter (read: any) coupling between the hack and the system being hacked. Even when you don’t see source code, it’s usually obvious when a “webpage” has been slapped together in Photoshop versus coded in HTML and CSS.

So why do you put a real doorknob on the door? Because after sitting prettily in the background for awhile, it’s going to have to open for someone. You wouldn’t have a sculptor build you a fake door out of Fimo, so why would you ask a graphic designer to build your website, an animator to make it seem functional and a set decorator to scrounge the web for some bogus source code?

3. Real code keeps you honest

It’s hard to translate “[Protagonist] circumvents the firewall and hacks the mainframe” into an effects sequence without digging a lot deeper. What data is she accessing and how? What OS is she on? (Unix/Linux or maybe OS X. In any case, it should match her hardware.) Is she using a window manager and terminal window, or did she boot straight to the command line? (These days, probably the former.) Is she using ssh or telnet/s_client/etc. or coding her attack?

Instead of asking and answering these questions, filmmakers often resort to eye candy as a substitute. But eye candy isn’t what you see when you use a computer. And we all use computers. Slick 3D animation and sounds effects (why is it beeping??) yank us back out into our dirty, real theater seats and remind us that what’s unfolding on the screen is a fiction.

By coding and/or capturing real software, the filmmaker is forced to examine a technology story more closely, filling in the blanks inevitably left by the script. The result is a more convincing, immersive experience.