DEV Community

Cover image for 5 practices I follow to get into Flow State while coding
Ankit Anand โœจ
Ankit Anand โœจ

Posted on

5 practices I follow to get into Flow State while coding

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 - 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 logo SigNoz / signoz

SigNoz is an open-source APM. It helps developers monitor their applications & troubleshoot problems, an open-source alternative to DataDog, NewRelic, etc. ๐Ÿ”ฅ ๐Ÿ–ฅ. ๐Ÿ‘‰ Open source Application Performance Monitoring (APM) & Observability tool

SigNoz-logo

Monitor your applications and troubleshoot problems in your deployed applications, an open-source alternative to DataDog, New Relic, etc.

License Downloads GitHub issues tweet

Documentation โ€ข ReadMe in Chinese โ€ข ReadMe in German โ€ข ReadMe in Portuguese โ€ข Slack Community โ€ข Twitter

SigNoz helps developers monitor applications and troubleshoot problems in their deployed applications. SigNoz uses distributed tracing to gain visibility into your software stack.

๐Ÿ‘‰ You can see metrics like p99 latency, error rates for your services, external API calls and individual end points.

๐Ÿ‘‰ You can find the root cause of the problem by going to the exact traces which are causing the problem and see detailed flamegraphs of individual request traces.

๐Ÿ‘‰ Run aggregates on trace data to get business relevant metrics

screenzy-1644432902955

screenzy-1644432986784

Join our Slack community

Come say Hi to us on Slack ๐Ÿ‘‹

Features:

  • Application overview metrics like RPS, 50th/90th/99th Percentile latencies, and Error Rate
  • Slowest endpoints in your application
  • See exactโ€ฆ




Oldest comments (20)

Collapse
 
leewynne profile image
Lee Wynne

Enjoyable read, music defo works for me - you should definitely checkout flowstate.to which is also powered by Forem

Collapse
 
ankit01oss profile image
Ankit Anand โœจ

Wow this is amazing Lee! And felt like home as it's powered by Forem :)

Collapse
 
leewynne profile image
Lee Wynne

You're welcome Ankit ๐Ÿ‘Š๐Ÿผ

Collapse
 
hasnaindev profile image
Muhammad Hasnain

Out of five, four points can definitely get you into the "flow" state. However, for me, if I have to do a task that requires though and attention, I cannot listen to any music. It becomes a distraction of sort. If I'm working on something passively, it isn't an issue. Anyone else?

Collapse
 
ankit01oss profile image
Ankit Anand โœจ • Edited

Yes, it's tricky for me too. If I keep the music at low volume, it makes me feel a bit distant from my surroundings which helps me focus!

Collapse
 
forkbikash profile image
Bikash Mishra

Thanks for sharing

Collapse
 
ankit01oss profile image
Ankit Anand โœจ

You're welcome Bikash :)

Collapse
 
wanderingsoul profile image
Jameel Ur Rahman

Another way to let your teammates know is to decide on a signal that they can watch out for. In my current workplace, people wear a headset (whether or not they listen to music) to indicate they're busy and trying to do focused work.

It's worked out surprisingly well althogh it's not really a company wide culture as much as an understanding between team members.

Collapse
 
ankit01oss profile image
Ankit Anand โœจ

That's a cool signal ๐Ÿ˜

Collapse
 
dmkash profile image
Dana Kashubeck

When we were all together in an office, that's exactly what we did. It was so easy to just lift your head and engage with someone on something in the moment. But if you saw they had their earbuds/headphones in, you squashed that and sent an email instead.

Personally, I try to use email for anything that isn't time-sensitive, as I get pinged in Slack so very much. Now when I go heads-down, I log out of Slack altogether and set my status to DND. But it is tough to get everyone to respect that.

Collapse
 
ama profile image
Adrian Matei

I agree with all your points except number 2 - music might distract me... And pomodoro I use 25 min with 5 min pause. I also try to keep non-programming related tasks as short as possible - I am very disciplined when it comes to bookmarking stuff (code and links) that I might recall later. I even built a tool to help with that, it's called Codever...

Collapse
 
ankit01oss profile image
Ankit Anand โœจ

Thanks Adrian! Codever seems like a good tool to manage code and links. If I'm honest sometimes while browsing, I tend to forget why I started :|. I will definitely check it out.

Collapse
 
ama profile image
Adrian Matei

"I tend to forget why I started :|" - Ankit, I hear you loud and clear :)

Collapse
 
christopherkapic profile image
Christopher Kapic

I find that the flow state is also dependent upon what I am working on. If itโ€™s a technology Iโ€™m not too familiar with, then the process feels rough and I am slow, but if it is a technology I know well I can really get going.

Collapse
 
ankit01oss profile image
Ankit Anand โœจ

True! As I mentioned, you can achieve flow state with things you're good at. When I'm also trying out something new, it requires a much more conscious effort!

Collapse
 
hrtsislian profile image
Hristos Tsislianis

This is so much needed especially in the open-office work culture..
Music-wise i find frequencies to be working really well: Binaural beats/ Isochronic tones(especially Theta and Gamma depending if you also need the energy buzz or not) . If i may also propose a (audio)book concerning flow state which is really revealling of the importance of undistracted concentration(and really well written...it just "flows"!): "Deep Work: Rules for Focused Success in a Distracted World"
By Cal Newport

Collapse
 
ankit01oss profile image
Ankit Anand โœจ

Yes, I have heard about this book. Thanks for reminding me about this Hristos! Will put it up for my next reading item

Collapse
 
chinwike profile image
Chinwike Maduabuchi

Interesting fact โ€” Cal is a computer scientist! So the book aligns with our profession. Great recommendation

Collapse
 
hrtsislian profile image
Hristos Tsislianis

There are also natural/chemical substances that work particularly well for entering and preserving flow state: l-theanine(natural, present in green tea) and sulbutiamine(chemical-of course legal and over the counter as "Arcallion" and other brands-), are my favourites, both of which are widely accesible(depends on where you live but then again...e-commerce...but then again...depends on where u live...

Collapse
 
ankit01oss profile image
Ankit Anand โœจ

Oh! I didn't know this