Published: 2015-06-18
Tagged: flow, programming

I describe what I call "The Flow" - a particular state I try to achieve when programming - in this article.

The Flow

I enjoy programming. I love getting into the flow. I am addicted to this state. However, in a positive way. It is an unparalleled effective and efficient way to write quality code!

When I am in the flow I do not think actively what I am going to write next. It just happens. You could compare it to typing. When you are typing you are not aware what keys you will press next. You think about the words and sentences. The fingers however move without effort, magically. Playing a music instrument is also a good comparison. A musician is not aware which movements cause which sounds while he is performing. Writing code in the flow is very similar. You don't think about the commands, functions and so on in awareness, they just appear.

Getting into the flow is difficult and I often fail to achieve it. I do not have a recipe which is sufficient to get me into the flow. I do know a few conditions which are necessary. I also know a many circumstances which prevent me getting into the flow.

To get into the flow I must know in advance what I am going to implement and in which way. The algorithm, in something you could call pseudo code, is present in my mind. This requires that I have thought the problem through before I even touch the keyboard. Getting into the flow requires preparation.

People around me doing things will prevent me from getting into the flow with certainty. We have automatic blinds at the office. They go up and down very frequently. Moving blinds interrupt the flow with certainty. Getting into the flow requires a visually stable environment.

I tried various ways to shield me from my surroundings. For example listening to music shields me. However, it also prevents me from getting into the flow. Getting in to the flow requires silence.

There is one peculiar surrounding which sometimes works for me and is somewhat counterintuitive. It is a sitting on a table in a moving train. However, the coach must not to be crowded, rather empty even.1 A ringing phone or a loud conversation will most likely interrupt the flow. Also peculiar, if the train stops I will most certainly loose the flow. Moving trains can be a good environment for getting into the flow.

These are the things which work (or work not) for me to get into the flow. However, I observe people and from talking to other good programmers I believe that there is a general truth here.

Unfortunately, there seem to be many people which do not understand what the flow is or why it is important. I hope my elucidation helps. I am baffled that a lot of programmers seem not to understand it either. This is sad. It is possible to write effective software without getting into the flow. But it is at best mediocre, probably poor do so. Mediocrity is not an acceptable goal for professionals. We should thrive for greatness.


  1. I suggest to try the first class coaches in Switzerland if that is possible. However, avoid the rush hour and also avoid the designated business coach as people tend to be loud in there.