DEV Community

Cover image for Things You Should Do to Prevent Computer Eye Strain, Personal Health Is Just As Important As Deadlines
Mohammadjavad Raadi
Mohammadjavad Raadi

Posted on


Things You Should Do to Prevent Computer Eye Strain, Personal Health Is Just As Important As Deadlines

Think about it — when was the last time you gave the health of your eyes any thought? I’ll confess I never thought, someday eye pain could have an unsettling impact on my productivity and my daily life. Staring at code on a screen or reading through your server's logs 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. If you are someone like me who won't rest until you fix that damn bug, I found some helpful ways to help me stay healthier and a few apps to make me relax my eyes more throughout the day.

Adjust Your Lighting

Making sure that your work-space is properly lighted is important for your mood as well as your eyes. Try and work in natural light whenever possible, ideally with the window to your side instead of directly in front or behind you, and use blinds to reduce glare. I used to work in a somewhat low-light place without any natural light and it caused me constant headaches and eye pain. I'm glad those days are over.

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. It will also help you prevent neck pain in the long run. If you're using your laptop as your main development computer, make sure you put it on a stand and push it a little away from you.

Splash Cold Water on your Eyes

This will relax your eyes and remove any dryness that might have set in. I found this very useful since it makes me get up, get away from my desk, stretch a little and make my eyes feel rested.

Practice the 20–20–20 Rule

I'm sure you've heard about this and this in fact 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. Although, It's not always possible to find an object 20 feet away, I believe what it all comes down to is giving your eyes a break every once in a while.

Finally, Use a Break Reminder App

So it’s a good idea to take breaks regularly, but when you’re in the thick of something it can be easy to forget. Happily, there are very good break reminders out there for you to use. Some offer notifications, some make a sound and some just prevent you from getting on with your work for a short time. Here are two free and open source break reminders:

  • Safe Eyes (Available For Linux)

    This is my absolute favorite because I was looking for something more enforcing than just a notification or a sound. Check out their GitHub page for instructions on how to install it. There is instruction on every major Linux distribution.

  • Stretchly (Available For Linux/Mac/Windows)

    Stretchly is a cross-platform electron app which is designed to be easy to use. Here's their GitHub page to check it out.

Hopefully this has helped you understand how easy (and important) it is to look after your eyes as part of your overall health. If you liked this post, please share it with others to help them stay healthier. If you have any other tips or ways that work for you, feel free to let me know in the comments section.

About Me

I am a full stack web developer and co-founder of Bits n Bytes Dev Team, a small group of highly talented and professional freelance developers, where we provide custom web application development services based on cutting-edge technologies, tailored to client's unique business needs.

I'm available for hire and you can check out my portfolio website at or contact me at

Top comments (11)

tinc2k profile image
Tin Crnkovic

In addition, I'd recommend installing Flux on your computers and enabling Night Shift on your iPhones and iPads to adjust your display color based on time of day to reduce eye strain and amount of blue light exposure close to bedtime. Note that those should be temporarily disabled if doing any color-sensitive work :)

mjraadi profile image
Mohammadjavad Raadi • Edited

That's right. macOS Sierra (and above) and Windows 10 both have native support for this feature. It's just the matter of enabling it and setting it up. For Linux, I use redshift and I highly recommend it.
Thanks for your input

sunilc_ profile image
Sunil Kumar

Flux is really helpful in avoiding blue light entering your eyes. I have been using it for over 6 months now. And my eyes are less strained compared to earlier on a daily basis.

zelinzky profile image
Roberto L. Taborda

On my side i use heavy blue blocking glasses, and tearlike eyedrops.

Spending way too much time in fron of a screen in this profession is the norm, so we should help our eyes with whatever resource we have.

mjraadi profile image
Mohammadjavad Raadi

You're right, nothing is more important than our personal well being. Thanks

bananabrann profile image

Short version:
Do the 20-20-20 rule before you buy fancy screen protectors and glasses.

Long version:
This is not specifically related to computers. Your eyes are made up tons of different little muscles. Different muscles are used to adjust the eyes to focus on things of different distances. (Regardless of your sightness, the muscles are still being used)
Just like holding a squat for a long time, your eye muscles will tire if they're holding for too long, this is why you get blurry eyes --it's the muscle getting fatigue. No type of lens will help against muscle fatigue, and there's a good chance that your blurriness is from this fatigue and not blue light.

chustedde profile image

Good tips - very similar to what my eye doctor has recommended to me in the past! I would also suggest lubricating eye drops (not with anti-redness or antihistamine, just the natural tears type) for those who have really dry eyes. A few drops at the beginning of the day can make a big difference.

mjraadi profile image
Mohammadjavad Raadi

Thanks, yes sometimes I use artificial tear drops when my eyes get really dry.

perigk profile image
Periklis Gkolias

Safe eyes look pretty good

An Animated Guide to Node.js Event Loop

>> Check out this classic DEV post <<