I agree with the premise of the article and it draws some nice analogies, but there are so many of these "don't interrupt a developer when they're programming" posts now that it's starting to encourage conceit among developers. I'm a developer myself and get the point, but there's a bit of give and take when you work with other people.
I used to do 'the zone' thing a lot, particularly when I didn't know what I was doing and wasn't designing things properly first. It's only later on I learnt to think first and pick up a pen - it's much easier to handle interruptions when you can turn back to a diagram or flowchart. Coding's really the last thing, and it's pretty much incidental to solving the problem itself.
So do try to minimise your distractions, but don't expect everyone should fit in around your schedule all the time.
Your comment just helped me realize another benefit of my current practice of keeping a “lab journal” of what I work on when I program. Looking back at my last few weeks of work, the few times I was interrupted, I was free to leave my task and deal with the interruption, because I had my current task and its context safely recorded for me to reload when I get back.
This is a really nice conceit. I'd go further and say there are other types of pursuit that are dreamlike. Translation (my own work) can be like that, and to different extents for different languages. Hungarian to English is every bit as complex as difficult code because the structure of every sentence is so vastly different between the two languages that you have to hold the whole thing in your head to get the job done (in contrast to German or French, which I can do in my sleep). Math, especially analytical math, is the same way; you need to comprehend the whole model at once to make any progress.
> Walk up behind an accountant or a web designer sketching out banner ads, and nine times out of ten they’ll know you’re coming from a mile away. But computer programmers aren’t like that. You can stand right behind a programmer for ten minutes and quite often they will not even know you are there–especially when they are working on a difficult section.
Getting lost in your work is not a phenomenon specific to programming.
It does lend itself quite well to this type of focus, however I fully agree that this isn't unique to programming. I suspect the need for "flow", or zen, or deep-concentration of what-have-you is driven by the nature of the task, which involves juggling & visualizing several layers of fairly complex abstraction and rule sets.
I wish he would have stopped short of needing to essentially diminish other occupations. I'm not an accountant, but it wouldn't surprise me if occasionally they too fall into the "zone". Why wouldn't they? Auditing a large and complex system could easily require as much mental agility as coding a piece of software.
This is precisely why, at work, when I need to speak to a programmer (I'm more of a project manager): I tend to Gchat them instead of walking over. I used to the opposite and felt anti-social when I g-chatted.
Now, if I want to avoid feeling anti-social, I walk over after the Gchat session has begun.
This way I know they've moved their attention to me on roughly their own time... and if they were coding they hopefully wouldn't even see my chat until they at least finished the roll they were on.
Another option is email, of course... but IMs have a much more 'I would like to talk in the near term' vibe to them!
(I've realized some of this by beginning to script more myself...)
>> The problem is, as he says, that the programmer already knows everything that needs to be written.
When I was working as a programmer, most of the time we didn't know exatcly what needed to be written. Programming requires so much focus because of the myriad of ways that you can implement a high level concept, and you have to take into considaration all kinds of things like performance, extensibility, portability, ease of maintenance, and so on.
Programming is a mental juggling act. If I get distracted or stop unexpectedly, all the things come tumbling down to the floor and go bouncing and rolling to all corners of the room. It takes a lot of effort (and is no fun at all) to gather the things close, pick them all up, and start juggling again in an attempt to re-synchronize the moving parts in mental thin air.
You're right,
for the first part (waking up), dreaming and programming are the opposite, but
for the second part "let them know you are there but say nothing until they are ready", "If someone wakes you out of bed and starts shouting a long list of things at you to remember, you’ll almost certainly forget what you were dreaming", both are similar (you need time to transfer your dream/task from short term memory to longer term memory, otherwise, you get a short term memory overflow ^^)
Managers need to understand, also, the difference between breaks and interruptions. When I get up to get coffee, that's a break. I will be cordial and pleasant because I can still keep a flow going while having superficial interactions, but if you ask me, "How's the <X> coming along?", now I'm in Sales Mode. That's an interruption. The context switch from programming to getting-coffee cordiality is recoverable; that between doing work and selling work is a 3-hour loss. It's a game of 52-card Pickup that I didn't agree to play.
I don't mind selling. Sales Mode has a place. However, when I'm selling, it's a different kind of flow. Oh, and when I'm in a system that artificially limits me to one client, it's a bit emotionally unpleasant so it really disrupts my game to have to go into that kind of Sales Mode on an impromptu drop.
See, managers are professional salesmen. They sell their reports on the assigned project (the good ones do; the bad ones just say, "do it or I'll fucka-you-uppa") and higher-ups on what they can deliver. For them, the flowful state is selling. That's part of the problem. They don't see it as onerous to put a programmer into Sales Mode instead of Work Mode for 15 minutes, because they're always in Sales Mode.
I used to think sales was this horrible burden, but as I get older and better, I enjoy the "thrill of the chase". When you job hop, you start getting used to selling yourself and hate it less. (You never stop hating cold calls and resume walls, but interviews become fun once you're half-decent.) However, if it's 2:37pm and I'm solving a difficult problem, putting me into Sales Mode on an impromptu fuck-you-I-can-do-this drop is just rude. I wasn't ready for that, asshole. You didn't give me fair warning. Now it's 2:53pm and I might as well go the fuck home, because it will be dark by the time I get that state back. Thanks for that.
Also, the real danger is that managers who annoy their reports with impromptu status pings end up creating an environment where people pre-emptively avoid going into flow because there is no point. Then, nothing gets done. People play Farmville because status checks (as long as you're a decent bullshitter) are less annoying that way.
I used to do 'the zone' thing a lot, particularly when I didn't know what I was doing and wasn't designing things properly first. It's only later on I learnt to think first and pick up a pen - it's much easier to handle interruptions when you can turn back to a diagram or flowchart. Coding's really the last thing, and it's pretty much incidental to solving the problem itself.
So do try to minimise your distractions, but don't expect everyone should fit in around your schedule all the time.