Your calendar is full of stand-ups and code reviews. Slack messages come in all day, and the hard ticket waits until evening.

This guide to deep work for software engineers shows how to set up and start one block. You’ll see how to stay in it, get back in after an interruption, and where reviews and meetings go.

The step-by-step routine for one focused work block:

Why is deep work so hard for senior developers?

As a senior developer, your day belongs to other people: stand-ups, code reviews, team questions, Slack. The hard work, like debugging, design and refactoring, needs long stretches, and the day rarely gives them. In 2019, the software company Tidelift and the news site The New Stack ran a survey.

Almost 400 respondents estimated their working time. Writing new code or improving existing code took 32 percent, and meetings, management and operational tasks took 23 percent. Tidelift paid for this survey, and nobody measured the hours.

So don’t wait for a quiet week. The core of deep work for developers is the smallest unit: one block of concentrated work.

In this article, a block means a timed stretch of focused work on one goal. If you’re new to deep work, start with what deep work is.

Before the block: set up your screen, your room and your body

That one block starts before you open the editor. Close everything that could interrupt you while you work. The order below is only a suggestion.

  • Phone: Switch it off and put it in a drawer in another room.
  • Email and Slack: Close them first, then every app this ticket doesn’t need. Turn on Do Not Disturb.
  • Browser: Close all tabs, or open one window just for this ticket. Save tabs you want to keep in a bookmarks folder.
  • Paper: Use a protocol sheet for your goal and steps, and a thought sheet for unrelated thoughts.

Tell the people who message you regularly when you can’t be reached. Be specific: “I’m unavailable for the next 45 minutes unless the house is on fire.” If you’re on call, agree with your team which emergencies count as the house on fire.

If chat never stops, read how to protect deep work blocks from Slack notifications. To agree on shared rules as a team, read about deep work for teams. Your room and body are part of the setup too.

Start: no music, a timer, one block goal

With the setup done, the start takes three steps: decide on music, set the timer, write the goal. Then the work begins.

Music: skip it

Skip the music. It feels like a focus aid, but it uses up attention you need for the task. Keep your headphones on as a shield against noise, with nothing playing.

Not convinced? Do one block with music and one without, then compare the results. Read more on whether music can help you focus.

Timer: set it by your energy today

Then set the timer for 15 to 90 minutes, depending on your energy today. If you’re unsure, start shorter. You can always keep working after it rings.

Your blocks don’t have to be the same length, because your energy changes during the day. To see why the length follows your energy, read how long a deep work session should be.

Goal: turn the ticket into a block goal

Then take your protocol sheet and write the end goal at the top, like “Login timeout is fixed.” Below it, write the block goal. That’s what you want done by the end of this block, written as done.

Ticket or taskBlock goal, written as done
Fix a bugCause of the login timeout is found
Refactor a modulePayment module is split, tests pass
Write a design docOptions section of the design doc is drafted
Review a large pull requestComments on the data model are posted

Make it ambitious but doable. Too much overwhelms you, and too little leaves you without drive.

Not sure how to begin? Write the first small step as your next action.

Inside the block: three tools for flow, unrelated thoughts and a missing next step

Once the goal is written, three tools cover three situations. Use whichever one you need, in any order. Ideally the work just flows, and you only need the first.

  • Flow: The work goes well. Keep going, even past the timer, and write nothing down.
  • Thought parking: A thought unrelated to the task shows up. Write a keyword on the thought sheet, then go back to your protocol sheet.
  • Thread: You no longer know where you are in the task, or what comes next. Write the next mini step on your protocol sheet.

Some distractions feel like work: a blog post about a library, a quick cleanup in another file. If it doesn’t help this block goal, write it on the thought sheet.

Stuck on a bug? Describe the problem in one sentence, then write the smallest next step. If nothing works, switch to a different part of the same task.

How do you get back in after an interruption?

You get back in faster when a block ends with a note: your last step and the next one.

In 2009, management researcher Sophie Leroy ran two experiments on switching between tasks. People found it hard to turn their attention away from an unfinished task, and did worse on the next one. She called this attention residue: part of your attention stays behind.

Gloria Mark studies interruptions, and her team watched 36 people for three days. Some were software developers. In a 2006 interview, she said interrupted work was resumed after 23 minutes and 15 seconds on average.

Leave that note at every stop. It takes three steps:

  1. Stop. If the timer rings and you’re not in flow, stop now.
  2. Note the next step. On the protocol sheet, write one sentence: your last step and the next one.
  3. Check the block goal. Did you reach it, part of it, or none of it? Just notice it. Don’t judge.

Use the same note when someone pulls you out during a block. In a real emergency, write the note first, then go.

For people and messages that interrupt your blocks, read how to handle deep work interruptions.

Where do code reviews, meetings and Slack go?

Code reviews, meetings and Slack go between your blocks, sorted by the energy they need. Paul Graham, a programmer, explained how one meeting can split an afternoon:

“A single meeting can blow a whole afternoon, by breaking it into two pieces each too small to do anything hard in.”

Paul Graham, “Maker’s Schedule, Manager’s Schedule” (2009)

So group your meetings where you can, and keep one long stretch free for your blocks. Your blocks don’t have to start exactly at 9:00 or 10:00. Some people like a fixed schedule, and others feel pressured by it.

Then sort the rest by energy: do demanding work when you have energy and easier work when it fades. A large review that needs your full attention can be its own block with a goal, as in the table. A quick review fits where your energy fades.

Keep Slack and email out of your break, and check them before your next block starts. If meetings already fill your week, start with deep work with too many meetings. To find out how much fits into one day, read how many hours of deep work per day.

Tomorrow, give one ticket one block between your meetings, with chat closed and the goal on paper. One protected block can move that ticket further than a whole afternoon of switching.

FAQ

How can I improve my deep work habits as a developer?

You improve your deep work habits as a developer by repeating one timed block of focused work. The first blocks won’t be perfect: you’ll forget steps or get distracted anyway. It gets better with every block, and after a few weeks the steps become routine.

Do developers need special apps for deep work?

Developers don’t need special apps for deep work. The built-in Clock app on a Mac or Windows computer works as a timer. A mechanical kitchen timer works too, and it has no screen and no app.

Do developers need a free morning for deep work?

Developers don’t need a free morning for deep work. One 45-minute block counts as deep work, and you can fit several into a day. In my view, three focused 45-minute blocks are worth more than eight hours of half-concentrated work.