Living with a programmer must be a pretty frustrating experience. For example, programmers speak about this mystical place called ‘the zone’, where they hang out when they’re at their most productive.
The Zone is real. At least, it is for me, and probably you are familiar with some variation of it. The best I can compare it with for non-programmers is the feeling you get when you’re totally immersed in a book or a movie, when the world around you seems to disappear and the only thing that remains is that which you are concentrating on. If you’re more creatively inclined it might be while writing a story or making a painting.
When you’re reading a book in a very concentrated manner and you’re interrupted, it usually takes a bit of time to get back into that same mental state. Usually, when I’m reading a book and someone or something (telephones!) interrupts me, I go back half a page or so and try to restart my reading. Even
an end-of-chapter counts as an interruption and it takes me a bit to get back into the book atmosphere instead of the one around me.
The first time it happened that I really got into coding that deep, is when I was quite young, maybe 17 or so. I wanted to write a system to allow me to compose music on the screen of the computer. It was the very first time that I used ‘structured programming’, a technique a friend of mine had shown to me. I started work after dinner and then lost complete track of time and only realized it was morning and time to go to work when the birds started to make sounds greeting the sunrise. My first reaction was: “wow, it can’t be *that* late”. To my own sense of time I’d only been busy for a few hours at best but it must have been close to 10 hours.
After that, it happened many times, and every time I reached that level of concentration, the work I did was *much* better (and done much faster) than the work I would do when distracted or not really being focused.
Once you realize this you try to replicate the conditions that lead to it, attempting to spend more time zoned in, to be more productive, or to be able to do harder stuff. Apparently, for me the typical situation is that it’s dead quiet, that I have only one thing in front of me on my screen (usually the text editor) and that there is a stretch of time in front of me where I can reasonably expect not to be interrupted.
As the years passed and life got busier and then busier still, my travels to the zone became less frequent. Whether it’s required or not, is up for debate, much of the stuff that I do, I could probably do with my eyes closed and one hand tied behind my back, but really difficult things or totally new ground works better for me when done ‘zoned in’.
One thing that struck me the other day is that when I’m interrupted by a living human being when in the zone, I’m probably not the nicest person to be around. I tend to be extremely irritated when that happens, to put it mildly. (edit: ok, let me be honest here, I’m a total jerk when I’m interrupted, my first response is simply unacceptable but I can’t seem to stop myself. Must work harder on this).
The reason is hard to explain, but I’ll try to anyway. When writing complex code (as in something that is at the edge of my abilities, you may not find it complex, but to me it is) I try to keep a mental model in my head of what it is exactly that I’m trying to achieve, how far I’ve gotten along with it and which parts still remain. An interruption – no matter how short or slight – collapses that whole mental model in fragments on the floor.