August 13, 2019

How to stay focused – distraction-free programming in a connected world

Editors Note: We have gazillion devices connected around us. That makes focusing on a task such a chore. In today's post, Gwen Faraday senior software engineer and international speaker shares her tips to stay focused and get things done.

I,  like many programmers (I assume), struggle with focusing and staying on task. Every hour of every day it seems I am being bombarded with texts, emails, messages, tweets, and in-person interruptions. Not to mention all of the blog sites I like to check and the new videos from my favorite YouTubers.

This has become a greater challenge as I consult, travel, and work remotely frequently. Here are some of the ways I have been able to maximize my output vs time efficiency and minimize interruptions.

App/Website Blocker

Staying focused while working on the computer is never easy, but it has gotten ‘easier’ for me by using app and website blocker programs. Right now, I use a Mac for most of my work, and I also travel with one. Thus, some of the app specific information here is for Mac users. I also want to note here that desktop apps are better than browser plugins because they block across all browsers and desktop apps as well (plus if you are an app developer, you probably have enough plugins in your browser already). ?

So here are a few apps to help keep you focused:

  • Focus (Mac)?—?This is the app that I currently use which is Mac only and lets me block any website (on any browser) along with desktop applications. There are also options for me to write scripts inside the app to customize it. Another reason I love this app is that it’s one of the few out there that has a pretty good privacy policy.
  • Cold Turkey (Windows)?—?I have not personally used this one, but it comes recommended and they seem to have a pretty good privacy policy?—?they use Matomo for analytics instead of Google, and they are very clear about how data is stored and used.
  • Freedom (cross-platform)?—?Please do not use Freedom without reading their privacy policy! They admit in their ‘sharing > general use’ section that they sell personal information to advertisers for profit. And yet, so many people recommend and use this service. Yeah, no thanks.
  • Browser Plugins?—?if you are using Chrome, there are lots of good options like Stay Focused which I used to use before switching to Firefox as my main browser. Firefox doesn’t seem to have anything comparable (Leech Block hasn’t worked for me, but some people like it) though I don’t really need this type of plugin while I’m using my desktop app. I do use exclusively browser-based plugins for Linux though, so I will try to find a better Firefox one again in the future.

I use these types of tools to create a schedule for myself and block out all news, social media, sports, and tech blog sites for most of the day. The Focus app (mentioned above) is nice because I can denote certain break times?—?sometimes I really do need to look at social to grab some info real quick so this gives me flexibility.


I used to have so many social apps on my phone. I got rid of them years ago?—?Facebook, Twitter, and the whole lot. Now I have only educational apps, useful things like maps, and apps for phone calls/SMS/chat.

Because chat and SMS messages are also distracting, I turned off notifications for them. I also turned off the ability to view them from my lock screen. This means I have to be very deliberate in unlocking my phone to look at messages.

I even took this a step further and moved all messaging and phone apps away from my home screen. I have them in folders where I have to swipe over to a new screen and then open the folder to find the app. This has salvaged so much time that I used to spend in mindlessly opening apps. I also blocked any apps/tools from being available on the lock screen. I can only enter my passcode or use the camera.

Other Tips

  • Timers?—?For especially difficult tasks or ones I just don’t want to do, I just start a timer. Once I’ve been doing it for at least 5 or 10 minutes, then usually I will keep doing it for an hour or more and just get it done. For some reason, timers change my mindset and get me to start things I would otherwise put off until later.
  • Schedule Planning?—?I schedule things monthly, weekly, and daily. If I know what I am doing and what I need to accomplish, I am much more mindful… I also schedule time for specifically checking social media.
  • Web Addresses?—?I don’t use autocomplete in my search bar. I find that if I have to type out the whole web address I am less likely to mindlessly visit social media pages.

I found myself typing in two or three letters of a blog or social site and then it would just pop up. It was too easy. It is harder to use it as a distraction if you have to type out the full URL. Plus you give yourself enough time to consciously change your mind.

These first two are phenomenal books that have changed my life and made me way more focused and productive.

  • Getting Things Done?—?This book hands down changed my life. I was getting really frustrated with my level of productivity before I read this. I cannot recommend it enough. Just an aside: I useNirvanahq to manage my projects and actions as recommended in the book.
  • Deep Work?—?Excellent book on the how and why of maintaining deep focus.
  • 4 Hour Workweek?—?I also got some ideas about outsourcing and delegating tasks in this book. Using some of these methods has helped me spend more quality time working on important tasks.

Originally published on