Programming in The Zone
I would still love to hear your feedback in the comments below. Enjoy!
A lot has been written about the concept of flow, and I was well aware of this particular psychological mode way before I had a name for it. I like saying that I’m in the zone. In The Social Network, they refer to this state as being wired in. The most interesting thing about the zone is, of course, how to get there. I can’t really pinpoint the variables that help me get in the flow (possibly because when I’m in it, I usually don’t think about it), and Wikipedia agrees:
One cannot force oneself to enter flow. It just happens. A flow state can be entered while performing any activity, although it is most likely to occur when one is wholeheartedly performing a task or activity for intrinsic purposes.
There are three conditions that are necessary to achieve the flow state:
- One must be involved in an activity with a clear set of goals. This adds direction and structure to the task.
- One must have a good balance between the perceived challenges of the task at hand and his or her own perceived skills. One must have confidence that he or she is capable to do the task at hand.
- The task at hand must have clear and immediate feedback. This helps the person negotiate any changing demands and allows him or her to adjust his or her performance to maintain the flow state.
When I was reading this article, I simultaneously thought about how this translates to programming and I was surprised to see that every point mentioned very clearly suggests opinions I’ve held strongly for quite some time. Here’s what I came up with:
“It is most likely to occur when one is wholeheartedly performing a task or activity for intrinsic purposes” - good programmers love what they do. You can fake your way into mediocrity, but to reach the top, you’ve got to care.
“One must be involved in an activity with a clear set of goals.” - small programming cycles, consisting of well separated, well-formed tasks, as advocated by agile methodologies, are the most effective way to focus on what you’re doing, do it well, and move from your finished task to the next one with ease.
“One must have confidence that he or she is capable to do the task at hand.” - some people, and rightly so, are sometimes surprised by my hubris. While I try not to offend anyone, I believe that hubris is one of the virtues of a good programmer. It’s the thing that makes you write programs to do something that’s already been done, because you believe you can do it better.
“The task at hand must have clear and immediate feedback.” - some more agile words of wisdom. To me, this translated directly as unit tests. I never work better than when I, in an obsessive-compulsive manner, run unit tests as often as I save my code.
Follow me on Twitter and Facebook