Alec Nevala-Lee

Thoughts on art, creativity, and the writing life.

Posts Tagged ‘Lisp

The jig is up

leave a comment »

Staircase jig

Maybe it’s because we feel guilty about spending our lives crafting such intangible objects, but I’ve noticed that a lot of writers have a way of talking like carpenters. “Ultimately, literature is nothing but carpentry,” Gabriel García Márquez writes, and José Saramago adds: “If I can produce a great chair, even better. But above all I have to make sure it has four stable feet.” Speaking of Sylvia Plath, Ted Hughes says: “If she couldn’t get a table out of the material, she was quite happy to get a chair, or even a toy.” And if I’ve often called an outline a blueprint, an even better metaphor might be that of a jig. A jig is basically a tool used to control other tools, a way of guiding movement and placement to ensure accuracy and repeatability. Many are standardized, but they’re also often whipped up on the fly, cobbled together from whatever happens to be at hand in order to solve a particular problem—like this homemade jig a woodworker made from scrap to drill pocket holes for a big display case. And the more you look at what creative professionals do for a living, the more jigs you find. (I owe this idea to one of my wife’s coworkers, who used the jig as an analogy for creating shortcuts while writing and testing software.)

There are many kinds of jigs, but my favorite may be the simple staircase jig, pictured above, which is used to make stringers, or supports for a staircase’s treads and risers. It’s just a lightweight, convenient template used to cut the pieces more precisely, and it will generally be seen only by the woodworker. Yet it’s a pleasing, elegant object in itself, a perfect marriage of form and function. And I’m especially tickled by the fact that with its two legs meeting at right angles, with a slight overhang, it looks a bit like the Greek letter lambda. In Lisp and similar programming languages, lambda is used as a keyword to introduce anonymous functions, or short, specific procedures created for a particular purpose. You could always write a formal named function to do the same thing, but in some cases, when you only need it for a little while, it’s more efficient to create a one-off tool. In other words, it’s a lot like a jig itself—anonymous, convenient, and made for a specific task. And the staircase jig stands both as a useful implement and as an emblem for the idea of making and using small, disposable, but thoughtfully designed instruments in service of a larger enterprise.

Pocket hole jig

I like the metaphor of the jig both because it hints at the intimate, handcrafted nature of these invisible tools and because it’s inherently recursive. If a jig is a tool for making other tools, in theory, you could have a jig that only exists to make other jigs, and you often do. The craft of writing, to give just one example, offers many examples of nested processes, in which each stage is shaped by the ones that came before. An outline, for instance, can be seen as a kind of jig: it’s cobbled together in private to shape the visible result—the story itself—and it both guides and frees the author’s hand when it comes to putting words down on paper. The outline, in turn, is shaped by countless tiny rules and templates that the writer has developed over time: to think in threes, to structure each scene as a series of objectives, and so on. And those templates, in turn, are determined by another layer even further down, which shades into what we think of as the basic syntax of storytelling. “Show, don’t tell” may not seem like a jig, but it’s really a tool that helps the author decide between the range of choices available. It’s less a value judgment than a guide that encourages us to make those cuts precisely.

And just because jigs are standardized doesn’t mean that the result will always look the same. A staircase jig can be used to make staircases of different dimensions and styles; all they have in common is the fact that their bones are sound, with each tread fitting tightly into each stringer. The rest is a matter of interior design, or decoration, although it’s often most beautiful when the underlying forms are allowed to show through. I often see the same process at work in my own writing. All of my chapter outlines tend to look the same: they fall into three parts, they have roughly the same number of story beats, and they fit within a comfortable template. If I follow this structure closely in the outline stage, though, it’s less because I think it reflects how the story will ultimately look than as a kind of sanity check. When the outline looks more or less like the ones I’ve made in the past, I know that I’m done. In practice, the result is reworked to a point where that underlying structure is no longer visible; a scene that fell neatly into three parts in the outline may be revised until it’s all buildup or all denouement, or I might follow my favorite writing rule and cut the beginning and the end. But I needed that jig to make sure that all the parts were there—and in the right places.

Written by nevalalee

December 23, 2014 at 10:08 am

A choice of tools

with 5 comments

Emacs

The poet Ted Hughes once told a wonderful story to The Paris Review about judging the W.H. Smith children’s writing competition. In the early years of the contest, the stories were fairly short—just a page or two—but in the eighties, they started to balloon, until the judges were seeing stories of seventy pages or more, usually in the genre that Hughes charmingly calls “space fiction.” The culprit? Word processors:

What’s happening is that as the actual tools for getting words onto the page become more flexible and externalized, the writer can get down almost every thought or every extension of thought. That ought to be an advantage. But in fact, in all these cases, it just extends everything slightly too much. Every sentence is too long. Everything is taken a bit too far, too attenuated. There’s always a bit too much there, and it’s too thin.

The result, according to Hughes, were stories that were “always very inventive and always extraordinary fluent—[with] a definite impression of a command of words and prose, but without exception strangely boring.”

I believe it, mostly because I could easily have been one of these kids. When I was thirteen, I wrote a 70,000-word novel using WordStar and an ancient dot matrix printer that probably would have given Hughes an aneurysm, and there’s no question that the available technology is what allowed me to write it. Most of my earlier stories—and by “earlier,” I mean written when I was nine or ten—were almost graphomaniacally compressed, with tiny lines squeezed together on a little square of paper, mostly because I liked the way it looked. Later, when I got my hands on a series of electric typewriters, I began to compose longer pieces, but even then, they were rarely longer than a few pages, and I almost never finished what I started. It was only the combination of a word processor and a printer that freed me to plunge into longer projects, and by the time I was in high school, I was regularly writing stories that were hundreds of pages long. (And although I haven’t gone back to read many of them since, I’m pretty sure that they were very inventive, extraordinarily fluent, and without exception strangely boring.)

Joe Eszterhas

Tools matter. They liberate us, but they can also trap us and lead us into dangerous habits, and the choices we make early on can shape our work in ways that we can’t expect. Joe Eszterhas, who can be a bit of a tool himself, but surprisingly compelling on the subject of craft, wrote all of his screenplays on a manual typewriter—which makes a cameo appearance as a crucial piece of evidence in his script for Jagged Edge—and he claims to be terrified of learning how to use a computer. In The Devil’s Guide to Hollywood, he writes that he has a closet at home filled with the same model of typewriter, still in their original boxes, but since he can wear out a machine in a matter of months with his aggressive two-fingered typing, he’s always worried about running out. And yes, it would be a loss: it’s easy to imagine that the mood of his scripts—which are short, punchy, with minimal filler—stems at least in part from the medium on which they were composed. I’ve dabbled a little in screenwriting, mostly as a source of insights into story structure, but I’ve resisted switching over to Final Draft, preferring to format the page manually in Word. It’s less efficient, but it forces me to think about every choice I make, and I’d like to think that the finished product is a little more textured as a result.

And this isn’t just true for writers. Recently, I’ve begun to learn Lisp, the strangest and most powerful of all programming languages, and although there are a handful of convenient development environments available, like LispWorks, I spent the better part of a day setting up Slime, the Lisp development mode for Emacs. For those who haven’t experienced it directly, Emacs is a venerable text editor primarily used by coders, and for anyone used to working with polished graphical interfaces, it’s enough to make you break out in a cold sweat: it’s text only, controlled solely through keyboard commands, with an initially bewildering labyrinth of key combinations you need to memorize just to navigate through a document. Yet it’s also enormously powerful, flexible, and customizable, and it affects the way coders think. They can live in a wall of text for years, and the commands become wired into their fingers to an almost musical degree: it’s no accident that the key combinations in Emacs are called chords. It subtly influences the way they feel about formatting and syntax, which filters up imperceptibly into decisions involving the design of larger structures, up to the level of the program itself. And it all starts, as with most other things in art and life, with the choice of tools.

Written by nevalalee

September 18, 2013 at 9:00 am

A writer’s code

with 3 comments

Anagram generator from Foucault's Pendulum

One of the small pleasures in writing this blog—and in particular in coming up with the quotes of the day—has been a renewed appreciation of the affinities between writing fiction and computer programming. There’s a remarkably rich body of literature on the art of coding, and simply by browsing through the available works in search of memorable insights, I’ve come to realize that coders deal with many of the same problems that I’ve had to confront in my novels, especially structure, clarity, and managing complexity. Hacking, like writing, requires a balance between formal elegance and quick and dirty fixes, and a coder is often required to choose between ingenuity and readability: a clever solution may be beautiful in the moment, but it can be all but impenetrable if the author—or anyone else—comes back to pick it apart months or years later. And unlike novelists, coders get immediate feedback on the validity of their solutions from a rigorous, if somewhat unimaginative, reader.

The problem is that I haven’t done a lot of hacking on my own. Growing up, I spent hours messing with BASIC on an ancient “portable” computer that didn’t even have a hard drive. (My earliest program, written when I was thirteen or so, involved expanding the anagram generator that Umberto Eco provides in Foucault’s Pendulum to handle words of more than four characters.) Later, I took a computer science class or two in high school, but I haven’t done anything meaningful since.  More recently, I’ve found myself longing to jump back into programming for a fairly specific reason: not to do any serious coding of my own, and certainly not to get paid for it, but simply to gain access to the enormous amount of material written by coders on how they approach their work. Compared to the handful of well-worn tidbits that writers repeatedly invoke on craft, it strikes me as admirably pragmatic, dense, and varied, and even at a glance, it clearly has elements that I can put into practice.

A snippet of source code from Doom 3

This leaves me with the question of which language to learn, an issue that inspires predictably strong opinions on all sides. Not surprisingly, I made the final call based on the books I wanted to read. At the moment, I’m working through The C Programming Language by Dennis Ritchie and Brian Kernighan, which is generally regard as the best book of its kind, and I’m planning to follow it up with The Design and Evolution of C++ by Bjarne Stroustrup, which is one of those extended looks into a sustained design process that I find so irresistible, whether the subject is writing, animation, or cuisine. C and C++ might seem like odd choices for recreational coding, but they’re useful for my purposes because there’s so much source code available, along with what I can only describe as a highly specialized form of literary criticism, like Shawn McGrath’s recent appreciation of the beauty of Doom 3. There’s a whole world of material out there, and I’ve found that it only takes a little work to start to appreciate the basics.

Once I’ve played with C and C++ to my satisfaction, I’m hoping to jump into Lisp. This might seem like another strange choice, and I hope to explore it further in a future post. Suffice to say that Lisp, like C, offers a range of interesting reading material, from Paul Graham’s books on the subject to Douglas Hofstadter’s three essays in Metamagical Themas to Peter Seibel’s Practical Common Lisp. (Seibel, a former English major, is also the author of Coders at Work, which attempts to do for hacking what the Paris Review interviews did for fiction.) Lisp also strikes me as the most novelistic programming language, and the one with the greatest natural affinities to creative writing—but we’ll see. When you’re a writer, you’re always looking for tricks that your peers haven’t discovered yet, as well as any source of insight or competitive advantage, and given my interests and approach to craft, I think a deep dive into coding is the next logical step. Whether or not it yields anything useful is something I’m still waiting to find out. But if it does, you’ll be reading about it here.

%d bloggers like this: