Taking breaks as a developer and how to do it right
The nap
Its 3:30 in the afternoon. Youre trying to refactor this piece of code and your already dwindling motivation is somewhere on holidays in the carribeans. The workstation buzzes and makes your eyelids drop lower and lower. Time becomes like an eternity made out of another eternity. Your stomach is full and you wish youd be working at Google so you could take a nap right now.
If the above paragraph resonates with you I want to tell you I too have been there.
My situation
When i was starting my job as a developer i soon realised in order to increase my productivity i would have to learn how to deal with long periods of focused work that would affect my productivity negativly after some time.
Not only did my productivity dip after a certain period of time also additionally after a full, long working day i was usually way too exhausted. I knew I needed to improve something desperately.
I asked myself how can i improve my situation and be more productive?
I did alot of research on the topic and one thing I ended up trying was taking breaks. It sounds rather counter-intuitive and I was very sceptic in the beginning. Do less work but get more work done?
Well, alot of people would disagree here, but I thought to myself: Its a marathon, not a sprint.
And by the way: its als highly recommended by science.
So, I usually only took short coffee breaks and there was definitly some room to improve. So i decided to do some reasearch.
My research focused on how much break time you should take, when you should take breaks, and what your breaks should be like and I want to share my findings with you now from the angle of a developer.
Start taking breaks
I started with breaks of 15 minutes every 52 minutes as this seemed to be the most recommened time window by science. What i recognised very soon after implementing this break schedule: My mood was better. My perceived workoutput improved and i was less tired at the end of the day and my eyes hurt less.
But there was of course a caveat. I would get interrupted from my work way too often. As a programmer that can be especially annoying and tiresome, even more so if you are deeply engaged in a topic that requires complex problem-solving and it would often take away my focus.
Fewer breaks are better?
So i tried to acknowledge my mistake by increasing my work time to 90 minutes with again a breaktime of 15 minutes. This did work better in terms of not getting interrupted as frequently as a receptionist and still gave me the benefits of having a break. But the effect was that during the day I felt tired more often and I did admittedly loose focus more often.
So as this didn’t work out as perfectly as i thought i adapted my break times again and thought to my self, 90 minutes is too long and 52 is too short, then the solution must be somewhere in the middle.
As a result i started taking 70 minutes turns. And this worked so far the best for me as I think I found my sweet spot between a good period of focus where i can get into a topic deeply and maintaining focus over a long period of time and still have the benefits of my breaks.
Further Improving Productivity
Flow
As i mentioned before, oftentimes you are deeply engaged in a complex topic and being forced to take a break, can interrupt your flow completly. If you are in such a situation and your clock recommends a break, i suggest to keep working until you reached a result, or a breakpoint or some point where you can pick it up again.
Just dont stick religiously to your break schedule. Flow is oftentimes more important , as it allows to dive deep into a topic. Use flow wisely once you have obtained it.
Write down your intermediate result
But if you have to go into break what works wonders is writing your intermediate result down before you leave your workstation as you have a much easier time continuing your work when you come back.
This I also recommend heavily before you leave work, especially over the weekend. This does not only apply to your work as a programmer, but here especially as tasks are often complex and require time to get back into.
Whats the best type of break?
What to do in my break time to get the most benefit out of it?
Most recommended and by far the most energizing is to take a walk. The increased amount of fresh air and the movement as well as the change of scenery can completly reboot your whole system. Id rather work 15 minutes longer and have a walk in between then miss out on a nice walk. If you can catch some sun aswell its a huge bonus.
But what works also is just having a nice chat with your colleagues. Sharing a laugh can release those happiness chemicals in your brain that make you feel fresh and energized.
What also works great is to take a nap. Especially now that alot of developers have home office its possible to take a nap and be absolutley refreshed. You might even have your aha moment right after you wake up.
And if I can get none of the above i like to read on my computer, just getting some different view of the world. Read about the newest Javascript framework or anything that gives you a kick here on medium.
Conclusion
Find your break time that works for you and dont be afraid to take that break because you think it will negativly affect your work. In the end your productivity and mood will be increased.
To sum up:
- Find your ideal break time.
- Go for a walk
- Have a chat
- Write down your intermediate results