I used to do something similar to you - 12 hours coding every day, with a couple of hours of Counterstrike, for about 3 years. I thought I was being very productive. But then I started to measure my effectiveness (purely out of interest rather than any belief I wasn't working well) - I measured my billable hours, lines of code, commits, issues fixed, etc. Over the course of about 3 months I found that I did less work when I was in front of the screen for 12 hours compared to 8 hours. Spending more time in front of my computer reduced my effectiveness. I put the reasons down to the fact I could do exercise, sleep better, have a social life, etc - by being healthier I work better. That said, my Counterstrike skills completely disappeared, so there were downsides.
My suggestion would be to take a few hours to build something that tracks how well you work, and then vary the hours you put in for a while. See what happens.
Regarding your eyes, try to make your screen brightness match the ambient level of light in your environment, sit at a distance where you don't need to actively focus (use glasses if necessary), and pick a theme for your IDE that's quite dark. The less work your eyes have to do the better.
Your CS skill dropped even though you kept on playing regularly?
And btw my experience with dark themes is kind of the opposite. I ended up settling for making everything a standard black [and other colors] on white. Most websites [and other things] tend to be light themed. It hurt my eyes to switch back and forth between the browser and my dark terminal/emacs. I even have my windows background as plain white now.
Had similar problem, now I can sustain 10 hours with no headaches. Here is what works for me.
- get your eyes tested. I have small astigmatism, not enough for glasses, but it was causing headaches. I got glasses anyway.
- Recheck your eyes every year. Eyes lens will flex once you wear glasses
- Buy large sound isolating headphones, not in-year.
- Play single song in loop
- Get a bigger screen, even cheap 20" will do. Laptop has horrible ernomomy
- Investigate ergonomic keyboards. Microsoft Natural Ergonomic Keyboard 4000 or Microsoft Sculpt are good starting choice.
- Try inverted colors. Most editors have colors schemes, try Solarized, Dark Vim etc..
- For browser most sites (github) can be styled black using Stylish browser plugin
- All operating systems (even Android) supports inverted color accessibility settings. Control-Option-Command-8 key combination on Mac.
- Reduce time spend in front of computer by improving your productivity. It is much less draining if you actually enjoy your work and see results fast.
The obvious answer is not to spend 16 hours in front of a laptop screen at your desk. Scedule an hour of daily exercise, eat healthy and do those other things that you ought to be doing like cleaning, cooking, washing and sleeping.
My eyes started twitching - I needed glasses so watch out for this.
When you use a screen, you blink less. Actually try to blink more. Also look away and focus on far away objects - the usual tips.
The last tip I find that works is close your eyes gently while sitting down, and tense your whole body, as much as you can. Even your glutes, activate as many muscles as you can while keeping your eyes as un-flexed stressed as possible.
My eyes feel much better after doing this. I think I read this some time ago, and your body is using energy elsewhere - while relaxes the muscles not needed (around your eyes) and it feels amazing.
I use 1-hour-less principle. It is counter-intuitive but since I am not working for any company I can afford it.
Right before the work is about to finish, I realise that it will take me an hour to finish this - I call it a day.
The benefit apart from less stress is that tomorrow you are motivated for your next day's work, you know you can get something done right away without having to plan for anything.
And that 1 hour's work often takes only 30 minutes.
Hey, I was feeling a lot of eye strain a few months ago while writing my dissertation. I went to an ophthalmologist, and he gave me a few tips that changed my life (no, serisouly):
- DO NOT have the monitor at eye's level as some people suggest. Our muscles relax when the eye is looking down. 45 degrees down is fine. See for yourself: Put your finger at eye's level and keep looking at it for as long as you can. Then drop it down to chest's level and see how much better it is.
- Get yourself a bigger monitor, in case you don't already have one, and stay further away from it. Also related to eye muscles strain: focusing up-close is really bad for you. Do this test: look at your finger really close to the eye, and then place it further away.
It puts a lot of strain on the eye's muscles to look up and focus up-close. Those were exactly my problems. Putting my chair a little bit higher and my monitors further back in my desk solved my problems.
edit: Make sure to use only your eyes to look down, and not your neck or back, otherwise you will replace one problem with another.
Having the top of the monitor at eye level allows you to look down at the entire screen (which is what I understood to mean having the monitor at eye level).
I put it on the "slow" setting, and it gradually adjusts my screen during the day. I stopped noticing it, however whenever I look at a co-workers screen, it feels like I am staring into the sun!
- Get an external monitor if you can. Personally I can't use a laptop for an extended period of time because it really takes a toll on your body. I just use my laptop in clamshell mode with a large external monitor, and an external mechanical keyboard and mouse.
- Get up and walk around. I usually get up and stay up for 15-30 mins about once every two to three hours. Mid afternoon (the longest work stretch of my day) I get up, go down 12 flights of stairs and take a walk around a few blocks just to keep the blood moving.
- With regard to eyes use a dark background for everything. Bright light is what makes your eyes hurt. Alternatively make sure the difference between foreground and background isn't too great. A soft light behind your monitor can reduce the contrast between the blinding light coming out of it and the dark area behind. Also make sure to look away from the screen periodically. If there is a window nearby stand up every 15 mins or so, walk over to it, and look out at a distant object. This is good for both body and eyes.
FWIW I do this: gym 1 hour per day (improves health, skin condition, confidence - just don't run every day and do get good running shoes); plan my goals with GTD (listen to the original audio CDs - they are golden - online guides are usually missing huge chunks --- use paper or a simple note-taking app like Zim); Final Version (http://markforster.squarespace.com/final-version-faqs/) in a cheap notebook with side markers for context; Pomodoro to split up the working day.
All this has taken years to work out - and it will not click you to start with - but you'll eventually find yourself feeling less stressed and more satisfied with your day.
Whether you like it or not it's not sustainable to be in front of a screen for 16 hours a day - so make one of your life goals to get out of that situation as soon as you can.
For your eyes - I recommend installing a software that will remind you to give your eyes a bit of relax (years ago when I was on WinXP the software was called EyeCare, when I google for it now there is a plethora of projects so you will need to test what suits you best)
For productivity - what helped me a lot was to block myself on my home router from accessing all distractive web pages I used to pop in every now and then (i.e. playok.com for just one chess game, linkedin, facebook, ycombinator :-) ) - I found that my brain loves to be distracted and it is not that simple to keep focused, blocking distractors helped. Having that said I was also allowing emails in certain hours in the morning and in the evening (no emails during the day).
Also I completely cut on my favorite games (even during the weekend) like HalfLife, CS, starcraft... Was hard to make this decision but in the end appeared to be a great time saver.
I read all the answers and they're very good. I'd just add something very important: keep track of how many days you go without doing exercise, eating healthy etc.
All this advice is great, but it's very easy to have a 'bad period' where you just don't realize you're going back to your old patterns.
Being more specific: implement some remainder in front of you that shows your progress over time. E.g.: a piece of paper showing you the dates you exercised in green, and the ones you didn't in red. Make it your first priority to complete that piece of paper. You can go fancier with web apps or even fit-bands, but the idea is the same: track yourself everyday. And be aware of when you stop doing what you need to be doing.
First of all, take care of your eyes. Use the 20 20 20 rule as previously said, check your eyes to avoid headaches.
If you use a laptop, get a stand and a separate keyboard and mouse, it'll help your posture. If you have a desktop, it'll be easier to maintain a good posture and relieve neck pain by looking to what's in front of you, not down to a laptop on a table.
Walk. Get up every hour or every 45min. Do this religiously.
Drink lots of water or tea. Stay hidrated. Don't eat garbage.
To have better sleep, install flux on your computer.
If you have some spare money, buy a really comfortable office chair that's not too sofa-y and not too hard. Buy a table that has the right height to you.
Olympic weightlifting, gymnastics, plyometrics, running, some powerlifting, and stretching/mobility work (all CrossFit stuff). Doing all this is preventative maintenance to sitting at a desk for hours at a time.
I do this six days a week, 2 hours a day starting at 6am. When I'm at the computer, because my body is strengthened and limber, I can sit a lot longer but I inherently like to move around a lot.
Also, having a good workstation is key. Proper height for chairs, monitor at eye level, elbows are slightly above parallel to the keyboard. Stand up stations are also awesome and cheap/easy to create.
I almost died 8 years ago from sitting at my desk too much. Without knowing it I developed a quiet form of deep vein thrombosis and then dropped with two pulmonary embolisms. I am fine now, but it was a close call.
My recommendation is to have a timer on your laptop to remind you to get up and walk around for at least a minute, every twenty minutes.
I also find it beneficial to do a few minutes of random Qi Gong exercises about once an hour.
A pomodoro timer app [1] did it for me, although I have not bothered with the whole method/technique with all its bells and whistles, just the dedicated uninterrupted 25 minutes of work 'sprints' and short 5 and longer 15 minute breaks that I do not skip.
I used to do something similar to you - 12 hours coding every day, with a couple of hours of Counterstrike, for about 3 years. I thought I was being very productive. But then I started to measure my effectiveness (purely out of interest rather than any belief I wasn't working well) - I measured my billable hours, lines of code, commits, issues fixed, etc. Over the course of about 3 months I found that I did less work when I was in front of the screen for 12 hours compared to 8 hours. Spending more time in front of my computer reduced my effectiveness. I put the reasons down to the fact I could do exercise, sleep better, have a social life, etc - by being healthier I work better. That said, my Counterstrike skills completely disappeared, so there were downsides.
My suggestion would be to take a few hours to build something that tracks how well you work, and then vary the hours you put in for a while. See what happens.
Regarding your eyes, try to make your screen brightness match the ambient level of light in your environment, sit at a distance where you don't need to actively focus (use glasses if necessary), and pick a theme for your IDE that's quite dark. The less work your eyes have to do the better.