Deep Work for Programmers

In Deep Work [amazon affiliate link], Cal Newport makes the case for sustained, focused work on hard problems and gives practical advice for helping you do it. The book helped me realize why two practices I had adopted were working so well. They are both related to the mindset I have about my computer and devices:

  1. I think of the computer I program on as factory equipment.
  2. I monitor my usage of it and make it impossible to do anything that interferes with productive work.

Most of the tactics I employ flow from adopting those two practices.

Your computer is factory equipment

To me, it’s a big problem that the same computer I use to write code can also go to Reddit. And Slack. And Gmail.

It’s bad that the phone that I develop apps for also gets text messages, calls, and other notifications.

The typical way to treat these machines is to use them as intended — as a general purpose machine. But programmers are not typical users of computers.

Imagine if Picasso’s paintbrush rang a few times a day. Or if Jane Austen’s notebooks also showed Tweets. Maybe we’re not doing as important work, but coding requires long spans of deep concentration, and we don’t need distractions to be a CMD-Tab away.

Business communication apps like Slack and e-mail are a tougher problem as it’s usually not ok to not run them at all. But even our collaboration apps can be a distraction if we don’t control their use.

If you accept this, it’s logical to take steps to turn this general purpose machine into just a coding computer.

Monitor your productivity

It’s hard to convince most people that they have no idea how productive they are, but you don’t need to trust me. Do this test:

  1. Write down how many hours you think you spend coding, doing business communication, and other work activities during the week.
  2. Go install computer usage monitoring software like RescueTime or Qbserve and let it run for a week.

I have been spending my whole career trying to measure and optimize my productivity. I used to do this more manually — just jotting down the number of hours between programming interruptions (this is a Peopleware [amazon affiliate link] suggestion) — but these tools are far more accurate and unforgiving. Even with diligence, I was surprised where my time was going.

But even more important than monitoring your work is doing something to increase the number of contiguous hours you spend programming (and on programming-related activities — code review, testing your work, technical documentation, estimation, etc).

Cal argues that there are two kinds of work we do:

  1. Work that only experts can do
  2. Work that you could train a smart intern to do in an hour

Look through your logs and try to figure out how many hours in a row you are spending doing the things that need your expertise (or expertise you want). You may still need to do the other work, but the time spent should be shrunk and sequestered to not interfere with the work that matters.

This doesn’t even address distractions like social media, time-wasting sites, or non-business communication. I’ll let your logs speak for themselves on whether you have a problem, but they will probably be incomplete since most of these distractions come on your phone, which isn’t as easily monitored.

Since usage monitoring software can’t be installed on an iPhone, I just assume that my phone is a giant distraction and set it up accordingly. Android users can install RescueTime, which I would recommend.

In the coming weeks, I’ll expand on my suggestions and explain my personal setup. If any of this sounds interesting, go read Deep Work [amazon affiliate link], as Cal lays out the fundamental approach and many actionable suggestions.

NOTE: Here is a follow-up to this post with more details on how I use SelfControl.