Imagine that you are immersed in a task, completely absorbed by the process of executing it. Your mind is one with what you are doing. Complexities of the task are clear and all aspects seem connected in well-understood ways. Your body appears to be floating and only exists to support your mind. You are only vaguely aware of a broad sense of aroused serenity. Hours pass by in minutes, and you are in full control of your thoughts and emotions.
I am not describing the effects of some illegal drug or wild mushroom. I am representing a state of mental flow. Programmers live for it and work at their peak potential when they are in it. Also known as "the zone," Flow is the mental state of operation in which a programmer is immersed in a feeling of energized focus, complete involvement, and enjoyment in the process of coding. Flow is not a concept unique to computer programming, but software developers are very familiar with it.
To reach a state of flow one has to rid themselves of any and all the six anti-flow emotions:
Flow lingers in a consciousness zone between mental arousal and control. It is an active state that takes ten to fifteen minutes to reach. Anti-flow emotions or sudden distractions can break it in seconds. Losing flow due to external causes is like being punched in the face.
It is tough for developers to reach a state of flow and peak performance if they are distracted by anti-flow emotions. Some typical examples of causes of such feelings are:
- Worry and anxiety due to having concerns about deadlines or unreasonable expectations imposed by an organization, a leader or a situation.
- Being upset by personal or professional issues. For example, having unhealthy internal friction with colleagues, or operating in an organization that is not being fair or understanding of the needs of the employee.
- Not being interested or enthusiastic about an activity or its goals. This can happen when the activity is far too easy or far too difficult.
- Feeling too relaxed. To reach flow a developer needs to be excited about the work and must have a feeling of control of their thoughts. Relaxation does not co-exist with excitement and causes distracting reflections.
Programmers who belong to a group that feels unsafe or judged can be negatively affected. For example, I am convinced that the recentÂ Google debacle, caused by the employee who published an anti-diversity manifesto, caused an enormous distraction and loss of productivity at Google in the past few days. It affected most women in the organization and a significant percentage of men.
Bad sentiment toward a group is a toxic self-fulfilling prophecy. Members of minority groups who feel unwelcome or unappreciated will struggle to concentrate and won't be able to reach a state of flow.
For example, imagine a female developer working with a group of men who makeÂ it clear that they do not believe women can be good coders. How can she be productive and achieve a state of flow in such an environment? The mental overhead of having to deal with bias creates an invisible barrier to success. It fulfills an unfair prophecy without giving her a chance to prove herself.
To create an environment conducive to flow, consider the following eight suggestions for developers and individual contributors, and seven suggestions for engineering managers.
If you know that something is not achievable, make it clear. If that is not acceptable, consider a different employer.
When you must commit to a body of work, make sure that you believe it can be achieved. If you are convinced that the goal is impossible, you are going to lack the confidence necessary to enter a state of flow.
Growing up, I used to spend entire nights coding. It wasn't rare to have 10 hour non-stop sessions. I did it at night because I knew that I would not be interrupted. Having that confidence is very powerful as it eliminates the worries of getting interrupted.
As a busy adult, you can control some of your time by blocking your calendar with coding time. If your co-workers respect it, you should be able to establish some level of non-interruption confidence.
Without a clear goal and without believing in the importance of that goal it's hard to reach the zone. Do not underestimate this mental preparation; it is vital for peak performance.
You blocked your calendar, but if your phone notifications bring you back to reality every 10 minutes, you will never be able to achieve and keep up a state of flow. Turn off devices and applications that send you notifications.
Ideally, your work environment allows for your desk to be the place where you can focus. If that is not the case, hide in a conference room or the local Starbucks. If you go to a noisy environment, bring your headphones and pump some white noise in your ears.
If you are in Flow and you need to get up to talk to somebody, you are going to slam back to reality like a ton of bricks in free-fall. It hurts! Collect the information you need before a coding session.
When you start coding, you should not be concerned about having to hunt down information. I found that surfing the web to look for information doesn't immediately knock me out The Zone. It does after a few minutes if I get irritated when I cannot find what I am looking for.
Any sense of concern needs to be put away before you start a coding session. Flow is tough if you have concerns polluting your mind. I found that worries and anxieties go away for the duration of a coding session if I write them down with the clear intent of getting back to it later.
In flow, the process is king. Focus on it, entirely. Be aware of the end result, but don't dwell on it. If you can do that, time starts changing speed, accelerating to the point where hours go by in what feels like minutes. Stay in the moment, stay in the process.
It might sound counterintuitive, but flow is not a relaxing state. It is an exciting state of mental arousal and confidence. If you become too relaxed your mind starts wondering, you lose touch with the process and the magic disappears.
If you are drowsy or relaxed, get up and work standing up. Having a desk that can go up and down is ideal to follow your body needs.
Your team must feel safe and protected. Remember that anxiety and worries are the enemies of flow. Don't confuse "safe and protected" with "relaxed," as discussed the two things are very different.
Imagine being at home playing a war simulation video game. You know you cannot get hurt, so you know that you are safe and protected. But, to play well, you must be alert and in a state of extreme concentration. That is exactly the state you want your team to be. Safe and protected, but alert, focused, mentally aroused and confident.
Discrimination, judgment, bias or non-benevolent friction between team members make the environment feel unsafe. Those feelings must be eliminated for the team members to perform at their peak. There cannot be any tolerance for that kind of thing. Eradicate it.
Unconscious bias is sneaky. People don't know they have it and they don't want to have it. Make your team members aware of what unconscious bias is and what to watch for. Have that discussion with the team in the same room at the same time, so that everyone can ask questions and hear the same answers. Making people aware of unconscious biases is often enough to resolve many problems.
Do not overestimate the effects of proximity. Ideally, your team members sit next to people they trust and respect. If there is unhealthy friction between team members, or if some people are not comfortable where they are, address the conflict or change the sitting arrangement.
Give your people an environment that is compatible with their needs. If they are next to the wrong people, you are making their life harder.
It takes between 10 and 15 minutes to get into a state of flow. If you schedule two meetings 30 minutes apart, you are wasting people's time. It guarantees that developers won't be able to get in the zone startingÂ from several minutes before the first meeting starts to at least 10 to 15 minutes after the second meeting ends.
Furthermore, being in a state of flow for only a few moments is frustrating. Knowing that a meeting is looming is also distracting. Try to structure meetings to be back to back, or at least 2 hours apart.
Random breaks are a flow killer. Setting simple intrusion guidelines helps to remind people to be respectful. For example, people should not go and interrupt others every time they need something. Are there different methods of communication for different types of topics needs?
For example, people should not interrupt others every time they require something. Are there different methods of communication for different kinds of questions and needs?
There is a fine line between "being challenged" and "being stressed out." Do not cross that line, no matter how much pressure exists. You will not get better results.
For the members of your team to be in a mentally aroused and positive state, they need to understand goals, priorities and the importance of the work they are asked to do. They need to have a clear big-picture so that they can focus on the process to achieve goals they understand. It is up to leadership to make all that clear, at high-level. If your team has doubts, they will most likely have a hard time reaching and staying in a state of flow.
It is up to leadership to make all that clear, at high-level. You also need a true and believable commitment from your team. Avoid forcing unrealistic commitment. If your team has doubts, they will most likely have a hard time reaching and staying in a state of flow.