I used to drink four cups of coffee per day. Once I realised how deleterious that was to my sleep I quit, only to find myself drinking four cups of tea instead. Intrigued by my body’s pull towards a certain number of hot beverages I wanted to understand why. It was in the bestseller book The Power of Habit: Why We Do What We Do in Life and Business that I found my answers, and as a side effect I uncovered the secret to boosting my productivity. Now I wish to share it with you.
In his book, the author explains:
Habits, scientists say, emerge because the brain is constantly looking for ways to save effort.
This process within our brains is a three-step loop. First, there is a cue, a trigger that tells your brain to go into automatic mode and which habit to use. Then there is the routine, which can be physical or mental or emotional. Finally, there is a reward, which helps your brain figure out if this particular loop is worth remembering for the future.
This effort-saving instinct is a huge advantage. An efficient brain requires less room, which makes for a smaller head, which makes childbirth easier and therefore causes fewer infant and mother deaths.
(Please see the How Habits Work appendix from the book for a more detailed description.)
Clearly my routine was making a cup of coffee, and my reward was sitting down in front of my computer, hot beverage in hand, ready for more work. But what was the cue for this habit, that occupied nearly an hour of my day? Newly aware of how the habit loop works I started paying extra attention to what made me crave my cup of coffee.
Steven Pressfield, in his famous book on fighitng procrastination for writers, The War of Art, says:
There’s a secret that real writers know that wannabe writers don’t, and the secret is this: It’s not the writing part that’s hard. What’s hard is sitting down to write.
But us programmers are strange beasts, we tend to be the opposite. We’ll jump headlong into our coding, shunning planning and tapping furiously at the keybord. And when our code is ready we present it to our colleagues for review. Once it’s reviewed and ready to go into production… Suddenly we don’t want it anymore.
Suddenly we feel a need to check Hacker News, our emails, or… Spend 15 minutes making a cup of coffee.
That’s it! My cue! Finally, I realised that my cravings start after I’ve:
In other words I procrastinate every time it’s time to step out of my comfort zone and do responsible, irreversible actions that can potentially lead to social repercussions.
These are all primal fears stemming from our social nature. They used to save our lives (being excluded from the tribe meant certain death), but now they just get in the way.
I wanted to see what would happen if I stopped drinking both coffee and tea. I laughed out loud when I found myself pacing mindlessly in the kitchen one day. I was just about to release some code. I was caught in the loop…
You know what you have to do. You know why you put off doing it. And you know how good it will feel once you do it. So how do you overwrite your primal instincts and boost your productivity?
There are a few easy to implement behaviours you can utilise to help you with that.
In Deep Work Cal Newport reminds us that:
A now voluminous line of inquiry, initiated in a series of pioneering papers also written by Roy Baumeister, has established the following important (and at the time, unexpected) truth about willpower: You have a finite amount of willpower that becomes depleted as you use it.
You struggle with yourself every time you decide on what to focus on next. Do I work on A or B? Do I reply to my emails now or later? Where will I go for lunch today? All of these are decisions that deplete your willpower. The professional in you will tell you to work harder, while the energy saving instincts will tell you to rest.
To save yourself from that strain plan your day at the end of the previous one. The procrastinator in you will no longer be able to have his say, and you’ll save yourself a ton of decision making the next day.
And after you do your planning stop thinking about work. At least consciously. The author continues:
If you need to do a math calculation, only your conscious mind is able to follow the precise arithmetic rules needed for correctness. On the other hand, for decisions that involve large amounts of information and multiple vague, and perhaps even conflicting, constraints, your unconscious mind is well suited to tackle the issue.
The implication of this line of research is that providing your conscious brain time to rest enables your unconscious mind to take a shift sorting through your most complex professional challenges. A shutdown habit, therefore, is not necessarily reducing the amount of time you’re engaged in productive work, but is instead diversifying the type of work you deploy.
Let your unconscious brain work for a change.
Split up your work into small, easy chunks. Ones that will make you say: “okay, this next task is small enough, I’ll just do one more and only then I’ll grab a coffee”. And after they’re all done you won’t even want your coffee anymore.
So instead of “Write Feature X” your task becomes a list:
Would you want to go for coffee now, if all that’s between you and that nice fuzzy feeling of accomplishment is pressing the merge button? Or would you rather press it now, and enjoy the rest of your day guilt free?
You evolved in an environment in which humans died from hunger - your brain will always choose conserving energy over work if given the choice.
If there are no negative consequences of slacking then you will find new, creative ways to slack.
You can introduce negative consequences by increasing visibility. If you’re perceived as slowing the team down you’ll feel shame - your brain will want to avoid that!
Are daily standup meetings effective because they improve communication, or because nobody wants to be the one saying “I browsed Reddit all day yesterday”?
Parkinson’s law states that:
work expands so as to fill the time available for its completion
If you allow yourself to finish work early, your brain will stop coming up with ideas on how to fill up time, and rather will find ways in which you can finish faster.
With all these insights in mind I wrote a tool that automates some of these points.
Code Dog will post a list of your team’s open Pull Requests to a Slack channel
The application was designed to:
Code Dog supports GitLab and BitBucket. For GitHub see Pull Reminders.