Wednesday, May 13, 2015

Computer Programming & Writing Mysteries, Kindred Spirits?

Rick’s post yesterday about some of the comments he’s received when people find out he writes crime fiction made me laugh and shake my head at times. I haven’t been writing long enough to get a lot of comments from people I meet. The only one I fairly consistently get is something along the lines of: “You used to be a computer programmer? That’s quite a change to writing mysteries.”

I’m here to say it’s really not that much of a change. Sure, there are differences, but there are more similarities than you might think.
  • Both writing and programming require you to sit in front of a computer for long periods of time. They’re both fairly solitary activities. But, since I worked on fairly large projects that required over a hundred programmers, I had more interaction on a day to day basis with people when I was programming than I do writing. I can also program for many more hours at a time than I can write.
  • They both require you to create something from nothing. A writer starts with a blank page; a programmer starts with a blank file.
  • They both start with an idea. My novel, Fatal Brushstroke, started with the image of a young woman finding the body of her painting teacher in her garden. A program starts with the idea of what that program should do. Should it allow the user to create and edit documents? Should it be a game? Should it allow you to read e-books? You get the idea.
  • They both have a set of requirements. Programs have a list of features or things that they’re supposed to do, more specific than the general idea of the program. e.g. in a document editing program, those developing it need to know/decide the very specific tasks that a user can do. Should the user be able to edit an already created document? Add graphics? Add pictures?... Mysteries have a set of expectations/requirements that a reader has of them. If you’re writing a cozy, that expectation is somewhat different from what a reader expects from a P.I. novel or a thriller.
  • They both involve a period of design. Programs, especially large projects, require a period where you design algorithms, decide on data structures, decide how each element is to be partitioned into work for the programmers assigned to the project. In writing, if you’re an outliner (as you might have guessed by now that I am), there’s a period where you’re deciding on the crime, the victim, the general plot points. Even if you’re a pantser, I still think there’s a period where you’ve thought about the crime and the characters involved. It’s just not written down or formalized.
  • They both (can) involve deadlines. If you’re writing to a contract, it definitely involves deadlines. If you’re writing for yourself, not so much unless you impose your own deadlines. Programming also involves getting tasks done by some specified period of time. (I feel like programming deadlines were a lot more flexible, though.)
  • They both have artistic elements. I consider programming to be an art. Sure, it’s basis is in science, but writing a program can be a very artistic endeavor. There are a lot of ways to write a specific program, some more elegant than others. Creating an elegant piece of code is as satisfying as writing a good story.
One big difference between the two is the word count requirements. The equivalent of that in programming would be number of lines of code. The number of lines of code is an interesting statistic in programming, but it's never a requirement. But, when it comes to writing, a contract specifies the word count requirements. Since I tend to write short, this is always a challenge for me to get to the specified count.
The biggest difference in my mind: In programming, the judgment of the finished project is a lot less subjective. If the software you’ve written meets the requirements, it’s good. Sure, someone may grumble about how messy your code is but, if it works, it’s okay. But, even if you’ve written a book that meets the mystery expectations/requirements, that doesn’t necessarily mean people will think it’s good.

I find programming to be a much easier activity than writing. (A lot less angst-ridden, as well.) I may feel that way, though, because I programmed for a lot of years and haven’t written for as many. Maybe twenty years from now I’ll feel differently. I think I’ll tuck this article away somewhere so I can revisit it years from now.

On a different note, I was at Malice Domestic recently where I got a chance to see my editor in person. Always a good thing. Here we are. (That's me on the right):

1 comment:

aliyaa said...

you’ve written a book that meets the mystery expectations/requirements, that doesn’t necessarily need help with programming assignment.