I stopped programming because I couldn't focus.
I don't mean I was in an environment where I was unable to focus. Though this was true too. I was doing standard startup things: fielding constant interruptions from issues, meetings, and helping out teammates. When I told people I was leaving because I couldn't focus, they sympathized — they assumed I was frustrated by interruptions, they were feeling the same problems.
But I meant that I no longer had the ability to focus. Every once in a while, on a rare day of harmonic convergence, there would be no bugs, no meetings, no slack messages. On those days, I still couldn't focus. After I stopped working, now with no possible threat of interruption, I still couldn't focus.
In case it's useful, I want to go over what I lost and what has helped restore it.
Focus
I don't know if I'm using the right word here.
What I don't mean is that I couldn't "work", that I couldn't be productive for the length of the work day. If anything, part of the problem was that the most productive things for my organization didn't require focus. I could, and did, grind on gigabytes of logs all day to find some issue. Or spend hours on Slack unblocking people.
The thing I couldn't do was engage with a difficult problem that required my full focus. Where I could be fully absorbed in the problem and not aware of anything outside of it. I'm intentionally using the term focus over flow to be vague. While I wasn't able to achieve flow either, I'm talking about a superset. In the past, when I was able to focus, it wasn't only being at an editor pumping out code. It was allowing a problem to become so embedded in my brain that I would find myself working on it while waiting in line at the grocery store.
Focusing like this was why I became interested in software to begin with. Math or programming problems can hit this sweet spot where they are small enough to fully fit in my brain, but still require long bouts of concentration. My favorites were those that didn't even need pen and paper to solve, only to be turned over in my head until they yield.
It turns out, sans focus, I don't really like writing software.
Even after reflection, I'm not sure what killed my focus. I have some thoughts, but I've experienced most of these issues in other parts of my career and not burned out. It's some combination of pandemic, interruption, stress, and Slack.
What I've been trying
Though they might sound like it, these aren't productivity tips. I like thinking hard about things, this is a skill, and this is how I'm trying to practice it. I don't care what I produce.
For now, the object of my focus is not programming. It is easier for me to try to focus on other things. Mostly writing, some private, some public. Writing does not come to me as naturally as programming, but I find I can pay the same sort of attention to writing that I could to a good technical problem.
Pomodro
This worked for me a couple of times, but I couldn't stick with it. When I am in the zone, I find the timer to be a distraction. At other times it just makes me anxious.
rating: 2
Changing work locations
I've found working from locations other than my home initially improves my focus. I like working from libraries a lot, especially ones trafficked by a lot of students. I find it easier to concentrate when surrounded by people who are concentrating.
Right now it's difficult to work from a lot of unique locations, so I haven't tried this too much. As a result, I'm unsure how permanent this effect is.
rating: 8
Meditation
I've been using a guided meditation app for about 3 weeks, 10 minute sessions once a day. I have not successfully practiced meditation or mindfulness before. I can see how noticing when I’m distracted or observing my state of mind might eventually help me focus. But I don't think I'm practiced enough to realize these benefits.
I will continue because so far I have enjoyed the process, regardless of whether it eventually helps me focus.
rating: 4
Writing distractions down
I've used pieces of getting things done in the past for productivity. One thing I've always liked about it is externalizing all your tasks. Any time you think of something you need to do, get it down on paper somewhere so your brain doesn't have to worry about it.
I find this is a hard habit to keep, however the discipline of filing distracting thoughts away for later has stuck with me. Even if I don't literally write it down, I can actively dismiss a distraction. It feels close to the mindfulness skill of noting thoughts as they appear.
rating: 6
Reading difficult arguments
Here I mean reading non-fiction with clear but complex arguments. I've had the best luck reading philosophy that I have some casual interest in. So far I think Bernard Williams, Thomas Nagel, and Derek Parfit have been in the sweet spot for me.
I attempted reading difficult prose in fiction, but I found if I didn't understand something it was easy to just keep going without putting in intellectual labor. Also, I like fiction, I'd rather just enjoy it. Reading a difficult argument is different because if you do not follow and internalize the argument, as you continue it becomes more incomprehensible.
On one hand, it's nice to have something that is purely focus-driven. I can work on focus without necessarily being creative. On the other hand, when you do something mentally taxing but haven't produced anything, it's slightly less rewarding.
rating: 8
No Internet days
Not using reddit or twitter is kind of obvious. But I mean not using all of the internet. This is difficult because I need to look stuff up from time to time. I reserve this for when I have something I know I can make a lot of progress on without doing any research. I write a TODO for anything I need to lookup. I think this would be intractable for programming though.
When I'm not working on something I read books or let myself be bored.
I haven't tried the compromise approach of "scheduling" internet time yet. But so far, any scheme that's not dead simple I don't stick to.
rating: 7
Time
There is a good chance this whole post is useless because the only thing that actually helps is taking a long break. I’m lucky — I can take time off.
I'm listing other techniques I'm trying because I feel like they help. I'm hoping to form practices so I don't hit this again later. But nothing else will help without time to recover, and time for new habits to set in. Time is necessary, for all I know it might be sufficient as well.
rating: 10
This blog doesn't usually talk about engineering or burnout. I'll soon return to my normal programming of complaining, 4th-grade-style book reports, and shitposting. If that sort of thing interests you, please consider subscribing.