What Else Wednesday ~ if Programming == Writing : continue

ElseWeds
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:

bioinfoimage
A bit of code from my final BioInformatics assignment. There are print statements still intact, but commented out.
  1. Decide what the program should do.
  2. Stare at my blank text editor for 2-3 minutes and mutter “I have no idea what I’m doing” at least twice.
  3. Really consider what the program needs to do to get the end result and start breaking it down to its smallest components.
  4. 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.
  5. Rare is the code of any complexity that executes as expected the first time…
    1. 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).
    2. 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.
  6. 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:

  1. 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.
  2. 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…)
  3. 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?
  4. 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…
  5. …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.)
  6. 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.)

Advertisements

5 thoughts on “What Else Wednesday ~ if Programming == Writing : continue

  1. I’ve never really tried my hand at writing fiction so it could be very different, but in business writing, I had to teach myself that putting a bunch of junk on a page that I could build from, change, delete, etc. was ultimately faster than attempting to put something perfect on a blank page.

    This was a very interesting post. I took some programming classes in college (a while ago). They weren’t my favorite, but I’ve always thought I should give it a go again. Thanks for the class recommendation.

  2. I like your take on this. As someone who writes science papers, dables a bit in MATLAB coding, and has this life goal of writing at least one novel, I will try the MATLAB approach to fiction writing in the future 🙂

  3. Pingback: What Else 2017, Week 2 – The Writerly Reader

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s