How to fight computer eye strain
Computer work is heavy weightlifting
Computer work strains your eyes and body.
A lot of computer programmers have eye issues. The problems range from glasses to alignment problems in binocular vision.
There are many exercises one can do. For example, look out of the window and back at a pencil.
Magic Eye
books up to full fledge 3D glasses with medical apps.
During my studies, I spent so many hours glued to a screen that I developed a light form of misalignment. When I was tired, my eyes ached and focusing on distant objects became difficult. A friend of mine reports issues much worse. He said he would always see two cars and would decide to drive through one when overtaking a car. He got it fixed with surgery.
Those with mild symptoms may help from looking out the window.
Or change the focus between your fingertip and a distant object.
I used to have a paper to train the convergence of the eyes. I could carry this with me for a quick relaxing of the eyes.
.
This small paper works like the magic eye book. When eyes are relaxed, a third circle appears. With time, the picture got old and torn. As I could not find an offer for these papers, my first version was a handcrafted python script.
I found more examples for those figures.
Turning the circles into an app.
Based on the python prototype, I thought about packaging the work as an app. To me, the most convenient way is a dynamic form where one can play around to motivate oneself to take out the “paper”.
I first tried to realize this with kivy. I had a desktop kivy app running in no time on my pc. In contrast, compiling and packaging for Android turned out to be a nightmare. Kivy requires buildozer
which comes with a million other settings and you end up in framework hell.
ChatGPT and Flutter to the rescue
After a while, I abandoned the project. Then came ChatGPT. For me, ChatGPT flattens the learning curve in many technologies. If ChatGPT has access to the app’s entire context, it works like a charm. For Android apps, a Flutter app comprises fewer files than a Java based app. As of writing, ChatGPT handles several files well. In 2023 and 2024, the quickest way for best results is the copy&paste approach.
My Flutter app saw the light of the day and works both on desktop and mobile.
See the following screenshots.
All code can be found in https://github.com/dolind/eyetrainer.
What to different next time
Nowadays, I would write a web app and package it inside an app.