Debugging Stories: How to Revise Like a Programmer

When hackers are shown in movies, they’re always frantically typing code. Unfortunately, this isn’t very much like real programming. Real programming does require writing code, but it’s usually not done very quickly. There’s often a lot of code reading involved, a lot of sitting and thinking, sometimes some discussion, and then a bit of typing. Even with a lot of forethought and careful testing, most programs don’t work perfectly. That’s when the programmer turns to debugging.

Debugging vs. Editing

Debugging is what programmers call the process of identifying and removing bugs from software — bugs being things that the software does that we really don’t want it to do. In some ways, it’s a lot like revising and editing fiction, although they obviously have their differences.

Computer programs are very literal. Programming is a creative process because there are multiple ways to make a given thing happen, but the instructions are either correct or incorrect. They do what you want, or they don’t.

In fiction, there are many more ways to do a given thing, and fixes are often qualitative rather than quantitative — mostly coming down to taste. Because of this, it’s often harder to tell that there’s something wrong with a story, or identify exactly what it is. There might be hundreds of ways to fix those problems in fiction. That can be a good thing or a bad thing, depending on how you look at it.

The Debugging Process

Debugging can be broken down into a few common steps:

  1. Identify possible problems
  2. Identify possible solutions
  3. Make a change
  4. Test
  5. Repeat as necessary

These same steps are a great roadmap for editing.

1. Identify the Possible Problems

It may seem obvious, but it’s hard to fix something if you don’t know what’s broken. As writers, we often have vague feelings that something’s not quite right, or not as good as it ought to be. This first step asks that we really try to identify what the problem might be.

Consider a novel that feels like it’s dragging in the middle. That’s the sort of vague critique that writers often face, but it’s not specific enough to “debug.” The middle might drag because the protagonist doesn’t have a clear goal, or because they’re not pursuing that goal, or because there aren’t enough interesting obstacles standing in their way. Maybe too much time is spent on a side character.

Try to figure out a problem that’s specific enough to describe in a sentence or two. If you think there are multiple problems, focus on one at a time. You may not be sure that you’ve figured out the actual issue. That’s okay. This is a scientific hypothesis. It will be proven or disproven later on.

2. Identify the Possible Solutions

Once a possible problem is identified, the obvious next step is to think about the ways it could be fixed. Don’t just run with the first idea you think of. This is a great time to do a little brainstorming. It’s easy to come up with ideas, but it’s more work to actually implement them.

The next step will be to implement your plan, but don’t throw away your other ideas immediately. You may think of a few improvements that naturally work well together and want to implement them all. Or you may find that the first fix you try doesn’t work, at which point you’ll want to come back and try something else.

3. Make A Change

This is the hard work, but you go into it well-equipped with a problem that you want to fix and a plan for fixing it. Take something out that doesn’t belong, add something in that was missing, or tweak what’s already on the page.

Occasionally, it’s apparent straight away that the chosen path is not going to work. Don’t feel obligated to write out a “solution” that didn’t pan out. You can always go back to steps #1 and #2. However, it’s important to write enough that you (or trusted readers) can make an informed decision about the change. It’s also important to differentiate between a bad solution and a hard one. A great solution that’s tough to implement might just need a few revisions to really shine.

4. Test

In software, once you think you’ve fixed the bug, you run tests to prove it. In writing, the only test that can really be performed is reading the new version. Depending on where you are in the writing process, it might be enough to read it yourself and make a judgement, or you may want to have other readers go through it, or even compare different versions.

The important thing is to make a decision: is it better than it was before? Is it better enough? If so, then you’ve solved your problem. Congratulations! If not, then you’ve got more decisions to make.

5. Repeat As Necessary

A failed improvement isn’t the end of the world. Difficult bugs don’t always get fixed on the first try. You just need to move back to a previous step and try again. If you now think you’re fixing the wrong thing, go back to step #1 and re-evaluate the problem. If you’re still convinced that you’re addressing the right problem, but aren’t satisfied with the result of your solution, go back to step #2 and try another solution from the list, or come up with new solutions.

It’s All About Problem Solving

This debugging formula isn’t a magic formula for success. It’s just a tried-and-true method for problem solving that can be applied to a variety of situations. Writing is an intensely personal experience, and it can be frustrating and disheartening when a story you love just isn’t working. Sometimes writer’s block is just the writer’s brain flailing in the face of an annoying problem.

These steps can provide a dispassionate process for working through that frustration. Addressing the problem through small steps with clear goals makes the problem itself seem less overwhelming. The option to backtrack and try again makes failures seem more like setbacks than crushing defeats.

So next time you run into a big “bug” in your story, don’t just blindly revise in hopes of fixing it. Debug it!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s