If I could eliminate just 2 things from my day to improve the quality of my work, I’d want to eliminate distractions and context switching.

I developed the strategies that follow in an attempt to make it easier for myself to sit down and write the best-quality code I can. The strategies might seem extreme, but for me, sticking to them is often the difference between me feeling good about what I’ve produced in a day and me feeling like I wasted my (and my company’s) time.

I don’t execute these techniques perfectly and I don’t stick to all of these 100% of the time, though I wish I could. It’s OK. I think of these techniques as tools, not requirements.

1. I prepare for each working session

Before settling in for a working session, I do what I can to make sure I don’t distract myself in the middle of it. I take care of some things before I start, like:

  • Go to the bathroom
  • Eat a meal or a snack and keep snacks in my desk drawer
  • Drink some water and make sure I have water or tea at my desk 
  • Put any lingering thoughts in my “Brain Dump” Trello board or look up anything that’s distracting me to get it out of my system

Try it: Choose a day you want to be able to really focus. Set yourself up with some water bottles and snacks at your desk, and go to the bathroom before settling in to get work done. Remember to get up once an hour or so, though, to stretch your legs and keep your blood flowing.

2. I change my physical position and environment

I rarely work at my desk all day. Here’s how I mix it up.

  • I’m fortunate to have a sit/stand desk, so when I start to feel antsy or unfocused in my current position, I’ll switch to the other option.
  • It’s much easier for me to start a task while sitting. I usually start working while seated, and when I get to a deeper level of concentration I’ll stand up and keep working.
  • I tend to lose focus if I’ve been standing too long. So my work cycle tends to be sit, stand, sit.
  • Sometimes I need a change of scenery so I go work in a different part of the office, usually near a window. Though I haven’t needed to yet, there are several cafes nearby I could go to if I wanted to get out of the office entirely.
  • I notice when my mind starts to wander or when my body starts to get antsy. I take a break when this happens. I’ll go on a walk, go to the bathroom, eat a snack, or just let my brain play and relax for 10 – 30 minutes. I think of it as an investment of time — either 15 minutes now or an hour of unproductive work later.

Try it: Scope out 3 places you could work in your office or in the neighborhood that you haven’t spent much time in yet. Once a day for 3 days, go work in one of those spaces for an hour and see how it feels.

3. I listen to background noise, not music

I’m fortunate to work in a part of the office we call “The Library”. It’s very quiet, which is the environment I work best in. Even so, I find that a little background noise helps me focus better. I purposely don’t listen to music, because music tends to lower my ability to focus when I am paying attention to the lyrics or a familiar melody.

  • brain.fm is a subscription service for soundtracks that help you focus and relax. It’s not music and it’s not noise, but something in the middle. I pay $7 a month and it’s absolutely worth it. You can try 5 listening sessions for free.
  • I often listen to nature soundtracks on YouTube. My favorites are rainforest and rainfall videos. I like birdsong and ocean waves, too. I let them play quietly in the background while I work.
  • There are also “background noise” soundtracks on YouTube recorded in cafes, restaurants, etc.
  • Even just putting my headphones on but not playing anything helps me focus sometimes. It’s kind of like wearing ear plugs.

Try it: Take advantage of brain.fm’s 5 free listening sessions. Use the 2-hour or infinity time options. Or find a nature soundtrack on YouTube. Note that it will take 5 – 15 minutes of listening for you to feel a noticeable difference in your level of focus and attention.

4. I don’t keep Slack open

As great as Slack is for improving team communication, it quickly becomes a major time suck in two ways: 1) I waste time reading threads that are distracting or not relevant to me, and 2) The cost of context switching means that even if I pop into a channel for less than a minute “just to check something,” it takes awhile for me to get back in the groove of what I was doing before.

  • I don’t keep a Slack tab open in my browser. I adjusted my settings so that I get a push notification on my phone if I get a direct message or mention.  
  • I treat reading Slack threads as entertainment I can enjoy on my breaks.
  • Unless I’m taking a break, I only open Slack to ask questions.
  • I have a colleague who occasionally lets us know that he’s muting all Slack notifications for the afternoon so he can put his head down and work through something challenging. If we really need something from him during this time, we have to physically go interrupt him (and who wants to do be the person who does that?). I think this is a good strategy, though I haven’t used it yet.

Try it: For 3 days, change your Slack settings so that you only get push notifications to your phone or Desktop if someone sends you a direct message or mentions you in a channel. And don’t keep Slack open in your browser or on the Desktop. Only catch up on your channels during a break. You’ll probably come to realize how often you check Slack out of boredom or because you want some entertainment!

5. I don’t keep my personal email open

I’ve found that when I leave my personal email account open in a browser tab, I constantly check to see if I have new messages. Most of the time there’s nothing new in my inbox, and if there is, it’s junk or not something I need to reply to immediately.

  • While I do check my personal email a couple times in a day, I open and close a new Incognito tab when I do.
  • I also practice email batching. Rather than checking and responding to messages throughout the day, I check a couple times a day for anything pressing and respond to those emails right away. But if it’s not urgent, I’ll respond that evening or within the next couple days. This minimizes context switching.

Try it: For 3 days, decide in advance how many times a day you’re allowed to check your personal email (or what times of day you’ll check it). Stick to it! You might be surprised how often you check it out of boredom, or because you’re transitioning between tasks.

6. I only check my work email twice a day

My company primarily uses Slack instead of email, so reading emails is usually not critical.

  • I check it once in the morning
  • I check it once before I go home
  • I don’t keep a tab open in my browser for my work email
  • I try my best to not check my email just because I’m bored or transitioning between tasks

Try it: For 3 days, try checking your email only twice a day. If twice is too infrequent given how your company communicates, choose some times throughout the day in advance at which you’ll check your email and only check your email at those times. You’ll probably come to realize how often you check your email out of boredom or because you don’t know what else to do!

7. I use *one* Chrome browser window for work stuff

The more windows and tabs I need to click through to find something I already have open, the more likely I am to get distracted. Further, I’ve developed an organizational system for my open browser tabs.

  • The only tabs I keep open in my browser are directly related to what I’m doing that day.
  • I rarely have more than eight tabs open. Usually it’s 6 or fewer.
  • The tabs on the right are my “working” tabs and I reference them frequently:
    • My team’s wiki pages in Confluence  
    • Local deployment of our app    
    • Python, Django or pandas docs
    • Search results related to some question that’s come up  
  • The tabs on the left are tabs I only reference a couple times a day:
    • Google calendar for time tracking
    • brain.fm or nature soundtrack on YouTube

Try it: For 3 days, actively and consistently close tabs you aren’t using. Rather than storing a bunch of open tabs in your browser so you can remember what you were reading, use your Browsing History to keep track of this instead. If you didn’t look at a tab at least twice in your workday, you don’t need to have it open in the browser. Seems harsh, but it’s true!

8. I use *one* chrome Incognito window for personal stuff

I know that using an Incognito browser doesn’t mean that I’m browsing completely privately. But I like the protections it affords, and having the black bar at the top of the window helps me distinguish at a glance which browser window contains my personal tabs and which window contains my work tabs.

  • My Incognito window is always minimized unless I need to add something to one of the tabs I keep open in it:
    • My “Brain Dump” Trello board (see below)
    • The day’s reflection, which is a Google Doc in my personal Google Drive 

Try it: If you usually have some personal tabs open throughout your work day, put them in their own Incognito window and keep this window minimized.

9. I use a Trello board to capture non-work thoughts

I love Trello! It’s an amazing tool that helps me organize my thoughts, ideas and to-dos.

  • I have a board that I keep open at work to store any thoughts that pop up regarding my personal life. I put them here so I can get them out of my head and come back to them later.
  • I call this Trello board my “Brain Dump”. If I think of something I need to do, look up, or buy in my personal life I quickly capture it here and go back to what I was working on.

Try it: Create a new Trello board that just has one list on it. Drop thoughts and to-dos here throughout the day to clear your mind. In the evening, you can go through the list and organize the items you put in it in a way that makes sense for you.

10. I don’t use social media at work

I’m not anti-social-media but I do set some limitations around it for myself, especially at work.

  • I don’t want to be the person who’s on Facebook or Instagram as my colleagues walk past my desk. That doesn’t represent how focused and hard-working I am.
  • I am so excited about my work that I don’t want to waste any time not working while I’m at the office!
  • I generally don’t do anything personal on my work computer, with the exception of keeping my personal Trello board and daily reflection open (mentioned above).

Try it: Start small. For one whole day, don’t open any social media tabs in your browser. Check your accounts only when you’re on a break and away from your desk. While standing in line to get coffee, taking a bathroom break and eating lunch are all good times to get your social media fix.

11. I drink a little caffeine

I don’t regularly drink coffee, so a little bit of caffeine goes a long way for me. The latest I drink caffeine is 3pm, otherwise I have a hard time winding down for bed. If I’m in a rut and need a little pick-me-up, these are my go-tos:

  • An unsweetened, black iced tea from Starbucks
  • Bubble tea made with black tea and 25% sweetened
  • 1/4 cup of coffee with cream and sugar
  • Decaf latte

Try it: If you already drink at least one cup of coffee a day, or if you don’t tolerate caffeine well, it’s probably not the best idea to drink (more of) it. Find something else to eat or drink that perks you up, like a fancy flavored water, fruit juice or an exciting snack.

12. I ask my colleagues how urgently they need help if they ask me for it

As an early-career software engineer, I get so excited when the opportunity arises to answer questions about our code because it means I’ve grown my skills and knowledge of our codebase! If I can give a quick answer I’ll happily provide it on the spot.

But if someone needs help with something that requires me to stop what I’m doing and spend time looking into something else (context switching), I usually ask them how urgent it is. If we’re up against a deadline for a client or if it’s a major blocker for a teammate, I’ll hop on it right away. Otherwise, I can fit it into my day at a time that works best for me.

This is the hierarchy I use in our support channel in Slack:

  1. Client needs this urgently or it is blocking you on an urgent project
  2. You or the client needs this within 2 hours
  3. You or the client needs this by the end of the day
  4. Low priority (get to it when convenient)

Try it: To assess urgency you can say something like, “Hey, happy to help with this. When do you need an answer by?”


I hope this list of things I do to stay focused at work has given you some ideas to try! It’s so important to our productivity as software engineers to feel less distracted and more deeply engaged with our work.  

What do you do to keep focused and minimize distractions and context switching? Let me and other Empowered Engineers know in the comments below!