Eye Exercises for Programmers Who Stare at Code All Day
Patrick Bushe
September 16, 2025 · 5 min read
Long coding sessions mean hours of close focus on small text, often in a dim room. The result is familiar: tired, dry eyes, blurry vision late in the day and headaches. A few exercises help, but most of the relief comes from habits and setup.
Exercises worth doing
- Distance focus (20-20-20): every 20 minutes, look at something about 20 feet away for 20 seconds. It relaxes the focusing muscles that work hard at close range. See the 20-20-20 rule.
- Near-far shifting: hold a finger about 10 inches from your face, focus on it, then on something across the room. Repeat ten times.
- Full blinks: close your eyes completely, pause, open. Ten times, a few times an hour. Screen work cuts blinking sharply. See why blink rate drops.
- Palming: rest your eyes closed under cupped palms for 30 seconds. It doesn't treat anything, but it's a genuine rest.
Eye exercises don't fix vision problems or replace glasses. They ease fatigue.
Set up your editor
- Font size: big enough to read without leaning in; many developers find 14 to 16 pixels or more comfortable on a typical monitor.
- Line height: a little extra spacing makes long files easier to scan.
- A clear coding font: distinct shapes for 0 and O, 1, l and I.
- Theme: match the room. Dark themes suit dim rooms; in a bright room, a light theme can be easier on the eyes.
Set up your screen
- About an arm's length away, with the top at or slightly below eye level. See monitor distance.
- Brightness close to the room's brightness.
- No windows or lamps reflecting in the screen.
- Room lighting on in the evening, so the screen isn't the only light source.
Get the right glasses
Many developers have a small uncorrected prescription, or need help at screen distance as they get older. An eye exam is the single most useful step. Tell the optometrist how far your screens are; glasses for that intermediate distance can make a big difference.
Warm the screen in the evening
Your editor and terminal are desktop apps, so use your system's night mode: Night light on Windows or Night Shift on a Mac. For documentation and web tools in the browser, Blue Light Filter adds a warm overlay to web pages on a schedule, and Modern Dark Mode darkens docs sites that lack a dark theme.
See a doctor if
Symptoms persist despite these changes, your vision changes suddenly, or your eyes are painful or red. See also computer vision syndrome.