Search This Blog

Thursday, June 30, 2011

How Writing Code Can Help You Write Better Books

I have two confessions for you today:
1) I'm fascinated by computers
2) I often use computers to distract myself from things like...editing.
Case in point:


As it turns out, computers are not as complicated as you might think. The general public probably considers their computer to be somewhat of a black box, possibly with miniature elves inside that toil away at your every command. I can assure you, the inside of your computer is relatively simple and elf-free; even I was able to build one from scratch. Programs, or more specifically the programming language, can be completely insane.

Let me stress, I'm no expert in writing code...far from it. The extent of my skills barely goes past "Let me Google that for you." But like I said earlier, this stuff interests me. So the other day I was messing around with a basic tutorial for a programming language called Ruby. At the end of the walkthrough, they have you type in code for a rudimentary program that is essentially a number guessing game. I copied the code exactly. My program failed.

After going over the code again (thankfully it was only a few lines), I found the culprit: a missing space. That's all it takes to confuse your simple minded computer: a space out of place. (Remember this the next time your computer or other device isn't doing what you want it to. The order of blame usually goes: Yourself -> the programmer -> the device manufacturer.) So I fixed the errant space and voila! A number guessing game!

So what does all this have to do with writing better books? Well, I like to think of it this way. If you don't have quite the right phrasing, character or formatting in your code, your computer will just sit there with a dumb look on its monitor and flash you the message, "I don't get it." The program won't run until you get it just right. When you DO get it right, programmer and computer will have that "Aha!" moment.

Now, think about a particular scene or description from a story that really resonated with you. Chances are, that author picked that section of writing apart word by word to make sure they got the intended message across. Or they are just supremely talented and everything that flows from their fingertips is instant gold. More than likely, they had a few editors, fact checkers, assistants, spouses, friends, etc reading along to make sure everything was clear.

This is my new Zen moment when it comes to editing my novels. If I take the time to go through it line by line, my readers stand a better chance of actually understanding what I'm trying to say...unless I get distracted. Ooo, moar kittenz!



~VK

No comments: