Guide

How to stay on task as a programmer with ADHD

Updated October 2026 · by Jerry Liu, Dayflow's founder

Programmers with ADHD usually get more from outside structure than from willpower. Write the next concrete step before you stop, keep a paper list for tangents, and work against a kitchen timer or with a friend on a call. If your days blur together, Dayflow, a free Mac app, keeps an automatic record of your screen. If you need distractions blocked, use a dedicated website blocker.

You sit down to fix one bug. You open the ticket, read the stack trace, and notice the logger is using a deprecated config option. You fix that, because it’s right there. Now the linter is unhappy, so you look up the rule, and twenty minutes later you’re reading a long thread about a formatter you don’t even use. It’s mid-afternoon. The bug is exactly where you left it.

Other days it goes the other way. The task is clear and you know roughly how to do it, but you can’t start. You open the file, check messages, open the file again, refresh a dashboard. Or you lock onto something for five straight hours, skip lunch, and surface with a beautiful refactor nobody asked for, while the thing due Friday sits untouched. None of this means you’re lazy. Programming happens to reward and punish attention in some very specific ways.

This guide covers why coding in particular makes staying on task hard, then six things to try. Most of them need nothing more than paper, a timer or another person. Near the end there’s one section on Dayflow, a free Mac app that keeps a record of your day. Dayflow publishes this article, and that section says plainly where the app doesn’t fit. Dayflow details come from its published product facts as of September 2026.

The short version

Why is it so hard to stay on task when you write code?

A few things stack up, and many people with ADHD will recognize all of them.

The context lives in your head. To change one function you might be holding the data shape, two call sites, a half-formed theory about the bug and a test you meant to write. A single interruption can wipe all of that. Reloading it feels expensive, so the brain quietly avoids it. That avoidance often looks like “I can’t start.”

Every tool has a side door. The terminal, the docs, search, chat and the package registry are each one keystroke from a tangent. And the tangents look like work. Reading about a linter rule is technically programming, so it doesn’t set off the alarm that scrolling a news site would.

Attention follows interest. Many people with ADHD describe attention going where things are new, puzzling or urgent, not where they’re important. A weird race condition is gripping. A config migration you’ve done ten times isn’t. So the interesting work gets hours and the boring, necessary work gets avoided.

“Done” is fuzzy. A ticket that says “improve caching” has no clear finish line, and a task with no visible end is easy to drift away from.

Time is hard to feel. An hour in a debugger can feel like ten minutes. Then at the end of the day you honestly can’t say where it went, which makes it hard to plan tomorrow. If that part sounds familiar, where did my day go looks at it more closely.

None of these are moral failings. They’re features of the work meeting the way your attention works. The fixes below don’t ask you to try harder. They move a little structure out of your head and into the room.

1. Leave a breadcrumb every time you stop

What to do: Before you step away for a meeting, lunch, a message or the end of the day, write one sentence that names the next physical action and where it happens. Not “keep working on auth.” Something like “next: in session.ts, line 140, make refresh() return early when the token is null.” Put it on a sticky note, or as a comment at the cursor.

When you come back, read the breadcrumb before you look at anything else. You’re not rebuilding your train of thought, just picking up one step.

Illustration: A developer gets pulled into a call mid-debug. Before clicking join, they type // NEXT: log req.headers here, suspect missing X-Tenant and leave the file open. After the call, the first thing on screen tells them exactly what to do.

After a week: Notice how long it takes to get going again after a break. If returning feels less like starting from zero, the habit is working. If you keep forgetting to write the note, tie it to a trigger you already have, like “before I click into any meeting.”

2. Give tangents a parking lot

What to do: Keep a sheet of paper or an index card beside the keyboard. When a side quest shows up, like a deprecated option, a flaky test, an outdated dependency or a cool library, write one line about it and go back to the task. Paper works better than a new tab because it doesn’t offer another tangent.

Part of what makes tangents hard to resist is the fear you’ll forget them. Writing the thing down takes away that pressure, so walking away from it becomes easier.

Illustration: One card for a day might read: “logger config deprecated,” “why is CI slower on main?”, “try the new test runner flag,” “README install steps wrong.” At 5 p.m., two of those become tickets and two go in the bin.

After a week: Look at the cards. If they’re full and your main tasks moved forward, the parking lot is catching what used to derail you. If the cards are empty but you still drifted, the tangents may be arriving through some other route, like messages or notifications. Try the next two steps.

3. Shrink the task to its first keystroke

What to do: When you can’t start, the task is usually too big or too vague to aim at. Rewrite it as the first concrete action you could take in under two minutes. “Implement rate limiting” becomes “create rateLimit.test.ts with one test that expects a 429.” Write that action down, then do only that.

Starting is often the hardest part. Once you’re moving, the next step tends to show itself.

Illustration: A ticket says “clean up the billing module.” Shrunk, it becomes “open billing/index.ts and list every exported function on paper.” That takes five minutes, and the list shows where to begin.

After a week: Count how many times you used this and actually got going. If you shrank tasks and still stalled, the first step may still be too big (“write the test” when you’re not sure what to test). Go smaller: “read the function and write one question about it.”

4. Make time visible with a kitchen timer

What to do: Pick one named task, set a physical timer you can see and hear, and work on only that task until it rings. A kitchen timer on the desk tends to beat a clock in the menu bar, because you can watch it run down. Start with a short block, around 20 to 25 minutes. When it rings, do a breadcrumb (step 1), stand up, and take a real break away from the screen.

The timer does two jobs. It makes time feel real, and it puts an end to the block, which makes the start less daunting.

Illustration: “Timer 1: get the failing test to pass. Timer 2: refactor the duplication I noticed. Timer 3: write the PR description.” Three blocks, each with its own finish line.

After a week: Did you finish blocks on the thing you named? If you often ignore the bell because you’re deep in something, that’s fine. Just note it, and consider longer blocks for deep debugging. If the timer makes you anxious, drop it and try step 5.

5. Work next to someone

What to do: Many people find it easier to stay on task when another person is around, even if that person is working on something else entirely. This is often called body doubling. Ask a friend or a coworker to share a video call with cameras on and mics muted for an hour. Each of you says your one task at the start and how it went at the end.

For programmers, pairing on a boring task works the same way. Having someone else there makes tangents socially awkward, in a helpful way.

Illustration: Two developers on different teams meet at 2 p.m. on Tuesdays and Thursdays. “I’m writing the migration script.” “I’m answering code review comments.” Fifty minutes of quiet, then a two-line check-in.

After a week: Compare the sessions with someone against the hours alone. If the sessions got your hardest tasks done, schedule more of them for the work you avoid most. If the call felt like a distraction, try being in the same room instead, or a quiet coffee shop.

6. Close the day in three lines

What to do: At the end of each workday, write three lines: what you finished, what’s half done and where it lives, and the first thing to do tomorrow. That’s it. Keep them in one running file or notebook so you can look back. The daily work log template has a simple shape for this if you’d like one.

This helps in three ways. The day gets a clear end, tomorrow starts with a breadcrumb, and standup becomes reading notes out loud instead of a stressful act of recall.

Illustration: “Done: fixed null token crash in refresh, PR open. Half done: rate limit tests, two passing, see rateLimit.test.ts. Tomorrow first: answer review comments on the PR.”

After a week: Read the five entries in a row. Are you seeing patterns, like the same task “half done” four days running? That’s useful information. The task is probably too big or unclear, so take it back to step 3. If you skipped most days, attach the habit to something fixed, like closing your laptop lid.

Where seeing your actual day helps

The steps above all depend on you remembering to do them. On the days that go sideways, that’s exactly what slips. You forget the breadcrumb, skip the end-of-day lines, and have to reconstruct Tuesday from memory and commit timestamps.

An automatic record fills that gap. Dayflow is a free, MIT-licensed Mac app that captures your screen at one frame every 10 seconds and has AI write the day into a readable timeline. You don’t start a timer or categorize anything. At the end of the day you can see when the bug fix turned into an hour of linter threads. That’s not something to judge yourself for. It’s information you can use to plan tomorrow. How to remember what you worked on goes deeper into this use.

A few facts that matter here. Recordings and the timeline are stored on your Mac. With Local AI, screenshot analysis stays on-device. If you use your own cloud provider or the optional Pro plan ($20 a month), selected screenshots are processed off-device. The local and cloud processing page explains the difference. You can export a date range as Markdown from Settings → Export. AI summaries can miss or misread work, so check them before you share anything.

Dayflow publishes this article, and this is the only section about it.

Where Dayflow is the wrong pick

Be clear-eyed about what it is and isn’t.

If time slipping away is the main thing you’re dealing with, our piece on time blindness and apps covers that angle.

When to get more help

This article isn’t medical advice. If trouble staying on task is affecting your job, sleep, relationships or mood, or if you suspect ADHD and haven’t been evaluated, talk to a doctor or a licensed clinician. They’re the right people for diagnosis and treatment. None of the habits or apps here replace that care. They can sit alongside it, if you and your clinician think they’re useful.

The bottom line

Staying on task as a programmer with ADHD is less about willpower and more about moving the scaffolding out of your head. Leave a breadcrumb every time you stop. Park tangents on paper. Shrink tasks to their first keystroke. Use a visible timer or another person to give blocks a shape. Close each day in three lines.

Try one or two of these this week, not all six, and check after seven days what actually changed. If you’re on a Mac and want a record of the day without having to remember to keep one, Dayflow is free to try. If what you need is something that stops you clicking, pick a blocker.

Frequently asked questions

Why can I hyperfocus on side projects but not start the ticket I'm assigned?

Many people with ADHD find that attention follows interest and novelty more than importance. A strange bug in a library you're curious about pulls you in. A migration you've done ten times doesn't. This isn't a character flaw. Shrink the boring task to its first physical action, like opening the file or writing one failing test. That makes starting less of a hill.

How do I get back into code after an interruption?

Before you step away, write one sentence that says what you were about to do next, plus the file and line. Put it on a sticky note or in a code comment. When you come back, read that sentence before anything else. Reloading context costs much less when you're picking up a specific step and not trying to rebuild your whole train of thought.

Do timers help programmers with ADHD stay focused?

Many people find that a visible, physical timer makes time feel real in a way a clock in the menu bar doesn't. Start with a short block, like 20 or 25 minutes, on one named task. When it rings, note where you are and take a real break. If the blocks feel arbitrary after a week, try longer ones or drop the timer.

How can I stop falling into rabbit holes while coding?

Keep a sheet of paper next to your keyboard as a parking lot. When a tangent shows up, like a deprecated config, a flaky test or an interesting library, write one line about it and go back to the task. The tangent isn't lost, so walking away from it is easier. At the end of the day, decide which items actually deserve a ticket.

What should I use to block distracting websites while I code?

Use a dedicated website blocker or the content restrictions built into your browser or operating system. Dayflow is the wrong tool for this job. It records what was on your screen and summarizes it afterward, but it doesn't block sites, close tabs or stop you from opening anything. If being unable to reach a site in the moment is what helps you, a blocker beats Dayflow.

How do I answer standup when I can't remember what I did yesterday?

Write three lines at the end of each workday: what you finished, what you're in the middle of, and anything blocking you. The next morning, standup is reading those lines out loud. On a Mac, an automatic record of your screen, such as the timeline Dayflow writes, can fill gaps when you forgot to write anything down. Check AI summaries before you share them.

Is Dayflow an ADHD app?

No. Dayflow is a general Mac app that records your screen at one frame every 10 seconds and has AI write the day into a readable timeline. It is not a health tool and doesn't diagnose or treat anything. Some people find a record of their actual day useful, whatever the reason they lose track of time. It doesn't replace a doctor or clinician.

Does Dayflow send my screen to the cloud?

It depends on the mode you choose. Screen recordings and the timeline are stored on your Mac. With Local AI, screenshot analysis stays on your device. If you configure your own cloud provider or use Dayflow Pro, selected screenshots are processed off-device. Under the privacy policy, Pro deletes screenshots after processing and may retain activity data for sync.

How much does Dayflow cost?

Dayflow is $0 and MIT licensed. There is an optional Pro plan at $20 a month, where Dayflow manages the cloud analysis. If you use your own AI provider, that provider's charges and terms apply, because the free app doesn't include paid API usage. Dayflow runs on macOS 14 or later and isn't available for Windows or Linux.

See where your day actually went

Dayflow is $0 and open source. Full recordings stay on your Mac, with local AI available for on-device analysis.

Download for MacOS macOS 14+ · MIT licensed · no account required