The Programming Flow Experience

February 14, 2012

I really, really love the flow experience of programming. It's something that I've been practicing and cultivating for years, and I'm just now realizing that not everyone has the same kind of experience. So I'm really, really curious how other people experience programming flow.

I'm quite a bit self-conscious writing this. In a way, it seems like bragging. Let me make no warranties on the scientific or philosophic accuracy of the statements below; it is only meant to convey my experience.

Also note: I'm writing about single-person programming flow. I currently work at LeanDog, a software studio which emphasizes pairing, and "pair flow" is a distinct experience from single-person programming flow. I value pairing, in fact, it is one of the reasons I wanted to work at LeanDog, but there's some stuff in single-person programming flow for me which isn't in the pair flow and some things about pair flow which diverges from single-person programming flow.

Ring 3

I kind of don't want to program. It feels like work to move my head into the problem. Maybe I don't have my headphones on. Sometimes I put them on as a hack to get me going. I usually have to force myself to start focusing, which I can do mostly because I know what comes next.

(Here is a big difference from when pairing. When pairing, background conversation is no problem at all. When soloing, it is downright disturbing and anxiety-provoking.)

The transition phase to the next ring involves lots of stuff going on in my head, all messy-like. Effort at maintaining focus on the problem, distractions arising, usually other concerns about going to the bathroom or not having something to drink or the drink being too hot or too cold or wanting to be in that other conversation or whether I should start the pomodoro timer or whether pomodoro sucks, how much time I have until that next meeting or whether I sent that e-mail...

Ring 2

Most or all of the non-programming distractions fall away. I can focus on the screen and the keyboard and the code. The music sounds good (I listen to vocal or progressive trance - my current kick is Pandora with Paul van Dyk).

I have this nervous knee bounce. I'm often not aware of it, but it can often shake the monitors two desks away. It starts here, I think.

Ring 1

This can happen suddenly. Sometimes (perhaps just pure coincidence) it happens along with a drop or break in the music, when the tension breaks.

Things feel more spacious, for lack of a better word. There's a direct analog to a feeling of spaciousness in meditation--perhaps what happens is focus becomes tight enough that a lot of the mental noise is dropped. I start thinking in higher level abstractions, about moving objects and methods around, and holding these in my head primarily. This was work before, but now it's rest.

I'm still thinking about how to type code, though a lot of it happens automatically. There's a palpable sense that I'm "pushing my fingers hard", like I'm trying to push code through my fingers and my fingers are not fast enough, and there's a part of my brain devising tricks to push it through harder.

I've noticed that my typing error rate drops considerably here. I type about 95 words per minute on average, but that includes a pretty high error rate. When my error rate drops off, it feels like hitting 120 is pretty easy.

I'm often bouncing to the rhythm of the music a little. I usually still have my nervous knee-bounce.

Ring 0

I don't always get here, but it is pure bliss. I don't see the screen, I don't feel the keyboard. I'm just thinking about the abstract concepts. The spaciousness takes on a new dimension. There's space between the musical notes, and between the concepts of the program.

I've noticed my breathing here a few times. It is slow and regular in spite of the mad motion of my fingers on the keyboard.

My nervous knee-bounce often disappears.

Tags: objvimmer hacking