No Sleep: Writing Code vs. Writing Novels

March 2, 2008

I have been recovering unsuccessfully from a trip taken for a secondary job in mid-February which devastated my sleeping-schedule. Coupled with a frustrating schedule shift every Saturday at my primary job, I have been unable to recover my normal sleeping pattern. Since that weekend, I have found myself irresistibly sleeping fifteen hours or more one day each week (Thursday or Friday), which recycles my body's rhythm. I have no idea how to combat this, and it has been extremely detrimental to my writing. I failed to manage 10,000 words last week because my exhaustion made my mind weak, and even now--as I sit here in the library at work--I cannot concentrate. I would probably drop into slumber if I were home, despite it being "off" my normal schedule.

The worst part of this is how it has hindered Gathering Thunderheads. A lot of people probably can't be sympathetic to this idea, especially if they have no familiarity with the process, but I cannot write--nor edit/revise--while tired. Oddly, I can write code: I used to write code for stretches approaching 24 hours, staying awake 36 hours straight three times in one week, and going to sleep simply because I knew it was a good idea, not because my programming was suffering.

My instinct is that those should be reversed.

Writing code is a highly logical process. Yet even so, a lot of it was for me by "feel". I would write lines and lines of code without thinking it out consciously, without concretely figuring out the logic of it--I would know what I needed the routine to accomplish, and I would delve into it--and somehow, despite lack of planning and conscious involvement, it would all somehow work out. It seems impossible, even describing it, but that is honestly how a lot of programming went for me.

Writing does as well, at the best moments. But at the same time, there are many stretches when my mind has to be "awake" on several levels: "seeing" through the empathetic consciousness of the character I am writing; being aware of all the other characters and what they are doing; being aware of the language, the words, and how they are affecting what I am describing and portraying; considering the larger questions of how it fits together, how the pacing is working, and the kinds of things that I need to be doing to pay off and set up other parts of the narrative. Truly, most of this is accomplished second-hand, in the revision, but usually some aspect of all of it is working at the same time even during initial composition. Other writers work differently: this is one of the reasons I am a slow writer. There are a lot of balls to juggle.

Writing code was far more compartmentalized. Especially Object-Oriented code, or even the pseudo-objected-oriented: each piece, once complete, did what it was required to do. From that point on, I did not really have to keep those things in my head. I didn't have to remember how the guts of each function worked--now that I had the function, I only had to know how to use it: what input was required, and what output it provided. I worked on tiny little pieces of the overall project at a time. I remember--during the time when I actually made money writing code--being told about something my program was doing and being surprised that it actually had that functionality. It was a piece I had quickly written and put out of my mind.

With a novel--or at least the way I approach them--the relationship of scene to complete work, or even sentence to complete work, is far more entwined, far more nuanced. I have to remember all of it, have to keep the pieces in mind. I can push through without that level of concentration, but this will often lead me astray and create more work in the long run. The act of composition, of writing actually requires a lot of effort. It requires sharp faculty, not dulled by lack of sleep.

This may be a huge excuse, but it's true. Yet I do write when tired--just not very much. It takes considerably more effort for me to write when tired, and I bang out 3 or 4 hundred words in the time I might have written a thousand or two. And then there are times like now when I struggle to keep my eyes open. This essay has been a welcome diversion. If I had tried to write Li'Arin's chapter (or revise Quorin's), I would have failed. (I did--and did.) When I get home I'm probably going to go to sleep almost right away. Last week my body rebelled and I could only sleep in bursts of 4-6 hours at a time (for some reason, my brain seemed to deny my preferred schedule) until that day I slept 16 hours. This is becoming very frustrating--and tiresome.