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. I literally have to re-build it before I can continue to work and that typically takes anywhere from 15 minutes to over an hour. So a 30 second interruption will cost me a large multiple of the time of the actual interruption, assuming I can get back in to it, which is not always the case.
The productivity boost is so big that my most recent trick to get ‘real work’ done is that I now create the environment on purpose, I’ll wait until everybody near me has gone to bed, I’ll make a fresh pot of tea and I’ll shut down any other source of distraction (telephone, secondary monitor(s) and so on). That way the chances of interruptions (and irritation) is reduced to an absolute minimum and usually in a few hours (two, maybe three) I can get pas the difficult part and get back into easier stuff.
Total immersion is a powerful tool, it makes it possible to achieve things that are normally at or just beyond what I could do in a regular work setting.
If you are always working in a noisy or distracting environment and you find yourself unable to take certain hurdles maybe you should give it a try, this ‘zone’ thing, who knows what you’re capable of when you really concentrate on something.
Living in the zone is not without a cost, I usually take a while to recover, but the net gain is still such that I’d rather use it than lose it, especially when it allows me to do stuff that I otherwise would not be capable of, or that would take me much longer to complete.
And if you’re another one of the inhabitants of the zone, I’m really curious about your experiences, feel free to mail me.
afterword: several people have mailed me this: Flow (psychology) wikipedia link.