How to Combat Eye Strain as a Programmer

Jake Pepple
Aug 23, 2017 · 2 min read

One of the biggest things I noticed after beginning to spend full days coding is that I would sometimes come home with a nagging headache. From someone who doesn’t normally have headaches occur often, this kind of struck me as odd. I thought about what could be causing it, and while it would be tempting to say it has been because of the brain games I’ve been participating in, I found that the culprit is actually eye strain. Staring at code on a screen for most of the day isn’t quite natural for the human eye, and this is my body’s way of telling me to change my habits. Since I obviously will not stop coding(!) I found some ways to relax my eyes more throughout the day.


Use a comfortable contrast level, color scheme, and font size in your code editor. This is one of the best changes you can make to help your eyes. The difference between a high-contrast bright white screen with small text versus a low-contrast muted black screen with moderately sized text is huge, and definitely strive for the latter. Most code editors will be set to darker color schemes right out of the box, but if not, these settings can be easily changed.

Practice the 20–20–20 rule. This is a helpful method to give your eyes a small break. The rule suggests that after every 20 minutes of using the computer, take at least 20 seconds to look at objects that are 20 feet away from you. Part of what causes eye strain is the prolonged focus on a close target. Remembering to take a small break every once in awhile can make a difference at the end of the day, especially when you remember to do it regularly.

Adjust your monitor’s position. For optimal comfort, your screen should be between 20–30 inches away from your eyes. Also, the top of your monitor should be at eye level. You want to look down at your work, not up.

Use an app like F.lux to adjust monitor glow at later hours. There are a handful of apps that help to adjust your monitor glow according to the time of day. F.lux dims your brightness and tints your screen color automatically later into the evening, when your eyes are probably more sensitive and worn down.

What it all comes down to is giving your eyes a break every once in awhile. Making these few extra improvements in your daily schedule can help to prevent daily discomfort or long-term damage. Don’t wait until your eyes tell you so!

)

Jake Pepple

Written by

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade