How do you stay focused at work?

skeeveholt profile image davis davis ・1 min read

I'm about a year into my first developer job (I'm a former nonprofit education program director turned JavaScript developer, which is a whole other post). My office is a big open floor plan, there's lots of chatter on Slack and in person, and of course there's a flood of articles, forums, blogs, podcasts, tweets, and online learning platforms to distract myself with - and that's just the content that's web development related! My team has relatively few meetings, and I have no desk phone.

I love my job and I love my work environment, but sometimes I feel like a kid in a candy store who can't settle down and concentrate when needed. My fancy new headphones have been a lifesaver but sometimes even they can't do the trick.

Eager to hear from other devs - how do you stay focused at work?


Editor guide
ben profile image
Ben Halpern

Little rules like "I have to finish this one thing before I can go check Twitter" work well for me. The trick is actually determining what that one thing is and what finishing it means. It's easy to lose focus when something tedious comes up, but if you define your end goal ahead of time, you can remind yourself to not lose focus and just get to the finish line. A lot of the time, that will get me in the groove and I'll just keep going. At that point I'm playing with house money so I'm allowed to take a break at any point, and yet I plow on.

It also really helps if you genuinely really want to get the thing done out of personal care and perhaps some passion and/or obsession.

blakebarnes00 profile image
Blake Barnes

I feel sometimes making those rules can be hard for a lot of people. Hard to push yourself to do it honestly. I experienced not being able to push myself hard enough to meet deadlines especially with something like school where I just wasn't interested with what I was doing. However like you said, if somebody is really interested in doing something then it is far easier to get it done. I also find it easier to do something when I am doing it with other people, collaborating is so much fun, just hard to get people to do it along with you I have found. (Not many people I know program, so not many people really want to learn it or try)

ben profile image
Ben Halpern

Oh yeah. I definitely agree with your perspective on the topic too.

diazomethan profile image

I recently have read a book to get a bit more structure in life (targeting students like me). One of the biggest productivity boosts I got from it was the Pomodoro technique - You know, 25 minutes of work, short break, repeat.
Helps pretty much to stay focused. Also write down what you want to do at all. I am often doing pretty much nothing because I do not know what to do (well, I know what to do, but not exactly enough to get started).

akz92 profile image
Lucas Moulin

Came here to say this. Pomodoro is an amazing technique, I use it daily and it has helped me a lot.

subbramanil profile image
Subbu Lakshmanan

Absolutely True. I am trying out the Pomodoro Technique for last couple of weeks and it's been great. This is what works for me. May be it helps you too.

  1. I keep a to-do list of tasks and update it as and when tasks added; (Sorted by priority/Highlight the prioritized tasks)
  2. Put my headset on with soundtracks (Mostly Game/Anime Soundtracks without any vocals)
  3. Take one task at hand and spend 25 mins (max) and ignore every other notifications


  1. Notifications: Ignoring notifications is really hard; Generally you can try turning off notifications for that 25 mins Window. (But I can't turn off notifications at my work since some of them may be very critical.)
  2. Distractions from team mates: Let them know in some way that you need to be focussed. At my work, my team mates don't disturb me if I'm having my headset on. (But don't put your headset all the time; Try spending a window of 25 mins helping your fellow team members)
  3. Wandering off in the browser: I tend to wander when I'm browsing for solutions and it was harder for me to focus. I'm getting better at this now with separate browser windows for searching solutions and for rest of the browsing. (I have started using pocket to bookmark the links and close the tabs that I am interested in reading and it is helping me a lot)
paulaigue profile image
Paul Aigueperse

Hey !

Music is the best way for me to stay focus in a particular task, but I also filtered my notifications dealing with "Do not disturb" mod on my computer and my phone.

I disabled most of my Slack notifications for non-important channels, created a looooot of filters for most of my regular emails (and force me to practice #inbox-zero).

Then if I need to be very focus I cam earlier at the office 😄

I don't believe in "Stay-Focus-Applications" stuff... Just take care of your setup and habits :)

Good luck ! ✌️

alvarocavalcanti profile image
Alvaro Cavalcanti

Even though I get what you mean by not liking the "stay-focused-apps", I enjoyed RescueTime, simply because I don't use it as a "stay-focused" app, I use it as a tool to help me understand what I'm spending my time on. I take a few minutes everyday to go through it's daily report, categorizing what needs to be categorized and comparing my performance over the past days.

rapidnerd profile image
George Marr

I 100% understand you here. I currently work from home and still live with my family so the distractions in my work environment get pretty high sometimes even with a big LED sign that says WORKING DND. I commonly tend to block out all distractions with music or a TV series, I find that both of these tend to help me focus even though some how I can watch Netflix and work at the same time.

When it comes to something major in my house I wrote a program to hook up a button in my house to a raspberry pi that tells me I'm needed so my family abuses that a little bit.

If you use something on the lines of slack for communicating with the teams sometimes it can be a bit random, all my notifications are filtered through tags for when I'm needed otherwise I won't read that chat. In addition the place of work I'm at is actively using Teamspeak to communicate with each other. Although for some this may seem like a distraction I like being around my colleagues and talking with them. They sometimes even help me fix bugs.

If you tend to fidget a lot highly recommend something near by on your desk that is designed to help stop fidgeting (i use a fidget cube). Something I've commonly found is taking a little break from your work area if possible, a breathe of fresh air outside for 10 minutes has helped me improve productivity a lot as well as doing this when something annoying happens (ie maven not compiling!!).

Not really sure if this one has been scientifically proven (might of been) but having a tidy work space can help bump up productivity, its helped me before when I had about 10000 things cluttered around my office that would constantly distract me now all that's on there is my phone and keyboard, mice, mic etc.

Best of luck with your ongoing career!

janvanbraeckel profile image
Jan Van Braeckel

At my previous job (which I just quit), it was basically impossible to focus when I was at the office.
We used both Slack and Skype for Business, so whenever I set do not disturb on Slack, people would start annoying me on Skype, even if I had do not disturb there too.

It was also not easy because we were a distributed team. Whenever I put my headphones on and started listening to music, my colleagues in-office would understand and (try to) leave me alone. However, even then I got a wave every 5-10 minutes to say "Hey I need you a sec".
For the remote colleagues it was even worse because they would spam me on Slack, Skype, e-mail and if that failed they would contact a colleague in the office I was at to tell me to check my DMs.

Basically the only way to focus on my work was to work from home and turn off my e-mail and chat clients.

Starting my new job soon, hopefully it's a bit more rest and quiet there :)

ardennl profile image
Arden de Raaij

Ha... What am I even doing here? How did I end up on Dev.to creating a hole in the time-space continuum because I'm procrastinating while writing about procrastinating?

Let's back-track.

  • The other not-work related tab I have open is Twitter, it's a safe bet I clicked on a twitter link to get here. It's also a safe bet to say I clicked this one to make me feel better about myself. But what was I doing on Twitter?

  • My other tab is a WordPress back-end on the 'update plugins' page. One update failed.

So after my detective word I deduced that I was updating plugins on this WordPress site. It took too long (everything that takes over 3 secs is too long), I was distracted so I decided to look on twitter for the duration of the task. Of course I forgot what I was doing, the task has long failed / finished and I'm of the path.

If I didn't realise that I'm distracted at this very moment, the next thing I'd probably do is check the Markdown cheatsheet to make this comment look nicer and after that fix the Readme's on my github projects because I've been wanting to do that (they're only read by me, by the way).

In other words; finding out what causes me to be distracted in the first place is very important to me. If I don't have to directly communicate with anyone I'll work with my headphones on and am barely distracted by external factors. So for me it's mostly things like tedious tasks and having to wait on things to upload/download/install. Now I know when the distractions happen, I try and prevent them by moving non-blocking, tedious tasks to right before a break ("if you see this through, you deserve a break!" I keep telling myself). It only works half of the time, but awareness is a first step, I guess 😉.

corysboredagain profile image
Cory Ann Ellerbe

I keep it simple personally. I make a Trello checklist at the start of a project that gives me a % completed as I go and I find it very motivating.

I also have an app called "Forest" that I bust out anytime things get real bad. It "grows" a tree as long as you don't look at your phone for whatever time you set. I find it is super helpful, since I don't want to "kill the tree".

Lastly, sometimes just walking around, taking a run up and down the stairs, or around the block can help me feel more focused and get out the extra energy.

ben profile image
Ben Halpern

Definitely +1 to just walking around.

phpandcigars profile image
PHP and cigars

In an office with more than four persons my advise would be: quit your job.

But if you like what you do: try to find a partner to team up with. I can stay focused even in a noisy invoirement when i do pair programming.

cadellsinghh_25 profile image

I think this is a common thing for most people.

Usually I disable all social stuff.. slack, twitter, fb and so on. When I really wanna get work done I even leave my phone in a different room so I'm not tempted to look at it.

I give myself little incentives as well... like if I finish one hour of work, I can browse Twitter for a few mins or when I'm done adding in that new feature I can see whats happening in slack.

Music helps alot as well. I use this website called brain.fm that plays "focus" type of music and surprisingly it keeps me locked in. Here's the site if you wanna check it out brain.fm/app#!/

And lastly, coffeee :D

adnanrahic profile image
Adnan Rahić

Being a responsible adult helps me stay focused. :D
Nah, I'm kidding.

I guess just setting daily checkpoints for things you want to get done is the most efficient way. You are your worst slavemaster, nobody can force you to work as hard as you can force yourself. At least this is true in my case.

ivanfabrynugraha profile image
Ivan Febriansyah Hadi Nugraha

earphone, coffee and ignore people lol. Put your phone in reverse and turn of any notification of chat group unless their mention your name (Skype can do this). I always win with this urgent solutions.

thomaswdmelville profile image
Thomas Melville

I think all of this has been said already but here's my two cents.

  1. Good over ear headphones
  2. Turn off notifications, take control of when you check them
  3. Try hot desking.

I second reading Deep work, I found it very useful

cdw9 profile image
Chrissy Wainwright

Email filters is a big one, as well as configuring all your notification preferences, which may take a while. Each time you get an alert, ask yourself if it was important enough for an alert, and if there is anything you can do to adjust it.

I use separate browsers for work (Firefox) and general browsing (Chrome). If I really need to focus, I will go so far as to remove Chrome from my Dock, so that I can't click on it.

vgrovestine profile image
Vincent Grovestine

A good rapport with coworkers and management can help mitigate a lot of distractions. Read: It can allow you to get away with some passive-aggressive stuff, yet not draw the ire of the office. ;)

There are the basics which you and others have already mentioned:

  • noise-cancelling headphones
  • instrumental music
  • time-blocking (eg. Pomodoro)
  • disable software notifications
  • setting statuses to "do not disturb"
  • self-control to ignore social media and the like
  • etc.

Presently, I have a private office; however, the walls are thin, floors are tile and so office sounds/conversations carry far. Previously, I shared a large office with two coworkers, but there were constant distractions between chatter, foot traffic, impromptu in-office meetings, etc. As much as I espouse the importance of not interrupting a developer's "flow"; the distractions persist...

So, when I really need to buckle down and get some work down, I break out the big guns: Once my headphones go on, if someone disturbs my train of thought, I shoot them a dirty look of disapproval. Works great! Most people immediately assume that you're in a nasty mood and will give you plenty of space thereafter. When finished with the work, my headphones come off and I carry on with officemates as if everything is normal.

At times when the dirty look strategy has not done the trick, I've been known to print a "do not disturb" ("leave me alone, or else") sign for my door/desk/monitor. Combined with the headphones and grumpy face, all but the most insensitive coworker will get the hint.

Sure, this strategy does nothing about ambient office noise, but it can greatly reduce the frequency of direct interruptions. However, as I remarked initially, you need to have a good rapport with your officemates first, else you could end up looking like a jerk!

aandreev0 profile image
andrey a

Intro: i do PhD so staying on track is tricky. A lot of coding but also working with data etc.

Something I heard from @yesthatthom : start day by writing list of things you need to do today (with little checkboxes) and then try to check them as day goes by.

Keeping quiet space is important for me: I tell office mates (up to 3 but usually 1 or 2) to not chat too much. This investment makes me work harder.

Having regular meeting with my teammates or boss also helps, as I need to prepare something new to show them.

For long-term ToDo's we use basecamp, which allows assignment of items to certain person with a Due date. Having those open items on calendar really pushes forward.

Finally, I think it is crucial to kill-off items on the ToDo lists that are not relevant anymore or for which time has run out. I usually close those tickets as "Nobody cares"

jlhcoder profile image
James Hood

I wrote a blog post on my habits. I also recommend reading Deep Work by Cal Newport.