5 practices I follow to get into Flow State while coding
Tags: webdev, devops, productivity, discuss
Published: 2021-07-05 12:34:24

How can developers be more productive? Devs need to be focused for long hours, often with critical deadlines and bugs to be squashed.

Can we rely on waking up motivated every day to be disciplined and productive to get things done? No, being productive is a function of the environment we create for coding, the ritual we set, and the practices we follow.

## What is flow state?

Coined by psychologist Mihaly Csikszentmihalyi in 1975, __flow state__ describes a feeling where you become fully immersed with whatever you are doing. In his research studies, participants described the feeling of being in flow state as:

- a musician describes it as a feeling of being ecstatic to the point that you feel as though you almost don't exist
- a figure skater describes it as being on autopilot, where you don't have any thoughts

This sounds surreal but can be accessed with the right practice. But to begin with, it needs a sense of purpose. As a developer, I think it's necessary to find the technologies you like to work on, and once you feel purposeful with the challenges your work provides, you can then set out to find your flow state. It can have a deep, meaningful impact on your mental health and your quality of work.

According to Csikszentmihalyi, the activity should not be too easy or too difficult to achieve a flow state. In other words, it should be something you are good at. If you think about it, coding is as good a pursuit as an athletic or a creative one to practice the art of getting into a flow state.

You will be surprised at how much you can sometimes accomplish when you feel you're "in the zone." So how can we get into the zone, and that too regularly?

## Getting into Flow State
The process of finding your flow state can be different for everyone. But if you follow the fundamentals and be disciplined about it, I am sure you will find it. The following practices have helped me to create a flow state for myself:

### 1. Eliminating all distractions 📵
The first thing I do is turn off all the notifications on my phone. Nowadays, both ios and android phones have settings to disable all kinds of notifications for personal well-being. Flow state requires a peaceful environment with the least amount of distractions around you.

I also put my phone across the room or lock it up in my cupboard. This helps a lot as when the phone is around me, I usually can't resist picking it up. 😛

### 2. Putting on concentration music 🎵
Listening to music while working can help you improve focus, though it's up to personal preference. Some studies have found that music helps activate both left and right brains, maximizing learning and improving memory.

But music should not distract you. You should avoid music with lyrics or with surprising beats. I personally prefer listening to Japanese Lofi HipHop mix at low volume. Also, use a service that is ads-free. For me, youtube premium works well.

### 3. Close email tabs, close slack, telegram 🛑
You have put your phone away, but what about the lingering tabs you have open on your browser. I close off anything that's related to communication like emails, slack & telegram. Though I personally don't use a website blocker, if you find it challenging to keep your hands off Reddit, 😁 then go ahead and use one.

### 4. Letting my teammates know 🗓️
I am lucky to have a team that knows and respects my work preferences. The best way to do this is to find your peak creative and productive times and keep it free from meetings. For many people, it's usually a morning slot with a good night's sleep, and for some, late-night slots work well too, when there are fewer things that can distract you.

### 5. Follow Pomodoro's timer of 45 mins with 5 mins break ⏰
Coding is quite mentally taxing. So to be effective for multiple hours, you need short meaningful breaks in between. I personally use the Pomodoro Technique, which is a very famous productivity hack.

Traditionally it involves breaking down your work time into 25-minute chunks with 5 minutes break intervals. But I prefer my chunks to be 45 minutes long. You should go with what works for you!
___

Well, I need to admit, it doesn't work for me on many occasions. 🤓 Getting into a flow state is not easy. Sometimes you can't avoid practical things like an urgent call from a teammate, or as most of us are working from home, God knows what can require our attention.

But the quest of finding the framework for your flow state is worth it! It's not a destination where you have to be, but a practice that will get better with time and have a meaningful impact on your productivity as a developer.

Let me know in the comments how do you get about finding your zone. What are some cool productivity hacks that you use?

For those of you wondering what I do with my flow state: we are currently building [SigNoz](https://bit.ly/3wYYsut) - an open-source application performance monitoring & observability tool. It's quite a unique mission that we have set out to accomplish.

You're welcome to give our GitHub repo a visit 👇
{% github signoz/signoz %}