Open gmikel opened 8 years ago
This is a really good point. It's naturally a programmers job to stare at a screen for most of the day and often starting at a screen means sitting at a desk.
Here are a couple tips I picked up along the way, some of which you already mentioned.
Exercise
This goes without saying, but exercise is good for you. It doesn't have to be one particular thing but pick something and develop a regular schedule. I took a liking to barbell lifting and, even when things seem really busy (like this quarter), I force myself to a schedule. I always feel worse in the end if I skip. Many people I know bike to work. Depending on where you live this is an excellent "two birds with one stone" option.
Posture
I usually end up sinking into my chair after 3-4 contiguous hours of coding. Having good posture is key to sitting in front of a screen all day. There are many resources out there on optimal seat height, inclination, monitor height, keyboard height, etc. This may sound like overkill but, again, it's your job to code all day! You wouldn't want to race a Formula 1 car if every component and every detail were thoroughly inspected.
Periodically Get Up and Stretch
I kind of like the pomodoro technique not only for making sure that I get to my long list of things to do every day but to remind myself to get up and stretch. There are a million studies out there describing the benefits of periodically standing up and stretching for a few minutes for every 50-60 minutes of sitting.
Also, I try to write my algorithms and code on the whiteboard first before typing anything. Actually, I really appreciate the practice of making sure to step back and think about my code before entering anything into the text editor. As tempting as it is to jump in and start writing code I find many more bugs and design optimizations when I work on the whiteboard; the added bonus of being able to stand up for a bit.
Standing Desks
I have no personal experience with these but some swear by them. Like Emacs and Vim, there is a long-ish learning curve but reports say that they are a healthier alternative to sitting all day. Some workplaces allow, or sometime must fulfill requests, for workspace modifications if done in the name of health concerns. Any company should know by now that a happy employee is a productive one.
White on Black
Although I'm sure the opinions vary wildly I have had good personal experience with white text on a black background. For me, the white background is too intense after a long writing session. I'm sure you've seen me switch during lectures from my default to something that is easier to see on the in-class projector. There's a whole literature and universe of options for color schemes. "Solarized" is a common one. Here's an article I just found about it.
Larger Font
Perhaps more of a consequence of working long hours on the screen I use a larger than default fontsize. This prolongs the eventual degradation of my eyeballs.
These are some thoughts so far. I can keep going but I might stop here for now and return after a bit.
Good SO answer on black-on-white vs. white-on-black.
http://ux.stackexchange.com/a/53268
Evidence suggest that the former is better but there are some nuances when it comes to grey backgrounds, etc. interesting topic.
I'm a fan of this thread. I work full-time where I have to stare at computer screens all day. I mostly deal with data, so there is a lot of not-so-eye-friendly spreadsheet, Excel, and R action. Since I started work (I'm approaching 2 years), my 20-20 vision has err...regressed quite a bit. I, myself, am considering getting glasses or contacts.
The way I deal with long work hours is I sit on a fitness ball and "micro-bounce" at my desk all day. It helps with the posture and concentration. I also take walks annoyingly often (office jobs get stale real fast). When I'm home to do more programming (or homework), I do it all standing up. I don't have a standing desk, but I use the kitchen counter, hold my laptop, etc... Also, I watch all my lectures while exercising (mostly doing squats).
Finally, on non-work days, I get up super early. Usually around 5 AM and workout/exercise for 2~4 hours until I am physically unable to move. The rest of the day then, is spent doing homework/coding/catching up on work/watching Game of Thrones/anything sedentary.
I have been an engineer for 12+ years, and sit at a desk in front of a computer all day long, unless I go out to the floor to look at something or answer questions about one of my parts. To be fair though, I don't do any programming of any kind as part of my job; it's primarily CATIA work or doing some other graphic intensive design/analysis work. I will say that reading and typing documents seems to be harder on my eyes than my normal tasks. My eyesight is (I think) thus far unaffected. One of the things I have seen people do is get some computer glasses (my wife uses Gunnars and she swears by them). These somehow soothe your eyes so there is less strain. Also, the standup desks are becoming fairly common. 2 people in my group have them, and the ones that my employer buys are motorized so you can stand for a while then sit down when you get tired. As far as exercise, who has the time. I used to walk to work, which helped a lot, but I have changed sites 4 times in the last 12 years so that is not something I rely on. Consequently, I have gained 10 lbs since graduating college, 20 since getting out of the Air Force and probably 30 since high school, but that could just be due to my age.
I tried to find more information on terminal color schemes and impact on eye health. Unfortunately, this SO question summarizes the current situation: there isn't much data out there about what is good for you and what isn't.
I already mentioned "Solarized", but my understanding is that it's the only color scheme that was engineered with light level balancing in mind. Apparently, most other color schemes are just designed to work well aesthetically, not necessarily medically. (If that's an appropriate term.)
I'm going to try Solarized light and dark for a while and report my unscientific findings.
On a similar note, there is a whole world of programming fonts out there. (And accompanying holy wars about which is the best.) There are definitely some terrible ones out there. There are many different catalogs of programming fonts with thoughts on which are better for your eyes than others.
But like the syntax highlighting / terminal color situation I haven't seen much hard literature on the topic.
@cswiercz @quantheory @mvelegar
I'm not sure where the best place to put this would be so I decided to throw it here...
One of the lectures, last week I believe, talked about the notion of programmer time being important; after all, people are expensive. What about programmer health? Sitting is the new smoking.. I probably spend about 75% of my day either sitting or staring at a computer screen (smart phones, anyone?). I know that one way to curb the negatives of a sedentary lifestyle is exercise, which I have covered, but how about your eyes?
It's a sad but true reality that my eyesight has depleted tremendously since I started, finished, and graduated college with an undergraduates degree. Computers are useful tools which means that a lot of us have to stare at a desktop sun all day. Any useful tips or tricks from any of you in regards to this? Programs that autodim your desktop screen based on time of day? Specific color tones that are easier on the eyes? Special glasses? Etc.
I'm really grasping at straws here before I accept the fact that I should probably get a prescription for glasses. Also hoping that, someone that still does have decent eyesight takes a more proactive approach to protecting their sight before they do irreversible damage.