Why take a break?

By Greg Turnquist

Greg is a member of the Spring team, an author of several books on Spring Boot, conference speaker, and the lead for Spring Data JPA.

April 25, 2017

Good developers take breaks. But why? Last night, I attended a men’s session where two very different people talked on stage about very different breaks. The first was a pastor who was granted a six month sabbatical. The second was someone that was fired, and instead of lunging for the next job, spent time evaluating things carefully. As I listened, it made me reflect upon my own discoveries about taking breaks.

Why do we need breaks?

To be honest, it’s quite easy to burn yourself out. Maybe when you’re a bit wet behind the ears and single, not so much. I once worked extensive hours (despite not getting paid overtime), and I don’t regret that.

But today I can’t do the same thing. I have three kids and many other responsibilities that preclude me from working ALL THE TIME. Well, a big difference between now and then, is that back then, I needed a lot of “tinkering” to figure things out. I was short on experience, but long on drive. And working extra hours helped me learn a lot of valuable lessons.

Today, the valuable lessons are taking breaks, and letting my subconscious continue chugging away. Even today, I’m working on a major review/refactor/rebase task that has already cost me two weeks and will probably cost a couple more. Yet I don’t dread this effort. In fact, I’m not trying to rush it. Because the hours I’m away from my laptop (like now), my mind is still noodling things out. And when my fingers rejoin the keyboard, I feel like my knowledge of this branch is growing at a comfortable pace. If I tried burning ten hours a day, I’d burn out and torch it all.

But by letting my family pull me away, and focus on other important things, I am stopped from burning out. And I can avoid spinning my wheels in the mud of frustration. In the past five years, I feel as if my productivity has actually increased, because I am working smarter not harder.

What good do breaks do?

Let’s just jump right in and state something critical – your work isn’t everything. When you pass from this world, people are less likely to remember the code you wrote, and instead remember the impact you made on your children, your spouse, and your community.

I remember a graphic that came out of Microsoft showing how you could access every aspect of your job from everywhere – a kids soccer game, waiting for an appointment, during breakfast, etc. 37Signals released a mocked up variant with the same style, only they dubbed it Work Can Wait (which you can see linked her). The thing basically stresses the importance of having a life.

But in addition to balancing work and life, I’ve discovered that my work actually flourishes when I get away from it. I once sat in on a talk by Dr. Venkat Subramaniam, who described that classic software eureka moment of realizing the answer to your problem you battled all day. The next morning, in the shower. I’ve experienced that a fair number of times, moreso since I started taking more breaks.

I enjoy, on occasion, merging a Github pull request after hours. But I don’t go out of my way to do that. It’s usually something small, like a typo in a guide. I enjoy being able to shuffle that off my plate in a bit of idleness. But pulling myself AWAY from the keyboard sometimes forces my mind to assess what just happened, and what’s coming next. Seeing that I have less time to spend, my brain hammers out certain details to make better usage of our next keyboard session. And I sincerely believe I code with higher quality because of this.

Try it. You might be surprised.

I’ll close by sharing a reflection I received from Mark Fisher, founding member of the Spring team. He once mentioned that if he had been forced to work nose to the grindstone, and hadn’t taken all the various walks, and simple “think about it” moments, Spring Integration may never have happened. Not everything is a burn-baby-burn coding moment.

Happy coding!

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *