⬅ take me back!

welcome to the pit

recursion.txt

It feels like we only go backwards, baby.

Tame Impala

CW for shoddy interpretations of important topics in computer science

In programming, a recursive algorithm is an algorithm that repeatedly calls itself in order to arrive at a solution. A common way of explaining this phenomenon is through the use of factorials. In order to solve for 5!, you solve for 5 * 4!. In order to solve for 4!, you solve for 4 * 3!, and so on down the line.

I had a hard time wrapping my head around recursion in my high school computer science courses. Still do. It reminded me of the ouroboros. What happens when the snake gets all the way back around to its own head? But recursion—the process of going back and going back and going back—is fundamentally vital to many algorithms.

In American culture, we hate to think about turning back. Arguably the entire history of the nation is concerned with pressing on, heedless of the trampled masses. Gatsby's great tragedy was to be "borne back ceaselessly into the past." Orpheus was a coward and an idiot.

Of course, for one reason or another, all of us will have to go back to something, somewhere, at some point in our lives. It's brought me comfort to know that turning back and starting from the top has some practical, mathematical use.

Lately I've been thinking about how important the process of going-back is in the work of a writer. There's a quote attributed to E.L. Doctorow that I see often in online writing circles, and it goes, "Writing a novel is like driving a car at night. You can only see as far as your headlights, but you can make the whole trip that way."

I hate that stupid quote because it isn't quite wrong. In fact it's prety good advice for first drafts, for accepting the untamability of the creative beast and making peace with unpredictable outcomes. But the car metaphor works exclusively for the first draft. It isn't good advice for how to write—it's only good advice for taking your first steps. As you rewrite, revise, and edit, you learn how to get where you're going with greater precision each time you make the trip.1

Writing isn't so much like driving at night as it is like running laps on a track. Each time you reach the starting line again, you're just that much better than you were the last time round.

Of course, if you're not so good at programming—and I was never very good at programming—you'll run into something called infinite recursion. If you've failed to give appropriate conditions under which the computer should exit a recursion algorithm, it will run indefinitely. It's a sick, auto-cannibalistic disaster.

Spend enough time in writing communities, and you'll meet all sorts of people stuck in infinite recursion. They're on the tenth draft of their novel. Or: They've been "world-building" for years, and—just you wait!—they're going to write a seven-tome fantasy epic and its requisite HBO adaptation and make a million gazillion dollars. Eventually. Chapter One is indefinitely forthcoming.

Here I exercise the blogger's god-given right not to come to a conclusion. Maybe the best one I can suggest is a call for moderation. Some writers go back too often. I worry many of us don't go back enough. Find your place in the middle. This is loosely, maybe, tangentially related to computer algorithms because I happened to be getting back into coding around the same time I was thinking about revision, and what am I but a slut for analogies?

Anyway.

1 I think the NaNoWriMo-ification of online writing spaces has seriously undersold the importance of going back—of editing and revision, sure, but also of starting over when you need to, of taking the time to assess where you've been so you know where to go. NaNo absolutely has its place as a useful exercise, and I've done it, but for many people it's the only way they ever write fiction. So there's this prioritization of writing blazing into the night without a care for what you leave behind you. I think it's done serious damage to the way we talk about writing, especially in genre and genre-adjacent spaces, but that's another essay for another day.