An excerpt from the Human Who Codes newsletter from the March 2, 2021 edition:
Early on in my career, I noticed a strange pattern. As the only front-end-focused engineer in a small company, it was often up to me to solve the most difficult front-end problems we faced. If I couldn't do it, chances are no one else in the company could. So it was with some shame that I would periodically go to my manager and explain that I couldn't figure out how to do what he wanted. He would just say okay, knowing I had tried my best. But the thing is, usually around 30-60 minutes later, the solution would pop into my head and I'd go back to him and explain I had figured it out. It took me a while to figure out what was happening: it was by giving myself a break from the problem that my mind was able to relax enough to let inspiration in.
It turns out, there's now a whole collection of research establishing that knowledge workers need breaks in order to perform at their best. Think about it for a minute. If you were a professional basketball player, you wouldn't be expected to play the entire game without a break, no matter how great of a player you were. Sports commentators regularly point out when athletes are obviously fatigued because they can no longer perform. That's why all team-based sports have the concept of rotating players in and out, providing them with breaks to recuperate, get some water, and take a breather. They know that even the best athletes will not be able to perform at their best when tired.
Programming is a very intellectually-intensive activity. Our brains use up a lot of sugar, so the more you're calculating, the more your brain is using up one of your body's energy sources. That makes it even more important to take breaks periodically to recover. And by taking a break, I mean you need to get your mind to disengage from whatever you're working on, preferably for 10-15 minutes, away from your desk. A great way to take a break is to go outside for a walk. If you can't go outside, then just getting up from your desk and walking around inside is a good alternative. If you're working from home, maybe you can meditate or even play a musical instrument. Whatever you do, it's a good idea not to go longer than 90 minutes without some kind of break.
When I work with clients on how to improve their performance, I always start with getting them to take more breaks. It seems counter-productive to work less in order to get more done, but ultimately, those little bits of rest are what allow your brain to work at its best throughout the day (instead of getting less efficient as the day goes on). Remember, efficiency isn't about increasing the number of hours you work, it's about increasing the amount you accomplish within the same amount of time.
The Pomodoro Technique is popular amongst some programmers, but there are plenty of other approaches, too. Personally, I'm a fan of working for 90 minutes (enough time to get into a flow state) and then taking 15 minutes off. To force myself to stop, I might use an app, or I'll just set the microwave timer in my kitchen so I'm forced to get up to turn it off. My favorite break is going out for a walk, but I might also pick up my ukulele and strum for a few minutes, call someone, or read a non-technical book.
As we are all struggling to maintain focus going into a second year of social distancing and working from home, it might be time to look at how you work and make some adjustments. Especially if you regularly feel burnt-out, overworked, or otherwise stressed about your job, taking a few breaks during the day can do wonders for your emotional state and your productivity. What do you think? Reply to this email and tell me how often you take breaks, and whether you'll change your approach after reading this email.