Both writing code and fiction feel like very similar endeavours, from initially not knowing where it is all leading, through to the satisfaction as you read it back, happy that you have captured the idea in a clear and succinct manner.
First, as a developer, you have an empty project in your IDE and a problem to solve. Your initial attempts are often messy as you learn about the domain and play with solutions. At this point, maybe it works, but the code is ugly. I don’t want my name associated with this when someone views the ‘blame’ attribution.
Writing fiction, you have a blank page and perhaps a scene in mind when you start—it might not be the beginning of the story. The first iteration is often messy: snatches of unattributed dialogue, descriptions, notes to self. It looks hopeless. How can I ever turn that into fluent prose that a reader will enjoy?
So now you understand the problem and have a sketch of the solution—no matter how ugly—you recognise patterns, find better ways to express the design that are easier to comprehend. You create a DSL (domain-specific language) using meaningful names and structures.
The first version of the piece is complete. You know what happens and have it arranged in a suitable dramatic structure, with a beginning, middle and end. For the dialogue, it needs to be clear who is speaking, through tags or action beats. Descriptions need to be filled-out, to pull the reader into the scene.
Now we have working software that is passing its happy-path checks. The next step is to, where it hasn’t already been done, handle any edge cases, the failures that could occur when the program runs. We must deal with errors in the functions and services we call, and translate them into a form that users of our code can consume. We run our tests and see them all green. We are now ready to ship it.
The scene is now complete and the next step is line editing. Look for sticky sentences, overly repeated words (echoes), slow paced paragraphs. There should be a healthy mix of long and short sentences, avoid distracting alliterations and rephrase any painful cliches. We run our grammar checkers and see all is sweet. We are now ready to publish it.
The steps above are iterated over as the software system / book evolves. You go back and refactor/rewrite as you learn new things about the problem or the characters and their environment. Through all of this the maxim is: Keep it as small it can be and still function correctly / serve the plot. Remove all extraneous stuff. Y.A.G.N.I.
With the software written and tested (perhaps not in that order), it is ready to run on a computer’s hardware. The language we used is translated into instructions for the target machine. It now runs on that environment, doing the job we designed it to do.
With the story written and published, it is ready to run on the reader’s wetware. MRI studies of readers engrossed in a work of fiction suggest the brain runs a story’s scenarios as an artificial reality program. To the reader, it’s as if they are experiencing the events described in the book.

Leave a reply to Fred Johansen Cancel reply