Ask HN: Best tips for reducing eyestrain while coding with astigmatism?
I was diagnosed with astigmatism in 2018 or around that time. I haven't been to the eye doctor since, but at that point my vision was around 20/20 or slightly impaired. I did get glasses, which I rarely wear, but I have been wearing them more recently because I feel that my eyesight may be becoming more of an issue. For example, after long periods of coding or looking at my phone screen, I see floaters. Sometimes I wake up seeing them and have a low-productivity day or take a nap and some Advil in the hope that it is related to a migraine.
I am mainly interested in what tools, settings, and themes people with astigmatism use, and if you have any preference for light or dark themes. Personally, I cannot stand light, whether it is physical light or light on screens. When my 5-year-old turns on the overhead light in my bedroom, I pull the blanket over my head or shout to turn it off. I feel like Gizmo from Gremlins.
I am a developer, and my main tools are Terminator + Tmux, Chrome, DBeaver, and Visual Studio Code. The font I am using is Jetbrains SemiBold. I just tried the Solarized Dark theme and I am kind of liking it, but I feel like I might be able to find something slightly better. Before that, I have used Night Owl, GitHub Dark, Material, and a few others.
66 comments
[ 0.22 ms ] story [ 129 ms ] thread- 20/20/20 - every 20 minutes let your eyes relax then focus on something 20 feet away for 20 seconds. This can reduce the strain from focusing close
- increase your system font. Anywhere from 110-120 percent can make a difference from straining to see tiny font code
Wasn't this (eye strain in general) largely proven to be nonsense? It's not like anything you do can really affect the length of your eyeball or refraction of your lens. Straining the lens muscles ought to only make them stronger.
I like a dimly lit room, but not completely dark. I have my monitors set to low brightness and use dark themes.
Some recommendations if you’re on a Mac:
- HazeOver: dims any part of the screen that isn’t in focus
- Noir: makes every website into dark mode. Works more consistently than Dark Reader and also allows you to choose different themes.
- Time Out: will black out the screen after a designated period of time to force you to have a break
More general options:
- blue glasses as mentioned in other comments
- if you work from home, consider using a large tv to code and sitting a good distance from it. I am currently coding on a 65inch tv and find it far easier on the eyes as they physically have to move around more than before.
- If you’ve got the space, even better than the above would be to use a projector screen which is even easier on the eyes. You can get laser projectors now which are still visible inside in broad daylight even with the curtains open and lights on.
You really should visit annually. There are a bunch of diseases that can be diagnosed by looking at the retina. It's totally worth the 15 minutes of your time to drop by (many opticians do drop ins if they aren't busy)
The right color scheme in your IDE can help. Reducing contrast in your monitor settings can help. Usually reducing brightness also serves to reduce contrast. A matte display also helps (matte displays naturally have lower contrast than glossy).
I don’t know the actual science behind this, there are controversial opinions on this topic, but I definitely sensed that dark color scheme was making my astigmatism much worse. It’s almost completely gone after I switched (and that’s the only thing I did) and I can work for much longer periods than before. I eventually switched to light mode on my IPhone as well.
I suggest you to give it a try. Btw, I use papercolor scheme, which is great
Also, whether the theme is light or dark, I would try playing with different contrast levels. Like in a light theme, black on off-white will reduce the amount of overall light being blasted at you and look much more like the page of a book. Or for a dark theme, making the background slightly lighter and the text slightly darker should reduce haloing around the letters.
Whether because of my high myopia, the high astigmatism, or the super strong corrective lenses (or other factors) my eye muscles seem to work differently than other peoples'. I seem to have a faster twitch rate (rapid movement between points of focus). I can focus on things for longer periods of time without blinking and I seem to be less prone to eye fatigue and injury than many other people. My eyes do get tired though, and when that happens I have trouble discerning between eye fatigue and mental exhaustion, but at any rate when fatigue creeps in I am done.
More brightness reduces the size of your pupils, which reduces the effects of most defects of the lenses in your eyes.
Obviously it'll cost you ~$100/year in electricity to have a nicely lit bright office, but considering a developers salary I'd guess that even a tiny bit more productivity will rapidly pay for that.
Contrary to your preference, I believe a light theme (black letters on white/gray background) is better for astigmatism. With a dark theme, the bright letters will bleed into the dark areas surrounding them. (At least that's how I experience it. I have only slight astigmatism, but the ghosting effect already annoys me for dark themes.)
If you really want to stick to a dark theme, I would select something where the text is not too bright. The Solarized Dark Theme that you mention seems OK in this regard.
I wear glasses and this happens to me. Does it mean I have developed astigmatism?
I wear glasses all day long, and I feel it helps. Although my astigmatism is a light one, without glasses everything gets blurred, therefore harder to focus on.
I would go even further - a light theme is better for optical clarity, period. Think about how a pinhole camera works [0]. "Up to a certain point, the smaller the hole, the sharper the image, but the dimmer the projected image." A pupil is basically the pinhole of a pinhole camera. The brighter the light, the smaller your pupil gets (up to a point), and the sharper the image.
I personally switch between light and dark modes. During day time, I turn on all the interior lighting and switch to light mode. During the night, I turn off the lights, use Flux [1], use dark mode, and bump the zoom in VS Code. This is to optimize for sleep.
[0] https://en.wikipedia.org/wiki/Pinhole_camera#Selection_of_pi...
[1] https://justgetflux.com/
I just code in dark mode because I got used to that when I switched to vscode.
I am recently experimenting with the Windows Night mode (that orangifies the screen) but I will give a try to flux (that I used last tile 10 or 15 years ago, or maybe even more)
As for astigmatism - I’d say wearing your glasses so you don’t strain / squint and stress your muscles is probably the best way to avoid strain. I have it pretty bad but it’s stabilized over the years with the right prescription and the correct degrees of rotation.
I understand light backgrounds may be better if you can handle it but I don't think I'll ever be able to, except when wearing rose tinted glasses I have to block light.
Specifically, I have a pair that have no far vision at all, just short to medium. I use them around the house in general, only breaking out the normal glasses when I go outside for any reason.
Regardless, I have astigmatism, and the biggest improvement I've had is when I first got dedicated glasses with a single (non-progressives) computer-distance prescription about 8 years ago. I didn't realize it was an option before that. But suddenly using the computer became so much easier as a result.
I get reminders what it's like to work on a computer without them too, because sometimes I forget to pack my computer glasses in my laptop bag when I go to a coffeeshop, and it doesn't make sense to go back to get them. I have a much more annoying time using my laptop then and tend to be less productive.
Your eyes have probably changed since 2018. The old glasses have not. Go to a good eye doctor, and get new glasses for use with computers. You'll need to tell the Dr. how far your monitor is from your eyes -"reading" glasses are usually tuned for a book held considerably closer to your eyes than a screen.
That's when I developed the first version of Lunar (https://lunar.fyi) to adapt brightness automatically throughout the day based on the sun position in the sky. (reading the light sensor was not possible at the time)
That combined with Night Shift (macOS native version of f.lux) fixed most of my problems.
I also tried blue light filter glasses but the only effect they had was removing more money from my savings. I feel like this is just modern day snake oil for computer workers.
In the end, what fixed all of my problems was a LASIK [1] operation (well actually PRK because I had only a small abberation). I still recommend this to all my friends and relatives who are always complaining about their vision. It did change my life.
I still cringe when someone turns on an overhead lightbulb though, I never use those in my home. Turns out this wasn't my astigmatism, it's just that most LED bulbs are simply too bright single point lights.
I fit my home with TRADfri warm light lamps hidden behind sofa/door/desk [2], WLED-powered [3] LED strips and simple string lights (like you can see in the front page video on https://lowtechguys.com/volum/)
[0] https://github.com/kfix/ddcctl
[1] https://en.wikipedia.org/wiki/LASIK
[2] https://www.ikea.com/gb/en/p/tradfri-remote-control-kit-smar...
[3] https://kno.wled.ge/
You need to go back to the eye doctor.
The extra light causes pupil contraction which helps with focusing.
Also work in a well lit place.
First, check your prescription with an ophthalmologist (or optometrist, depending on your country). You may benefit from a cycloplegic refraction, to ensure that you don't have an undercorrected hyperopia.
Then, always wear your glasses when working.
Your floaters don't have a direct relationship with your astigmatism and you may need a fundus examination, which will be done at the same time as your cycloplegic refraction (pupils will be dilated using eye drops).
Reducing the screen light and using a blue filter may also help. But good prescription is key.
So far every time I went for glasses they added that for a fee and I asked for it to be removed.
I did my research and I can't find any proof of it helping. In fact, I find research that they don't help:
https://www.npr.org/2021/02/21/969886124/do-blue-light-block...
Astigmatism can change with age so maybe you should check if you need new glasses, it might be that your astigmatism has changed.
Last thing - I've found floaters on a small scale come and go with age, they've never bothered me much. But if you have a sudden increase you need to get it checked - it might be a retina in the process of detaching.
I have astigmatism. It’s -0.5 at 80° in my right eye, -1.0 at 100° in my left eye. Meaning it’s 10 degrees off the vertical axis, different in each eye, symmetric to the face.
My “eye doctor” – my opthalmologist? — is a good doctor. Well educated, does a good job as a doctor. He gave me a straight -0.5 / -1.0 myopia prescription after measuring “some astigmatism”, said “this is fine”.
Then I went to a not-a-doctor guy. A licensed optician? Optometrist? Skilled and well-educated. He took the time to measure the precise degree of astigmatism and was careful to prescribe a close and practical match to the measured astigmatism. I had no idea he would do that, and no expectations of any difference whatsoever. And: Those glasses are MUCH better. I see better, see clearer, can work forever, don’t get tired in the eyes or head. Feel sharper.
I’m kind of reluctant to add this last part as it probably seems implausible, but my experience with this more detailed prescription for astigmatism is that it has allowed my depth perception to improve. Slowly. I thought I was imagining it, but it does make sense according to the optometrist and scientific papers. Basically if you get a better signal to the brain, you get better processing, better learning, better adaptation. And less tired.
After two years with two different doctors, I went to a new optometrist this weekend. A technician performed the exam and an eye doctor went through everything over Zoom at the end.
Result? Perfect 20/20 vision and I no longer need reading glasses to see my screen. There really is a big difference between providers.
If you were like me, then it was just that slower speed, that connection, that ability to stop and consider, is what would get me the prescription I want.
And let me tell you, its the BEST $200 I ever spent. I have high astigmatism -4.00 and it feels so good being able to get my prescriptions very precisely and having a good vision again.
I have thought about doing that, but thought it would be much more expensive. Where did you buy it?
I have been to multiple optometrists, but it always goes like, the eye measuring machine says my glasses should be one diopter stronger, but my eye sight was still good enough that I do not need a new prescription..
And half the lenses there are plus lenses. I only need minus lenses.
But it seems one can buy testing glasses and individual lenses rather than a set.
I've found contact lenses gave me better quality of vision than glasses. But then I got tired of contact lenses/glass entirely: https://news.ycombinator.com/item?id=34033275#34037456