Coding Productivity in a World of Distractions

Software development takes focus. Distractions can derail productivity. Interruptions come from every direction and are hard to avoid. In my time at Raizlabs, I’ve come up with a few techniques that help me hit my commitments and still fulfill my responsibilities of being a good teammate.

Getting In/Out of the Zone

Being “in the zone” is a sports phrase used when an athlete is competitively immersed and operating at a high level. This applies for programmers as well. Most have had those coding sessions where they’re completely focused on the problem and can complete 2-3 hours of work in 30 minutes.

A lot of developers use the rule that if they have headphones on, don’t interrupt them. They are focused on their task. While this works for many people, I never want someone to feel like they can’t talk to me if they need something. Rather than having specific times of the day where I am “unreachable,” I focus on jumping in/out of my coding state more easily. A few things that help me with this are:

  • Finish your thought before you give your attention to the interruption. They can wait 15 seconds for you to write a TODO so you remember where you are.
  • Write tasks for yourself. Everyone thinks about work differently, but if you break your work up into sections that are easy to process, you’ll find that getting into code will be easier. This could mean that you have a task of just planning what needs to be done.
  • Don’t jump around too much in your code. If you can focus on one file at a time, you’ll find that context switching is easier. For example: Write out an entire view with stubbed data before you move to the view model that backs it. This isn’t always possible based on your tasks but it can help a lot.

Prioritizing Communication Channels

It is important to be available to your coworkers, especially if you’re blocking their work. At Raizlabs we use Slack, email, phone, text, in-person, and Google Hangouts as forms of communication. This is a lot, and it can become easy to break your chain of thought. You may see an email come in just to find out that it was a pull request on a project that you are not responsible for. Prioritizing these methods of communication by urgency was a great help for me. My list looks like this:

  • Immediate: In-person/phone/Hangout – If I am blocking you or you need me now, come by or call me.
  • When you have a sec: Slack/text – If you need me but it’s at my convenience.
  • In the next 24 hours: email – I’ll see it by the end of the day or tomorrow.

To enforce this, I turn off email notifications on my phone. I don’t even have an email client open on my computer until I opt in to checking them. This is usually twice a day, at around 10 and 4. For Slack, I have do-not-disturb turned on on my computer and sometimes keep the app closed. I do leave notifications on my phone turned on, but I only notice them when I look at it or go into the slack app. Texting works the same way; I usually will check Slack every hour or two depending on my task load for the day.

Efficient Coding Times

Everyone has times of the day when they are most productive. I am 3x more productive when I am coding in one of these times. Other times, I feel like I have to force it. For me, first thing in the morning and around 5PM are when I have the easiest time getting work done. Conversely, right after lunch (between 1 and 3) is usually my most inefficient time. It is important to take advantage of these times. For example, a lot of people are most productive in the morning, but they may spend the first part of their day checking emails and catching up on news. Instead, they could go right into coding and use their less-productive time later to check emails. If I get into the office at 8, I try to code until about 10. Then I will switch context to do more day management activities, including Slack and email.

Planning Your Work

You can’t always choose the kind of work you do, but if you can, and you schedule efficiently, you can see huge improvements in your overall output. Say I have two tasks for a day: One is to implement a new feature and a few views to go with it, and the other is to implement screen tracking for Google Analytics. I’ll make sure to work on the feature when it is easier for me to focus (the morning) and leave the more restricted Google Analytics work for the afternoon.

Delegate

Being productive also means successfully delegating tasks. As much as I love solving problems, there are times when it is more efficient to let someone else come up with the solution. Pointing someone to someone else, or giving them the tools to solve their issue by themselves, can save you a lot of time while also facilitating a better learning experience.

Find Your Stride

As your role in a software team or company grows, your individual focus may be leveraged for the greater productivity of the organization. Whether you’re spending 90%, 50%, or 30% of your time coding, it is important to make the most of that time. Using these methods, I have been able to continue being a good contributor, while still being available for teammates and non-project work.

When are you productive? When/where are you most likely to be interrupted? Leave some comments below to tell us about your distractions and your methods for productivity.


Do you have a project in mind? We’d love to work with you. If you’d like an opportunity to work on projects with us, check out our Careers page. We’re hiring!

One response to “Coding Productivity in a World of Distractions”

  1. Pingback: Coding Productivity in a World of Distractions - RaizException - Raizlabs Developer Blog

Leave a Comment