Writing and Coding
In the past few weeks, I’ve been writing and thinking about writing more. As I’ve mentioned in the last post, I’ve been listening to the Write Now podcast on my forty minute commute to and from work. The Write Now podcast includes a separate set of podcasts called “Coffee Break” which are interviews with authors. The mix of both episodes about writing and episodes about other writers got me thinking about how I write.
I seem to have been predisposed to wanting to write fiction. I remember my favorite times in English class were the rare times we got to do creative writing. In middle school, a friend and I wrote a very crappy (and short) derivative fantasy novel in the vein of Lord of the Rings and The Sword of Shannara. In college, I took Creative Writing as one of the three liberal arts classes I had in my schedule (I was an Electrical and Computer Engineering major).
I also discovered computers during high school. This was in the heady days where memory was measured in kilobytes and a storage device was a cassette recorder. To totally give away my age, I cut my programming teeth on Apple II’s and a Commodore 64. I am happy to have missed the days of punch cards, but not by very much.
My day job is software developement, so I write code. I’m at the start of an upgrade project where we have to rewrite a bunch of the code that makes the screen look pretty (there’s the highly technical description). Between that and the podcasts, my brain has realized how writing code for nearly half the day impacts my writing.
Ways Coding and Writing Are Similar
- Both Start with a Blank Page – When you write code, you are starting with a blank screen just like in writing.
- You Take Thoughts and Give Them Physical Manifestation – In coding and writing, you take logical processes and translate them in a physical manifestation just like the writer takes his/her thoughts and creates the physical manifestation of the story.
- The Physical Act of Coding is Identical to Writing – It’s no coincidence that programmers “write code”. In coding, you have a fixed grammar consisting of words and rules for how they must be combined. Computers don’t let you violate the basic rules of syntax or grammar, but as in writing, there’s nothing to stop you from creating a non-sensical, grammatically correct statement.
- You Have to Create a Logical Sequence that Directs the Flow– Coders constantly wrestle with taking data, applying some action, and sending to the next logical step in the process. Writing also needs to follow a logical sequence; if you’re writing a mystery, the killer has to pick up the weapon before it’s used, the body must be discovered, the inspector must uncover the clues and solve the mystery. Readers don’t like it if the plot of a novel doesn’t flow in a logical sequence or a deus ex machina device shows up to eliminate the conflict (although I could tell you there are days that I could us a deus ex machina device to fix my code!).
- Debugging and Editing – Same thing. In coding, you fix your “shitty first draft” of code; in writing, you fix your “shitty first draft” of the story. In both, you have to fix syntax, correct logic errors and generally look at it and say “Why did I do that?”
Ways coding has influenced how I write:
- I have to start with a clear idea of the “problem” – Like in programming, you have to know what it is you hope to accomplish. For my novels, I have a very loose outline in my head where I know the general plot points so I’m always moving from or to the plots points. And like a programmer, none of that is documented except in my head.
- I have to work in a linear fashion – I have to start at the beginning and work my way to the end. I would have a difficult time writing scenes out of order and reassembling them into a whole. I have to work chronologically in the story.
- It impacts the tools I used – I write with Microsoft Word. Many writers use it; many writers don’t. Tools like Scrivener let you break your work apart into pieces and allow you recombine it however you wish. Other editors do this or also offer a distraction free environment. I like Word because it really is the IDE (Integrated Development Environment) of writing; there isn’t much you can’t do with Word.
- I do best when I can scroll through the whole novel – This is related to line above. I need to see the whole novel and be able to scroll up and down. I have a sense of where the information I’m looking for can be found and I just scroll back and forth until I find it. I think that comes from moving back and forth betweens screens of code.
- Coming up with a clever solution to a problem makes me happy – I get a great deal of pleasure from staring at a problem (in either code or writing) and coming up with a clever solution to fix it. When I fix something that hasn’t been working, I get very happy. Conversely, when I can’t figure out what’s wrong, I get very frustrated.
- Trying to avoid the use of if/then in my writing – I’ve heard it said that you can tell a programmer’s writing versus a non-programmer’s writing by the use of if/then in his/her writing. For me, this started with my first computer language: BASIC. The construct for determine what to do during a certain condition was always:
IF <something is true> THEN
do something
ELSE
do something else
END IF
While I don’t write exactly like that, it’s second nature to write something like “If I can’t fix this, then we can kiss our asses goodbye.” OK – maybe that wasn’t the best example, but it’s very easy for it to sneak into my writing. And I work equally as hard to excise it.
So What Does This Have To Do With Anything?
So glad you asked. I think understanding the things that affect how you write gives you a wealth of information. It shows you your strengths, your weaknesses, and things that can give you ideas to try something outside your comfort zone. Looking at this list, I think that a good challenge for me would be to either write something with a non linear plot or write the linear plot in a non-linear manner. Or use other tools to move the writing around throughout the work.
How does your profession influence the way you write?
Happy Journeys!
Mike