I figure this is a common problem among devs. So, whats your eye care ritual?
- I use a BenQ anti-glare monitor [0] that automatically adjusts the brightness based on ambient lighting.
- I use f.lux [1] to automatically adjust the color temperature based on the time of day.
- I use Dark Reader [2] to enable dark mode on all websites.
- I work near a window that I can easily, and often, look out of away from the screen.
- I make sure to sit/stand with good posture while working. Slouching with your head forward causes the muscles in your face and neck to tense up which contributes to eye strain.
- I make sure to use f.lux (or adjacent apps) on my mobile devices and reduce the amount of time I use them before bed in order to get a decent amount of restful sleep. Tired eyes have to work extra hard to focus which contributes to eye strain.
One thing I've yet to do, but am going to soon, and highly recommend, is to see an eye doctor for a comprehensive exam. Uncorrected, or under corrected, vision problems can be major contributing factors to eye strain.
[0] https://www.amazon.com/dp/B0749RC47S
Edit: formatting
I learned that:
* having a lot of space behind your monitor helps a lot: you raise your head and you focus at infinite: this way I relax my eyes (I read about it, it is not just my sensation)
* the above works also with your desktop's background image: choose one that let you focus infinite
* enable auto dark mode into your laptop (and in your phone)
* be 100% sure your graphic card is set well: I am not talking about Mac or Win, of course, but a Linux with maybe a stupid proprietary video card without proper drivers: this is may not the case anymore, but many years ago was a pain to work with Nvidia (I hate it!) and Linux: drivers where not available, and what apparently was working was a real disaster: I even feel sorry for having given my old working laptop to a friend: I still think the anti-aliasing and other setting on chars rendering makes a bit of a difference.
* select, of course, dark background and gray chars while coding :)
* try the so called "blue led" glasses: I do, but do not really know if it is just a trick to ask more money for your spectacles (btw, you do use spectacles, don't you)
* distance from your eyes to the monitor is important waiting for a feedback from others: I am so scared to harm my eyes :)
The second prescription was still too strong. I ended up mail ordering contacts with my old glasses’ prescription.
This is all very anecdotal and I think much of eyesight is caused by genetics. But my eyesight is pretty good and hasn't deteriorated much in the past few years. My optometrist also said using a dim screen is good although idk why.
Linux - 'Safe Eyes' which asks me to take a 20 second break every 20 minutes.
Browsers - 'Dark Reader' in FF/Chrome
Android - Night Light matched with local sunset time