Ask HN: How do you protect your eyes while coding for long hours?
We often spend long hours staring at a computer screen, which can take a toll on our eyes. What are some effective ways that you have found to protect your eyes during these long coding sessions? Do you have any specific techniques or strategies that you use to prevent eye strain?
92 comments
[ 6.8 ms ] story [ 153 ms ] threadI thought the issue for macular health wasn't "blue light" in particular, but high-intensity light energy in general: https://pubmed.ncbi.nlm.nih.gov/29044670/
Lastly, I just don't code for long stretches anymore. I usually get up to walk around every 60 or 90 minutes, for my knees and my eyes.
It is not that I have a problem per se, but this condition made me realize that my eyesight won't get any better and since I depend on it for a living, well.
For more context, my eyes became much healthier after I increased the brightness of my monitor to 60% (250nits) since last 4 months. Before then I used to regularly use it at 10% (40nits). My power numbers were getting worse and I even had high IOP, which has improved now.
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6201904/ This talks about IOP changes on using smart phones. And it increases more when done in low light.
I saw a lot of links for myopia in children and links to light exposure https://www.aao.org/editors-choice/sunlight-exposure-reduces... https://iovs.arvojournals.org/article.aspx?articleid=2705915 These articles are talking about overall exposure - spending time outdoors and find it to be of statistical importance.
https://webvision.med.utah.edu/book/part-viii-psychophysics-... See the section on illumination
"For recognition tasks, visual acuity is greatly affected by the level of background luminance. (Graph)
One theory put forward by Hecht is that within the rod population and within the cone population, there are differing sensitivities which are distributed randomly. Therefore, at high luminance, all cells are active for a high level of visual acuity. At low luminances, only cells sensitive to that level of luminances are active and because they are distributed randomly, the retinal mosaic is coarser thus a lower level of visual acuity is achieved (Graham, 1965).
Another possible explanation is that under limited quantal availability, quantal capture is more probable in the para-central and peripheral retinal due to greater spatial summation. Since photoreceptors density in this area is low, resolution is poorer. As light levels increase, quantal capture occurs more successfully at the central retinal (macula and fovea). A higher level of visual acuity is achieved due to the high photoreceptor density. "
I am not sure what all of these terms mean but I guess some good sources for you to check out. Do share if you find something interesting.
I don't believe they were screen related, I just hated seeing them. I either got used to them after a couple years, or maybe the pieces have settled out of sight, as they don't bother me much anymore.
Same thing happened to me around my late 20s and my doctor said the same thing (so n=2 now).
Maybe it helps with mine.
If you were eyeglasses, it's worthwhile to pay an extra bit - usually on the order of $50-$100 - to get a blue light filter built directly into your glasses.
Further, my optometrist specifically recommended that I use slightly underpowered prescription. I'm at about 90% of what my glasses prescription could be but he tells me that this means my eyes will strain less. It has seemed to work for me since after a few years of having to increase prescription every 1.5 years or so, it's starting to slow down. Could be anecdotal or caused by aging but something to bring up with your own optometrist if you have one.
The blue light bugaboo is a hobby horse of my psychiatrist and other quacks. It really makes little difference, because the intensity of the light coming from your monitor or your smartphone is negligible compared to sunlight/daylight. What matters ten times more than blue light is what you are doing on that computer at night: are you engaging in bitter social media arguments? Playing twitch AAA games? Are you watching YouTube with a ton of fast talkers and ads and quick edits? That will amp up your hormonal imbalances and disrupt your sleep patterns surer than the color of light wavelengths coming into your retinas.
Is there any evidence that they work? Most implementations I've seen are essentially colorless, so I find it hard to imagine that they're blocking that much blue light.
I just remember to blink, and I also have no trouble with eye strain.
Another obvious one is stare out the window but it’s not as immediate as stereograms to me.
Take frequent breaks and focus on objects at different focal depths (stare out a window and count leaves, look for patterns in clouds, mentally trace a pattern across an opposing office building)
He thinks that healthy habits keeps you safe.
As a general rule, try to avoid making too much effort.
• Avoid sitting in a dark room with just the monitor on.
• avoid being too close to the monitor. Distance of one hand length is enough, but not less. (Half of this for your phone).
• Have breaks. After one hour, give your eyes some minutes to refresh.
I personally use dark mode.
Why? I never use dark mode and never have eye problems. Sometimes sits for like 20 hours coding. All I do is keep the room well lit. I'm in my 30s.
I remember having eye straing a few times like a decade ago, but I guess that was from over eating sugar or something. If you have eye strain I'd guess it has some other reason than the screen or how you treat your eyes. Or maybe you need better glasses.
Edit: Dark mode would cause your pupils to dilate, maybe that is the reason for the eye strain people here see? Bright room with bright room keeps pupils small and maybe reduces strain.
Eye dryness is the only real "eye strain" related issue that can have permanent effects. Ironically the advice of "rest your eyes to relax the muscles" might be helpful because it helps your eyes re-wet, as your blink rate lowers when engage in close up activity. The advice itself is based in the nonsense that the muscles can wear out.
> I remember having eye strain a few times like a decade ago, but I guess that was from over eating sugar or something
No, it wasn't, and I'm always surprised when people look for conclusions like this. Most of the replies in this HN post are anecdotal "here's what I do," and very few have an understanding of the actual issue and question.
One hand length is like 6 inches lol
I think its counter productive to have dark mode enabled all the time and I can feel my eyes strain when using it during the day. Windows, VS Code, Office 365, Edge and a handful of websites that follow the OS settings switch themes. I wish more laptops or screens had ambient light sensors and I would use that instead to trigger the theme switch. Maybe theres a way to use the webcam?
I also have a blue light filter on my glasses, and have enabled the OS blue light filter for a stronger effect when its night.
Good for my brain too. It is a must to get up and walk around. Looking at things, yes, but also thinking different thoughts.
Back when I worked in an office and when tobacco smoking was still a big, not shameful, thing, I would "adopt a smoker". I would pick a cigarette smoker and say "when you go smoke let me know" and I would go outside with them.
These days it is an ingrained habit and I get up and bounce around for five minutes or so every hour or so.
I actually posted this exact same thing a few days ago, and admittedly at the time, I was fairly confident that it wouldn't kick off because the title was kind of half-arsed and confusing. But also, it was uniquely me. I didn't really care.
And when I read this title, it sounds like something ChatGPT would have produced, in a very general way.
Even the body sounds very ChatGPT. So I wonder if this user decided to repost my post, in a way that would actually get engagement.
Then it got me thinking: Maybe we're reaching a point where the only thing that really matters, is your ability to create prompts. Your ability to ask the right questions to AI, so you can produce the right answers. That will be the future of humanity, and your inability to adapt to this way of thinking will hinder you.
Just an observation. Nothing more. But yeah, that title is way, way better.
No, I have not seen your post. I was coding away and genuinely was thinking about my eyesight and started adjusting my ambient lightning. Then I realized that I actually have no idea what I'm doing, so I have decided to write an Ask HN.
I wrote the title but was too lazy to find good wording of the subtitle (is one needed anyway?), so I had it generated with GPT3. I adjusted it by deleting one sentence.
Now, lately, when reading /r/writingprompts I every once in a while come across a response that reads very much like ChatGPT generated it. I guess the feel of the AI generated responses is somewhat like what you would get when a junior high schooler is asked to write a story and hasn't had much experience yet.
Seems to me to be part of some kind of duality in models of epistemology; knowledge construction, vs. knowledge discovery through "search" of the hypothesis space?
Although at the same time if no one notices and continues to enjoy the reading, then maybe no one is harmed?
In my gut I would be very sad if ChatGPT content started flooding in
* I sit by a window, so I end up naturally staring off
* night shift and dark mode https://iovs.arvojournals.org/article.aspx?articleid=2689610
* always with ambient light around me, never in the dark
Blue light affects your circadian rhythm, use blue blocker glasses, use F.lux. Adjust phone and device brightness to be the minimal amount you're comfortable reading. Don't use full screen brightness at night, especially because your pupils are more dilated in lower light environments. Use dark mode everywhere you can.
Blue LED light may be toxic to your retina with long term exposure. The jury is still out on this one, but the above steps will help mitigate the issue.
The other issue is emmetropization and nearsightedness. Incredibly important to understand for children. It will affect you too if your eye prescription continues to change. It usually stops in your 20s (your vision stops getting worse), but for some it continues to degrade past that. Holding things close to your face keeps your peripheral vision in focus, making your eye think it's over-focusing, so the eye grows longer (more near sighted) to try to correct. This happens without the brain's involvement, it's all based on focus on the retina. Your eye doctor should know about this process, should know about low dose atropine, and should know about glasses with fogged edges, especially for children. Most don't.
He said his patients with the healthiest, aged eyes are those who knit. They are constantly looking closely then away, closely then away, ad naseum.
Reducing focus in peripheral vision may help slow the progression of myopia (nothing can reverse it), so the advice might be ironically helpful even though it's based on complete misunderstanding of how the eye works. Again, it has nothing to do with muscle use nor the action of your lens changing focus.
I wasn't aware of this. Do you mean LED light specifically? Is it in some way inherently different from the much more intense blue light of the sun? I don't see how light from one source can be any more damaging than from another source; it's all just the same EM radiation.
2. Dark mode everywhere I can. Unless an app has completely terrible (e.g. low contrast) dark theme.
3. Desk never facing a wall, rather open room. Let's me rest my eyes at something farther away than my monitor.
I don't bother with f.lux or similar. Find it a bit pointless and annoying. Much better to lower the brightness.
I use dark mode.
I also make sure to look up and outside the window at least every 15 minutes.
Also, I get "Plus One". Talk to your eye doctor. They can do "ADD +1.00" to your prescription to make things larger but still in focus. You won't have to hunch forward either.
Then I make all of my IDE font settings larger. I see less on the screen, but I have less eye strain.
I have glasses for a stigmatism but rarely wear them (my vision is like 19.5/20 or something like that, but that was 4 years ago), except lately I have because of the new clipons I got from Amazon they were like $20 for 2 one's darker than the other. Supposedly it helps get better sleep if worn before bed, but that's not my primary purpose. It's namely so I can just have less light like when I can't avoid a white page in chrome or something.