Flow in the Age of Distraction: How I Built a Focused Mind
How I Rewired My Mind for Deep Work, Creativity, and Clarity in a World That Won’t Stop Buzzing
For the past three years, I've been on a wonderful journey, self-studying distributed systems, orchestrating data pipelines, diving into data engineering, and exploring deep, complex topics like reasoning and AI.
I’ve dissected Apache Airflow DAGs, Kafka internals, and every technical how‑to I could get my hands on. And it was beautiful, yet extremely demanding.
In that world, everything has a defined structure: we’re talking about things like tasks, dependencies, schedules and so on.
For many years I tried to apply the same rigidity to creative writing (I’m 25 right now). I scheduled my days, sometimes by the minute, but found my ideas stalled. The more I forced it, the more creatively blocked I became.
At some point I realized: what worked for code didn’t work for creativity.
I desperately needed a new system: one built for the wanderings of the mind, not just the precision of a CPU, or the massive parallelization of a GPU.
Fortunately, I wasn’t all alone. Our brains aren’t designed to juggle endless notifications and tedious tasks. Neuroscience shows that multitasking is largely a myth, because the brain rapidly switches tasks rather than doing them simultaneously in parallel.
Every time we ping between Slack, email, and code, a bit of our attention lingers on the last task. This “attention residue” was deeply studied by cognitive scientists: even a glance at your phone can leave a trace that takes upwards of 20 minutes to clear. I think that I’ve felt that drag every day.
That's why I'd sit down to write and find myself still thinking about the last Slack thread or an unresolved bug that had kept me up at night.
Productivity research has found that frequent task-switching actually lowers performance. When I recognized this in my life, I knew I had to treat attention as a resource, not as an infinite well.
Losing the Strict Schedule
Initially, I responded with even more scheduling and more detailed tasks. I tried time-blocking every hour of every day, by setting periods for coding, writing, even thinking.
But, as we said before, creativity doesn’t work like an assembly line, or a software program. Eventually I found myself almost burned out.
The final straw was a routine too tight to breathe; I remember sitting in front of a blank doc, exhausted, my to-do list was nearly half-finished. I decided I had to broke the routine that week and went for a long walk in the woods, no phone, no agenda, no pressing schedules.
Something unexpected happened: I started plotting this post in my head, piece by piece, word by word. It was completely unplanned, yet wonderfully welcomed, and here we are, talking about creativity and flow state, all because I went on a “detox hike”.
Creativity Needs Room to Breathe
That was the take-home lesson: forcing creativity is futile. I then discovered that the science supports this too. Our best insights often come when we’re not pushing consciously.
Many studies show that creative problem-solving peaks when we’re a bit off our mental game: for example, “morning types”, if we can call them this way, get their best insights in the evening and vice versa.
In other words, creativity sometimes needs our least-alert hours. I learned to honor and respect that. If I’m tired from a day of code and/or meetings, I’ll try sketching ideas or journaling rather than intense drafting.
By giving myself space to daydream, I tap the brain’s “default mode”, which is pretty interesting though.
Neuroscientists are now mapping how creativity emerges in the brain. The default-mode network (DMN), a web of regions active during mind-wandering or meditation, seems to initiate those “Aha” moments.
In a recent study using intracranial recordings, researchers found the DMN lighting up early during creative tasks, then handing ideas off to other brain areas to evaluate them.
It’s not a single “creativity center”, but a humming and proficient collaboration across many regions.
The DMN basically runs in the background, scanning for novel associations whenever our conscious focus loosens. That’s why stepping away from a problem ( like going for a walk, doodling, or even taking a shower) can suddenly yield multiple solutions.
I had to embrace the wander. Now I focus on giving space to deliberate breaks for daydreaming or reading. The day after that woodland walk, I had an outline for this article.
Battling Distractions with Neuroscience
Walking in the forest helped me see how much we’re pelted by novelty. Our smartphones are engineered to hijack our dopamine system, turning every swipe and like into a tiny hit.
As addiction expert Dr. Anna Lembke notes, we are becoming “dopamine junkies”: conditioned to seek quick hits of pleasure from constant digital stimulation, even when we know it’s harming our focus.
In her book Dopamine Nation, she explains how modern technology exploits our brain's reward circuitry, reinforcing compulsive behaviors like checking social media, emails, or Slack notifications and so on.
Inspired by that insight, I began treating notifications like poison pills: small interruptions with outsized consequences.
I now do my best to avoid Slack, email, or any reactive digital input until I’ve completed at least one focused, intentional task.
That could be writing an article, crafting a piece of code, or studying a complex framework. It’s not always easy, but the shift has helped me reclaim mental space and protect my creative momentum.
My phone goes on “Do Not Disturb”, and even then I check it only on specific breaks.
I also realized that I had to respect the brain’s core limits. Neurologically, focusing deeply is expensive. In fact, several studies show that the brain can use up to 20% of your body’s energy when firing at full tilt.
Researchers describe an “ultradian rhythm”: about 90 minutes of peak focus followed by a natural dip. If you push through that dip, performance and mood suffer. So now I work in bursts: 75–90 minutes on one task, then a real break. No excuses about that.
I’ve found even a quick walk or a short bike trip feels like rebooting my brain. A study on break-taking even found that pre-scheduled breaks can maintain concentration and reduce fatigue more than ad hoc breaks.
In practice, this means I set a timer if I need to, and when it goes off I literally stand up. It’s a simple cue that basically says: “hey, energy is low, you have to recharge now”.
Parkinson’s Law also guides me: work expands to fill the time available. If I give a day to a task that only needs two hours, I’ll somehow take all day.
By shortening deadlines (sometimes making them “fake” deadlines), I force myself to stay sharp and decisive.
For example, I might block two hours to finish an outline and then stop, rather than drift into perfectionism. Deadlines aren’t tyrants here; they’re basically focus tools.
Setting a shorter timer or giving myself 25 minutes (hello, Pomodoro) often leads to surprising efficiency. I can always refine later – the key is to get the creative juices flowing, not stall on waiting for more time.
Habits That Stick
All these practices eventually became habits; little routines that bypass the need for willpower. Neuroscience tells us habits seems to be encoded deep in the basal ganglia: a consistent loop of cue, action, and reward wires itself into our brain.
For instance, my cue might be making pasta, probably triggered by the smell of boiling water or the sight of a pot on the stove, the “routine” is sitting down with a blank page, and the “reward” is the satisfaction of a few written paragraphs plus that first sip.
Over months this loop has carved a reliable path so I often find myself typing the moment the pasta’s done, almost reflexively.
I didn’t realize it at first, but after a brief research, I realized I was leveraging the very same science that James Clear and others talk about: dopamine surges reinforce routines until the brain performs them on autopilot.
Put simply, I tried to make writing as automatic as brewing my morning tea, at least for the actual writing and editing part.
I also built habits to guard focus: I keep a pad of paper next to me for any intrusive thought or to‑do that pops up during writing. Instead of pivoting to that task (or doom-scrolling), I jot it down and keep going on.
This simple cue–notebook–next–to–keyboard prevents those mental switch costs. It’s like creating a concrete “parking spot” for distractions. Before long, it felt natural: as soon as something off-topic emerged, I’d note it and immediately return to my main flow.
Over time, this practice became as ingrained as tying shoelaces; I hardly think about it now, I just tend to do it.
I’ve also found that environmental cues help cement habits. My writing space is engineered to be intentionally sparse: a tidy desk, soft light, and noise-cancelling headphones ready.
When I sit there, my brain automatically knows “this is writing time.” If I need to code, I’ll move to a different spot. (Switching locations is another cue that separates modes.)
I even got into the habit of doing a very short ritual before writing, sometimes just a deep breath and/or two stretches, to signal the shift in mode.
These small rituals turned the transition way smoother, almost like running a boot-up script for my brain.
Designing a Better Thinking Environment
In practice, I treat my day like an engineer would treat a workflow pipeline. I map out the big blocks of work, but I also know that I have to leave some room for retries and randomness.
The schedule includes hard time for deep work and even harder boundaries against meetings or notifications during those periods. For example, I now schedule one-hour “No Meeting” blocks twice a week where I code or write without interruption.
During those blocks I sit physically at my desk, phone facedown. The rule is: only the task at hand gets my focus. Those blocks have become sacrosanct. Meeting-less mornings or afternoons are my think time.
Outside of work blocks, I try to mimic effective engineers’ habits: something like continuous integration for ideas. That means I review my work at the end of each day, tweak notes, and plan tomorrow’s focus.
If I tried to remember new ideas only in my head, I’d lose them to cognitive overload. But by funneling them into a trusted note or journal (one of those bullet notebooks engineers adore), I free my mind to concentrate.
This is a habit many high-performers praise: it’s like committing code so you don’t worry about it crashing later – only here, it’s your brain that gets a commit.
Some practical techniques that have stuck:
Focus Blocks – Work on a single task for ~90 minutes without interruption. Then take a real break. I use a timer or a Pomodoro app to make it a habit. This aligns with our brain’s natural ultradian cycles.
Digital Declutter – After a month doing this, I went on a “digital declutter”: no social media on my phone, only essential apps. Each evening, I clear all notifications from my computer and phone so nothing pops up uninvited. Out of sight means out of mind, and that has honestly cut a ton of distraction.
Mindful Transitions – Whenever I switch tasks (say from coding to writing), I take a 60-second pause: stretch my legs, close my eyes, breathe. This ritual reduces attention residue. It’s amazing how one deep breath can wipe the slate clean.
Environment Engineering – I keep my workspace optimized. Good chair, earphones for white noise, and a draft jug of water. Physiological needs met = fewer excuses to wander off (like getting a snack every 15 minutes). My colleagues tease me, but I’ve got a “focus playlist” too: no words, just steady instrumentals that quietly signal my brain: “code/writing mode: ON.”
The “One Tab Rule” – In a given focus session, I limit myself to one active browser tab (and only relevant ones). No email, no news. If I need a reference, I bookmark it. Otherwise, I refuse to click on anything that isn’t related. This radical minimalism might sound extreme, but it stops the climb into rabbit holes and endless open tabs.
Above all, I remind myself of real, human needs: sleep, exercise, social time. The neuroscience of creativity (and perhaps even common sense), reminds us that we’re more than cognitive machines.
Adequate rest and low stress actually rewire the brain for novelty. REM sleep has been shown to prime new associations, and even a brief walk outdoors can shift blood flow in ways that promote insight.
Personally, I’ve learned not to feel guilty about taking breaks to play chess or chat about something interesting with a friend; those unstructured moments often feed ideas back to me later.
When I implemented these changes, I felt like I reclaimed hours of focus every week. Slowly, writing became fun again rather than a slog of distractions.
In Conversation with the Engineer and Writer in You
If you’re an engineer, system designer, or writer like me, you probably know how the daily grind can scatter your mind.
My journey from rigid routines to a more fluid creative process has taught me that freedom and focus are not opposites: they’re complementary.
By understanding how our brains work, I tried to designed a personal system that respects our biology: ultradian rhythms, dopamine loops, and the wandering default-mode network.
I fused this science with simple, yet powerful habits: time-blocking, cue-based routines, and intentional rest. It hasn’t made me perfect, but it’s made me more mindful and effective.
Next time you sit down to create, remember: the goal isn’t to eliminate all distractions (we can’t, and shouldn’t). It’s to shape your environment so that focus has the upper hand.
Start small: pick one distraction (phone, tv, email, noise) and script a tiny change. Just one habit can create a ripple effect. Over time, your brain will begin to crave these deep-work periods as its new normal.
And like Einstein retreating to his cabin to think, you too can carve out your own “cabin in the woods”; whether it’s a literal quiet room or simply a Sacred Hour at your desk.
It took me years of tinkering with schedules, apps, and even my own stubborn mind to get here. But walking through the woods that one day, and later reading about how the default-mode network sparks creativity, convinced me of this: we don’t summon focus by sheer will.
We cultivate it with habits, environments, and respect for our natural rhythms in the best way possible. The work is hard but the payoff is deep satisfaction: writing that flows, ideas that surprise you, and a calm confidence that comes from knowing your system works.
So take a breath, engineer a little structure around that creative spark, and watch what your mind can do when it finally gets to roam free.
—Lorenzo