What Else Wednesday ~ if Programming == Writing : continue

What Programming Might Teach Me About Writing
For the past year, I’ve been taking a smattering of online programming classes. These are for my personal edification: not because I’m bent on a career change, but because it’s good to stretch your brain once in a while. Coding requires a different manner of problem solving than what I’m used to. Tasks are approached and torn apart in a more hierarchical manner, which can be foreign to a writer/reader of (mostly) linear narratives. But, I wonder if my process for programming can be adapted to writing.
Let me state, coming at this as a 40 year-old, I am probably not the world’s best coder. While I’ve been involved in webdesign for a while, HTML and CSS aren’t true coding languages. My process is probably ugly and possibly backward, but it gets the job done. Still, I apologize in advance to any engineer/coder I know who might read this.
For me, the process of coding goes something like this:

Decide what the program should do.
Stare at my blank text editor for 2-3 minutes and mutter “I have no idea what I’m doing” at least twice.
Really consider what the program needs to do to get the end result and start breaking it down to its smallest components.
Shrug. Begin to define functions (most of which I’ll need), declare variables (some of which I won’t need), and write print statements that will give me feedback as I test each piece.
Rare is the code of any complexity that executes as expected the first time…
Error messages usually point to a specific line. I interpret what I’m being told and go back to step four and correct my error(s).
Sometimes, the output isn’t at all what I expected and I have to go back to step three and figure out what I’ve made the program do versus what it should do.
Repeat 3-5 until I have all the pieces working together to create a program that does what I wanted it to do. Remove the half dozen print statements I’ve been using to test various parts.
Now, I’m going to look at these steps to see what I can apply to writing:
Decide what story to tell. I rarely start with a full story (beginning, middle, *and* end) in mind when I start writing. This causes problems for me.
Stare at a blank page for 2-3 minutes and mutter “I have no idea what I’m doing” at least twice. (…Step two in coding might have come from my time as a writer…)
Really consider the story. Do I have an ending? What scenes do I need to get there? What characters do I need? What subplots? In coding, this step usually involves me writing a commented out “narrative” of steps. Why don’t I do this when I write?
The simplest translation of this step is “shrug and write junk.” When coding, I have no problem writing junk. It’s actually sort of freeing. For me, it’s a necessary part of problem solving in that venue…
…Yet, when I write I have this expectation that my first draft is going to be perfect. When writing, I have an aversion to going backward, getting rid of what doesn’t work or trying something that might not work but might teach me something about what’s going on. (Or trying something that might work! Most of my programming has been in Python, but the brief time I spent with JavaScript consisted of me trying syntax that I wasn’t sure about, but usually worked.)
Whether this can lead to a fully functioning, entertaining story, I don’t know. What I do know is that I’m a bit stuck in my writing process and a change of direction might be what I need.
I’m going to get back to writing Abbott novellas in the near future. When I do, I’m going to keep in mind a few of the above points.
(Also, if you’re interested in learning to code, I highly recommend the Programming for Everybody course from the University of Michigan through Coursera. The instructor loves his subject and his work.)

