From very long hacking hours. My brightness is already the least that ubuntu will allow. I am certain you guys face the same problem. How do you take care of your eyes?
It might surprise you but drink more water. Not soda, or coffee; drink water. Half the time my eyes hurt it is more about being dehydrated then staring too long ...
<i>"... My eyes hurt... From very long hacking hours ..."</i><p>Have regular breaks. your eyes hurt because the muscles focusing the eyeball is squeezing the eye forward (extrinsic ocular muscle activity). <p><pre><code> HOMER: "... *my eye's hurt*"
LENNY: "You know its the inter-ocular pressure causing by the muscles trying to focus. Asthenopia is another name for it."
HOMER: "Huh?"
CARL: " Homer just take a break."
HOMER: "... I did. I just poked my eye to see what it was like."
</code></pre>
So to stop your eyes hurting take regular breaks ~ <a href="http://en.wikipedia.org/wiki/Asthenopia" rel="nofollow">http://en.wikipedia.org/wiki/Asthenopia</a> & <a href="http://www.coopereyecare.com/eye_strain.htm" rel="nofollow">http://www.coopereyecare.com/eye_strain.htm</a>
The trick is not to lower the brightness but to invert it. Under Mac OS, press Cmd-Opt-Ctrl-8 or get one of the many apps that do virtually the same thing but add more options. Basically, it just inverts the gamma curve and what was white becomes black etc. Under Linux... I have no idea.
I suggest using a work timer to remind you to take short breaks every 30 minutes or so. My favorite timers are xwrits (Linux) and AntiRSI (Mac). (N.B. Despite being an X program for wrists, 'xwrits' is not a typo.) As you can guess from the names, they are principally designed to help with RSI, but they can help with eye pain as well.<p>Here are a couple of things to try during the breaks: (1) count to 30 while focusing on something more than 20 feet away; (2) close your eyes and place your hands over them for a count of 30.<p>I know it's sometimes hard to take breaks when in the throes of a hackathon, but you'll get better with practice. I try to be really anal, taking breaks even if I'm mid-line; that way, I <i>know</i> I'll get back to work when the break is over.<p>
As you're near-sighted, ask your optometris to give you a "near vision" prescription. Such prescription would have lenses that are as weak as possible while still allowing you to see clearly at about arm's length.<p>Idea being that focusing at things close by requires keeping your ciliary muscle stressed for long periods of time (try to focus on your palm as close to your face as possible, and then keep it there for a few minutes to feel this). Focusing at things far away requires complete relaxation of the eye. If you wear near vision glasses, your screen will hopefully be far enough that your eye is relaxed when focusing on it. <p>I've been using weak glasses for work for the last 5 years or so, and find it makes a huge difference after a day of coding.
Check the screen orientation regarding other light source.
Do not put your screen in front of a source of light (window) or with a source of light in the back reflecting into it.<p>Optimal orientation is with screen perpendicular to the window or light source to avoid reflections on the screen and light source behind the screen. Otherwise your eyes and brain will have to do allot of effort to focus on your screen.<p>Check also the screen quality. LCD flat screen are Ok. A long time ago I worked with a tube screen slightly out of focus and had terrible head ache by the end of the day even though I had no problem with my eyes. Changing screen solved the problem. <p>
My optometrist recommended you unclog the pores in your eyelids. You eyelids have pores that emit a thin layer of oil that covers the eyeball, and helps prevent evaporation. Those pores get blocked.<p>She said to use a heat pack/mask (as hot as you can handle for as long as you can handle) an then massage the eyelids (pressing down on the top, and up on the bottom) to try and get the wax plugs out (yuk). Then wash your eyes.
Is it possible you are a bit farsighted? This can create some eye strain if you are forced to focus on a nearby object for long periods.<p>I also have a friend who forgets to blink when he concentrates hard (seriously). Needless to say his eyes hurt when he codes.<p>Whatever the cause, you should consider seeing an ophlamologist. I'm sure they can help you find a remedy.
Wear reading glasses, even if you don't think you need them. Set the color scheme in your editor to black on light yellow (this combination works well for me, YMMV). If you're using a CRT, either switch to an LCD or drop your resolution down a setting.