The unexpected downsides of working in a flow state

Blog Mental health Software engineering

5 March, 2023



Introduction

Software developers often talk about entering a flow state when programming, leading to periods of extreme productivity. It's usually characterised by a deep, uninterrupted focus; a total lack of distractions; and several hours disappearing in the space of, seemingly, a few minutes. (With the result, ostensibly, that you produced a lot of work in a relatively short period of time.) Some people describe it as a trance-like state. This is generally regarded as a Good Thing, but I think that there are some caveats to working in a flow state that we should be mindful of.

Of course, flow-state work isn't just limited to writing code. Musicians experience a similar thing when they get in the zone. You could be in a flow state writing a novel. A powerlifter might be in a flow state as they walk up to the bar before a set of heavy squats. Chopping firewood can engender some pretty flow-state-adjacent behaviours. So, to be clear, most of the issues with flow-state work that I describe here are probably only applicable to those who stare at a computer all day.

These issues fall broadly into three categories. 1) Physical. 2) Focus. 3) Sleep.

The obvious physical issues

Small distractions can totally yank you out of your flow state, so people aren't exactly taking regular breaks. But these breaks can be pretty important for your health. You know the deal: Drink some water. Adjust your posture. Do some stretches. Look out the window for a minute at something in the distance to give your eyes a rest. Maybe take a short walk. Take a longer lunch break at an appropriate time; finish work at an appropriate time...

All of these things get thrown out the window when you're in a particularly productive bout of flow-state work. And it can feel really good: You're solving problems at record speed. You're closing tickets left, right and center. You're Getting Shit Done. It may be 7 pm, but the code you wrote in those last two hours (when you weren't distracted by a single email!) was glorious.

I wonder whether it's worth it, though? If it takes a little bit longer to finish something outside of a flow state, but we get there in a more healthy and sustainable way, well; maybe that's okay.

Losing focus in small time-windows

This one is a little more abstract, but I think just as important. If we covet the flow state too fervently, we risk training ourselves to be unable to focus for short periods of time. But the unfortunate reality is that, if your job is to be glued to your laptop for eight hours a day, short periods of time are probably all that you've got.

You will have meetings every day. You will be bombarded by Teams or Slack messages. You will receive unbelievable quantities of email, of which only a tiny fraction will be relevant to your work. You will likely not have reliable access to several-hour chunks of free time within which to enter a flow state.

There are ways to reduce this notification fatigue and get some of your time back. Close your email client, and only open it (say, five times a day) when you are specifically allocating time for that purpose. Book time in your calendar for particular work items, so that people don't try to book meetings with you when you need to get something specific done. Pray that your work allows you to configure Teams to be less intrusive.

But, in the end, your work day will still be fragmented into small chunks of time, bookended by meetings, tasks or interruptions that will prevent you from quickly entering a productive flow state. Most of us simply cannot rely upon large, uninterrupted periods of time to focus deeply on a task. So, in order not to be completely useless, we actually need to be able to work effectively on tasks for short periods of time.

Don't get me wrong, context switching is hard. When you're working on a large code base, it's not trivial to switch focus to writing an email, and then jump right back into the zone. There is a mental toll that you simply have to pay when you switch tasks. But, if we keep training ourselves to need several hours to properly get into a productive groove in a big project, we're training ourselves out of the ability to take advantage of the small chunks of time that we typically get.

This is nothing new, of course. We're all very aware of the attention economy. Chances are, like me, your own attention span has wavered in the face of the unrelenting advance of the internet. We scroll, and skim-read news articles, and have a constant source of distraction at our fingertips. None of this is conducive to an enhanced ability to focus. But it doesn't have to be all-or-nothing: We can, and should, still try to be productive in those 30-minute or one-hour time windows that are often all that are available to us.

Dreaming of electric sheep

Have you ever studied for an exam for several days, and ended up dreaming about your field of study? I remember, during exam periods at university, waking up with chemical reaction mechanisms resolving in my head: electrons flying off from some atom toward another; bonds forming and breaking; rings closing, energy being released... All of these connections flickering through my brain over the last few days would continue to echo along the same paths when I fell asleep, so I would dream about chemistry.

People can experience a similar thing when they've been playing a game for extended periods of time. Classic World of Warcraft players probably dreamed about finally downing Kel'Thuzad and looting the Hammer of the Twisting Nether. Age of Empires players probably dream about Hussars finding gaps in their woodline and raiding their perfect(ly unprotected) farming eco. You get the idea.

But have you ever dreamed about writing code? I can tell you, it's not fun. You wake up thinking about how to solve some problem that you already solved that afternoon. You see function signatures with hundreds of arguments, you see a test suite running and throwing dozens of errors, you see the endless wall of text of a particularly egregious Docker build flying past your eyeballs at nauseating speed...

The real issue is that you're not really dreaming. Your brain is so occupied with whatever problem you were solving that day that it simply cannot turn itself off properly. So you end up with a terrible night's sleep, punctuated by echoes of your work.

This really sucks. And of course, it circles back to the first point about physical health: When we are working in ways that negatively affect our health, we should seriously consider trying to mitigate that.

So, what now?

I don't really know. Maybe these issues are worth the price of admission for extreme productivity? I'm certainly not intending to discourage you from seeking to work in a flow state with this post—just trying to bring a bit of awareness to some of the downsides that aren't often talked about. And, of course, your experience might be completely different. So, good luck with however you work!



0 comments

Leave a comment