The Pomodoro Technique for programmers

How to use Pomodoro for coding: which block length fits which work, what to do when the timer rings mid-thought, and when to turn it off.

I use 25 minutes of work and five minutes of break.

Start with one task. When the timer rings, finish the step you're on, write down what comes next, and take a break. If it regularly cuts you off mid-thought, try a longer block next time.

Step 1

The basic loop

  1. Pick one task.
  2. Set a timer for 25 minutes and work only on that.
  3. When it rings, take 5 minutes away from the screen.
  4. After four blocks, take a longer break.

Francesco Cirillo, who created it, describes the Pomodoro Technique as a complete system, not just a timer: planning, estimating, handling interruptions and recording what happened. For a coding task, that can be as simple as writing down what you plan to do and how far you got.

Step 2

Match the length to the work

Try 25 minutes when you need help getting started. Try 50 when it takes a while to understand the code you're changing, or 90 when you have an uninterrupted stretch for a refactor. If you keep drifting before the bell, try a shorter block. The free focus timer has the full list of presets.

Step 3

When it rings mid-thought

Use the bell to find a stopping point. If you're partway through a change, give yourself a moment to leave the code in a state you can come back to.

  • Finish the line you're editing or let the test you're running finish.
  • Leave a trail: a comment like next: handle the empty list, or a failing test. It tells you where to start after the break.
  • Do not commit or push in a hurry because a timer rang.
Step 4

Builds, tests and reviews

A wait in the middle of a block is where a feed gets in. Decide beforehand what a wait is for:

  • Under a minute: stay where you are.
  • A few minutes: something on the same task, such as reading the diff or writing the next test.
  • Longer: take your break now, and start the next block when it is done.

Waiting on a review can take a day. That task is over for now. Pick the next one and give it its own block.

Step 5

Meetings, pairing and on call

  • Twenty minutes before a meeting is one short block of review or cleanup. Do not open the hard problem.
  • When pairing, share one timer and swap the keyboard at the break.
  • On call, work in short blocks and let the alerts through. A page ends the block, and that is not a failure.
  • If a teammate asks something, write it down and answer at the break, unless they are blocked.
Step 6

When to turn it off

If you have a stretch of time to yourself and a clear stopping point, try an open-ended session. For example, work until you know which test reproduces the bug, then take a break. If you catch yourself splitting tasks just to tally more blocks, try working without the timer.

If your trouble is the phone more than the clock, start with how to focus while coding.

Doing this with Ippo

Ippo keeps your tasks, timer, and focus history in one place. Set a fixed block or use open-ended mode to count up. Ippo saves finished blocks on the task so you can see how much focus time you spent on it.

Related

Try it on your next issue.

Start your 7-day trial