I admit the person I'm talking about is me. As much as I enjoy programming, I find it kind of a chore to look at the screen for long periods of time. My eyes become unable to focus properly after some time. As I'm a student, I do not have as much code to write as a professional programmer does, and sometimes I just write my code on paper and mull over/edit it for some time before transferring it to the computer.

Before I quit gaming, the allure of games seem to override the feeling of looking at the screen being a chore. Other activities like spending time on forums seem to have the same effect as games, but reading e-books on screen is a no-no to me. Does this mean that I don't really like to code? I can get quite engrossed with coding sometimes.

I am using my laptop (15.4") by the way, and do not use eye drops as well.

In any case, I realised that many other non-IT jobs require one to use stare at the screen for the whole day too.

And yeah, this is a community wiki.

link|improve this question
2  
I've observed that most people (including developers) have their screens way way WAY too bright and end up with eyestrain. Try turning your brightness down and your contrast up. "Black" should be black, not dark gray; "White" should be bright, but not like looking into a lightbulb. – Bevan Oct 27 '08 at 23:31
feedback

migrated from stackoverflow.com Sep 21 '11 at 3:47

This question came from our site for professional and enthusiast programmers.

16 Answers

up vote 17 down vote accepted

I'm not an eye doctor, but maybe you need reading glasses? You may be slightly Hyperopic and while working on paper isn't a problem, your laptop's screen may be causing too much eye strain. Can't hurt to get an eye exam to rule it out.

Also, try kicking up the font size in your editor a couple of notches. Maybe I'm turning into an old fart at the tender age of 30, but lately I've found that I prefer to work in larger fonts than I used to.

link|improve this answer
1  
Upped for the font size remark. It's amazing how much easier it is to code in 14 or 16 pt fonts. – Ben Robbins Oct 27 '08 at 20:25
1  
+1 get your eyes checked - and not just astigmatism. – peterchen Oct 27 '08 at 22:33
show 4 more comments
feedback

I think one of the best things you could do is change the colors/contrast of the programs you use. I use a text editor with bright colors (mostly white) on a black background to reduce eye strain -- I find that a white background is like looking into a bright light all day. That may not be the best thing for you, however. I read a study not too long ago (a link to which I cannot find, unfortunately) that said white/black vs black/white is preferred almost 50/50 in the population based on some genetic factor, so use what feels best for you. You may also need some kind of corrective lenses (or not... I wear glasses normally, but when reading or using the computer I have to take them off).

I also drink a lot of water while working. Aside from the benefits of getting my recommended amount of fluids, the increased bathroom breaks provide an unignorable reminder to get up and walk around periodically :)

link|improve this answer
show 4 more comments
feedback

Take small, frequent breaks! Stand up and do something else for a few minutes. Employer regulations actually enforce this in many countries.

Also, working on a laptop for an extended period is probably not good (although I myself do it) because it's harder to work in a healthy posture (laptop monitors are too low, keyboards are too small …).

link|improve this answer
feedback

Get your eyes professionally tested.

You probably need glasses. but be careful: talk to your optician (optometrist) and specify that you need computer glasses, NOT just ordinary reading glasses. You typically view a computer screen further away than a book, and the focal length of the glasses you have made needs to be a bit longer than you would normally have for reading.

link|improve this answer
show 1 more comment
feedback

For a long time I did all of my "real" development on paper. I've since moved to a whiteboard.

Sure, I have to eventually type it all in, but the design, thinking, algorithm design, etc is done away from anything that resembles a computer.

link|improve this answer
feedback

Before you give up, try adjusting your environment -- specifically your screen.

Try it higher -- or lower. And tilted so it's perpendicular to your line of sight.

Try adjusting the colors. If black on white bothers your eyes, try Green on Black.

Try adjusting the font. A different font family or size could make a big difference.

link|improve this answer
feedback

Maybe I'm turning into an old fart at the tender age of 30, but lately I've found that I prefer to work in larger fonts than I used to.

I upped my font size when I was 22. Then I got some (sorely needed) glasses - thereby enabling me to read 9px text again... However, it's still a pain in the backside, and I still kept the larger font size.

I'd also strongly recommend a light-text-on-dark-background color scheme.

I love the textmate cobalt theme, as it's not too harsh like a lot of the neon-green-on-black ones are, and have set up my other editors to mimic that

link|improve this answer
feedback

I've been in the IT industry for quite a lot of years, much of that time spent programming, and looking at a screen for long periods at a time can be a total chore. So first off, you're not alone.

Hours spent at the screen is not the same as 'being productive'. Achievement is not proportional to lines of code written.

Do you find yourself coding the same thing more than once? Doing a lot of code cut and paste? Maybe spend more time designing with those old-fashioned tools - pencil and paper - so that you write less code, that works better.

My code usually improves when I rip code out, or simplify so that less needs to be written in the first place.

So be glad you get bored if you have to look at the same old thing for hours on end - don't just accept it, use that feeling to figure out ways to write less code but get more done.

And that doesn't require looking at the screen all the time.

link|improve this answer
feedback

If you are far-sighted (I am), you may have to buy an external monitor, and set it back as far away from you as you can. A few inches can make all the difference in the amount of eye strain that you get.

A quick sanity check -- get a DVD movie -- If you can watch it on a big-screen TV for a long period of time, but not your laptop, it's probably the focal distance. (I'm assuming you will set them so that they cover approximately the same angular distance.)

link|improve this answer
feedback

I know a lot of people have made suggestions, but here is another one: An app called f.lux is pretty helpful for work during the night. It warms up your display to match the lighting at night. http://stereopsis.com/flux/

Ever notice how people texting at night have that eerie blue glow?

Or wake up ready to write down the Next Great Idea, and get blinded by your computer screen?

During the day, computer screens look good—they're designed to look like the sun. But, at 9PM, 10PM, or 3AM, you probably shouldn't be looking at the sun.

link|improve this answer
feedback

Depends on how long you can look at the screen for. I find even when I'm really busy coding, I constantly refer to documents. So instead of leaving them open as Word documents or such, print them, so that you get a fairly regular break. But you do need to be able to look at the screen for a half hour or so at a stretch.

You can get filters for the monitor that make it easier to look at as well, and there are exercises you can do to help your eyes relax while you work (such as looking at an object fairly far away every once in a while).

link|improve this answer
feedback

I'd say no. Your eyes will get sore. You will find it difficult to take breaks from the screen, and you'll go home at night with aching eyeballs.

You will end up being miserable, and that's not something you want at work.

Maybe look for a job with some field work involved? Something where you can spend part of the day installing/repairing, etc?

link|improve this answer
feedback

Besides what has already been mentioned,you can try eye exercises. This should strengthen the muscles in your eles to allow you to focus longer. Your local library should have books on the subject.

link|improve this answer
feedback

Im 29. I have a degenerative retinal disease, I will go blind some day, probably in the next 10-20 years. I have AWFUL vision, I can't see a damn thing. And I sit in front of my monitor 8-10 hours a day at work coding.

I definitely adjust visual studio to include a black background, different color scheems etc.. to relieve the stress on my eyes.

Basically I've relaized that a white background stresses my eye too much, so the darker colors with high contrast alleviate some of the strain.

link|improve this answer
show 1 more comment
feedback

I know a blind person who programmed fairly well. It was a bit frustrating for him though, but so was everything else.

But I'd say, go ahead and try not programming. Some people wanted so bad to be in a game company they dropped programming and became artists, writers, the guy that makes the manual or the guy that litigates the hell out of everyone else using olive-colored-elves. Similarly in other development companies there are a lot of other roles. But have you ever noticed that they all read their email and forward their xls and ppts all day long?

link|improve this answer
feedback

You could get yourself a screenreader and program with a pair of headphones and no monitor. Impress your friends!

link|improve this answer
show 1 more comment
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.