Ask HN: Best tips for reducing eyestrain while coding with astigmatism?

43 points by gremlinsinc ↗ HN
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
One thing that helped me get adjusted to glasses is the blue filter. I think it really helps with eye strain. One theme that I really like in VSCODE is the slime theme.
High DPI monitor, large fonts, and keeping my workspace well lit have been the best at reducing eye strain for me
- work with an optometrist to get the right eyeglasses, if they are too nearsighted they may make your eyes deteriorate faster

- 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

> they may make your eyes deteriorate faster

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 think having the correct screen brightness is important so you don’t have to squint as much. I also use dark mode which seems to help with contrast. I don’t turn on overhead light it’s too bright but I use an LED strip on my desk with red light which has been nice. My optometrist recommended not wearing glasses for the computer but if you do he said to get a blue light filter lens.
Enlarged font sizes and periodic breaks where I get up and walk around do wonders for me.
- zoom in your screen/font. - use blue-cut glasses. - increase your distance with the monitor. - break from monitor when your eyes are tired. each 20 minutes spare into an object far distance. - drink water.
You didn’t mention your age, but your eyesight can change quite a bit over time. I would recommend getting a new prescription and new glasses. Make sure the lenses have an anti-reflective coating and wear them all the time.

I like a dimly lit room, but not completely dark. I have my monitors set to low brightness and use dark themes.

(comment deleted)
I don’t have astigmatism but I have had eye strain from coding.

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.

> I haven't been to the eye doctor since

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)

Drop-ins are really valuable. I find that having some 15 minute medical thing scheduled in at 2pm on a Tuesday means I end up losing much of a days productivity, after taking into account driving time, waiting time, driving back, catching up things I missed at work, wasting other peoples time because I wasn't around when they would have benefited from my input and now have to redo work differently, etc. And don't forget the big task you didn't start Tuesday morning because you knew you wouldn't get it finished before having to leave for the medical appointment.
I can vouch for the importance of getting your eyes checked regularly. I missed a yearly check up due to COVID restrictions and over the year after that I noticed some real eye strain issues cropping up - a week or two after I got my new prescription the eye strain had cleared up.
High contrast (between colors, between text and background, etc) is harder on your eyes. Lowering the contrast can help reduce strain.

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 have a similar story and one thing that helped a lot was simply switching from dark color scheme to a light one.

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

Can definitely second this. I know dark mode is hip and all that atm, but it does not play well with (my) astigmatism. At least go for one of those dark or medium grey ish color schemes.
It's not about what is hip, it's about what is most comfortable. For me, light themes feel like they induce more eye strain. But if a light theme works better for you, then go for it and ignore anyone who judges you for preferring it.

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.

My astigmatism is on the extreme side. About 20 years ago it was off the charts (before the measurement technology advanced in precision). I have had it all my life and cannot imagine vision without it. I just wear glasses all the time and power through it, even through environmental extremes and long period of high stress activity.

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.

Get brighter lights for the room you work in, and then get a brighter screen (or turn the brightness up).

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.

> 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.

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.

+1, I have an astigmatism in one eye, and light themes treat me much better than dark ones.
Ecaxtly, white themes are way better, I have it too and I’m using only, and always, light white themes!
> With a dark theme, the bright letters will bleed into the dark areas surrounding them

I wear glasses and this happens to me. Does it mean I have developed astigmatism?

Same here. I can't use dark themes, not even for a few minutes, without getting letters and forms “printed” in my retinas. Light themes is the way to go.

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 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.

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/

Same here. I also prefer to be proactive with the windows that will not honor dark mode and when they pop up in the middle of everything dark, the flash is unbearable. Having everything light mode help here.

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)

Agreed, for me also a light theme, with the screen's brightness turned way down (I prefer 10%, sometimes even lower). The room itself should also be neither too bright nor too dark.
Weird. I have pretty severe astigmatism, but I find dark themes much more comfortable. I'm maybe a bit photosensitive in general though and prefer to have my whole room/environment on the dim side (I especially can't stand bright overhead lights) so it might just be a matter of keeping things consistent.
Same here - I think it’s more photosensitivity than anything else that makes Dark mode better for me.

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 believe it's called light phobia. not that I'm afraid of light but I run from bright overbearing light if I can.

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.

I have been astigmatic my entire life, but now that I've passed the age where my eyes are less flexible than they used to be and progressive lenses are important, I've found that a dedicated pair of computer glasses are hugely helpful.

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.

I do the same, wearing my computer glasses whenever I'm in the house, even though things are a bit fuzzy at the far end of the room (exception: playing games from the couch). I feel less eye strain wearing them than my normal progressive lenses (at least in the house). Part of it might be because it's just a flat prescription, not a gradient prescription like my progressives, but I'm not sure.

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.

> I was diagnosed with astigmatism in 2018 or around that time. I haven't been to the eye doctor since...

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.

I received the same diagnostic in 2017, which coincided with the year I got my first external monitor for my MacBook. Headaches and eye pain became a more common occurence in the first weeks, until I stumbled upon ddcctl [0] and the fact that monitor brightness can be changed from the OS.

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/

> I was diagnosed with astigmatism in 2018... I haven't been to the eye doctor since... I feel that my eyesight may be becoming more of an issue. ...I see floaters.

You need to go back to the eye doctor.

Avoid window transparency and use clear editor backgrounds (dark themes are harder to focus on).

The extra light causes pupil contraction which helps with focusing.

Also work in a well lit place.

Hi, ophthalmologist here :-) The good news is that if there is no underlying pathology (such as keratoconus, which should be sought in case of progressing astigmatism), every ametropia can be corrected with the right glasses and allow a good working comfort.

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.

I have had glasses for short sight since the age of 6, and have always had astigmatism too (worse in left than in right eye). In general I've had no problems with screens till recently (I'm 68 now) except problems caused by poor contrast. Among other things I used to work on accessibility for websites; it is bizarre to me that all the lessons of accessibility have been forgotten - websites were once regularly tested for accessibility, including readability for the colour-blind, and many used to display little 'stickers' to certify the level they reached - but now light grey text on white is normal and unquestioned almost everywhere (including this site). This makes text almost unreadable for me; I have to bump the font size up much more than I would otherwise. I don't get on with dark mode either, even if the contrast is ok. I have no idea if any of this relates to astigmatism.

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.

There’s a BIG difference in how each optician / optometrist / ophthalmologists measures and determines and prescribes glasses for people with astigmatism.

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.

What was the difference in the measuring method? Because when I go to doctors, they usually first measure my eyesight with a machine, which should give an objective measure of my eyes' defects. But then they also take into account my subjective "feelings" by having me read distant letters with different lenses (starting from what the machine measured, but doing some slight variations). Maybe your doctor just used the machine to measure your eyesight?
The doctor simply didn’t think that correcting for astigmatism was worth it. The measuring process and equipment were essentially the same.
A problem is that during the subjective measuring the optometrists reduce the strength until your vision get worse. But astigmatism does not affect the vision so much. Then they get, you have 20/20 vision with the correct glasses, and 20/20 vision with weaker glasses, so they give you weaker glasses, even though they cause some blurriness
This is not my experience, as usually the doctor starts playing with different lenses when I stumble on some letters I have difficulties reading.
Coincidentally, this topic just came up for me. I've been experiencing bad eyestrain at work and have had to wear reading glasses on top of my contacts to get through my day.

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.

I never get good prescriptions. I'm too nervous. All I can think about is that I am wasting their time, by the third time they ask "this one? ... or this one? ... Before? After? Before? After?" I clam up. I'll just say one cause I feel so incompetent that I can't even tell this busy, smart person which picture on a wall looks better.

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.

I had the same experience so many times and I was so frustrated that I decided to buy a lens kit and learn to take the measurements myself, it's not rocket science.

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.

OMG, seriously?

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..

I looked into it and found some for $200. But they had testing glasses (where you insert the lens) with a fixed eye distance (PD). If that is the wrong PD, it is bad

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.

Bilberry extract. There are a few contraindications as for every supplement but it helps (also scientifically studied).