DEV Community

Cover image for 15 Best Ways to Achieve Flow
Lorenzo Pasqualis
Lorenzo Pasqualis

Posted on • Updated on • Originally published at coderhood.com

15 Best Ways to Achieve Flow

This post was first published on CoderHood as 15 Best Ways to Achieve Flow. CoderHood is a blog dedicated to the human dimension of software engineering.

That amazing feeling.

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.

What is flow?

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.

Anti-flow emotions.

To reach a state of flow one has to rid themselves of any and all the six anti-flow emotions:

  • Anxiety.
  • Worry.
  • Anger.
  • Apathy.
  • Boredom.
  • Relaxation.

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.

An unhealthy culture is a flow killer.

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.

15 best ways to promote flow.

To create an environment conducive to flow, consider the following eight suggestions for developers and individual contributors, and seven suggestions for engineering managers.

Eight ways for developers and individual contributors to reach of flow and peak performance.

#1 - Do not commit to impossible tasks.

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.

#2 - Create distraction-proof time on your schedule.

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.

#3 - Understand your goal and why it is important.

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.

#4 - Remove distractions in your control.

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.

#5 - Collect all the information you need ahead of time.

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.

#6 - Make a list of problems that are upsetting you or causing anxiety.

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.

#7 - Focus on the process, not the result.

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.

#8 - Do not relax.

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.

Seven ways for managers to help teams reach flow and peak performance.

#9 - Create a safe and protected working environment.

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.

#10 - Have zero tolerance towards non-benevolent friction.

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.

#11 - Educate your team on unconscious bias.

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.

#12 - Avoid the "girl in a frat house" syndrome.

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.

#13 - Avoid non-contiguous meetings less than 2 hours apart.

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.

#14 - Establish guidelines to avoid random interruptions.

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?

#15 - Clarify priorities and do not force unrealistic commitments.

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.


If you enjoyed this article, keep in touch!

Top comments (10)

Collapse
 
eljayadobe profile image
Eljay-Adobe

All spot on! For me, the biggest killer of "getting in the zone" is interruptions. Not distractions (yay! for having an office with a door).

At work, we use Slack, and Microsoft Outlook, and Jira, and Trello. My workday starts by going through the activity on those communication platforms, then I turn my back on them for the rest of the day. I do not do any Facebook or personal email at work.

When I'm on dev.to or StackOverflow as I sometimes am at work, I'm in the middle of a compile.

And although dev.to and StackOverflow is a nice way to spend a couple minutes while waiting for a compile, I really wish a compile took but a moment. That's my biggest interruption of the day. Our project is not optimized for build time; quite the contrary.

Joel Spolsky, someone who often has keen insight to problems, also chimed in on this topic.

Where do These People Get Their (Unoriginal) Ideas? about getting into the zone, and the cost of interruptions.

Human Task Switches Considered Harmful on sequential tasks versus multitasking, for humans.

Collapse
 
ben profile image
Ben Halpern

I'm pretty sure this interruption is why I've never been able to get into compiled languages. I haven't consciously decided I won't work like that, but it has always made me drift away from it.

Collapse
 
eljayadobe profile image
Eljay-Adobe

Huge advantage to scripting (non-compiled) languages is that it is possible to have a super-fast edit/run cycle, and quite often have a lot less unnecessary code ceremony. Depending on the scripting language, may even be able to edit the code live. The major disadvantage is poor static analysis.

Huge advantage to compiled languages is that they can do all sorts of static analysis for type correctness, and are (typically) a lot more performant. The major disadvantage is edit/compile/run cycle is painfully long.

(JOKE ALERT)

Then there are "hybrid" languages in between those two camps. Like Java. Which has all the disadvantages of a compiled language, tightly coupled with all the disadvantages of a scripting language.

(END OF JOKE ALERT)

Note to Java users: if you like Java, just substitute C# and enjoy the joke.

Thread Thread
 
ben profile image
Ben Halpern

Yep. Logically I love the advantages of the compiler. My human brain hasn't taken to that pace though. I suspect eventually I'll find something in that arena that works for me.

Collapse
 
ben profile image
Ben Halpern

Another great post

Collapse
 
pawelsalawa profile image
Pawel Salawa • Edited

As for the distraction-proof time, I personally like to intentionally interrupt my coding at least once per hour. It often helped me with getting perspective and figuring out yet better solutions. Of course I'm not talking about going to meetings, but rather for a tea/coffe, maybe chat with someone.

P.S. I don't know how you do it Lorenzo, but it's always a great pleasure to read your articles! Even sometimes I feel like "this subject is not so interesting to me", I go and read first few sentences, because I know if you wrote it, it's worth reading. And then I realize I just finished whole article :) I was never disappointed. You have great skill of talking about things with easy language, yet very accurate and valuable! I really appreciate this.

P.P.S. The best solutions for really difficult problems I came up during the evening shower, or in the bed. Sometimes taking break for longer time, having some relax can really help. This effect is not new though. It was mentioned in numerous scientific articles.

Collapse
 
lpasqualis profile image
Lorenzo Pasqualis

Thank you, Pawel! Your kind words made my day.

Collapse
 
bgadrian profile image
Adrian B.G.

I don't agree with interruption, I work in a small team and each interrupt is a bottleneck of a peer, means someone is in trouble and I'm glad to help him/her. We encourage them and the productivity as a team is increased. Being a team player is more important for us then writing more code.

Also I wrote about a bit on staying too much in the zone can do more harm

Collapse
 
auct profile image
auct

Also you should know what are you doing to get into flow. I mean I can't get into flow when I'm learning something new.

And yes, I hate Android compiling 1-2 mins and your flow is dead.

Collapse
 
rogerpaviani profile image
Roger Paviani

Great post! This suggestions are gold!
Flow is not only important to get satisfaction, but also promotes productivity.