Physical pain is to be expected when you work on a laptop. I use my PC for long hours without any kind of discomfort, but working on the MacBook for even a few hours tires me out. Here is what I suggest:
1. Try using a desktop computer, if you can.
2. If you can't use a desktop, get a separate monitor, keyboard and mouse for your laptop. Use this setup when you're coding at home.
3. Learn and use Emacs or Vim. They're seriously better on the wrists. If you cannot invest time in one of these editors, learn whatever editor you're using right now properly. Make use of keyboard shortcuts whenever possible, and avoid the mouse/trackpad like the plague.
4. Use a dark color scheme in your editor and make it fullscreen. You won't believe how much cognitive strain it eliminates until you've tried it.
5. If you're using Windows, use the Windows Classic theme. On Linux, try using whatever monochrome theme you can find. The Mac already has a monochrome theme. Staring at wild colors and funky visual effects makes you feel tired. Eliminate these distractions.
Had wrist trouble in past. The parent post has good advice.
From personal experience:
1. Switching from laptop to desktop made a lot of difference. I now use a MS ergonomic keyboard.
2. Switched to using mouse with left hand. The problem is that the keyboard is too big on the right side due to the additional numberpad. So if you use a right handed mouse, you often end up holding it at a weird angle.
3. Started using vim.
4. Ensure that keyboard and mouse are at a proper height. If you have to bend your elbows, then something might be wrong.
5. Regularly check to see if you are gripping the mouse too tightly or if you are hitting the keys too hard. You may be unaware of the stress you are putting in the muscle.
Additional tip on emacs: swap the Ctrl and Caps keys. If you are on Mac, use Aquamacs because it allows you to use the option key instead of the control key, which is awkwardly positioned on both PC and Mac.
If there was anything Sun got right in its workstation design, it was where they put the damn control key: next to your pinky, where it belongs.
Some people argue that swapping ctrl and caps isn't good. See http://xahlee.org/emacs/emacs_pinky.html. Xah Lee says use a good keyboard... Not sure if this is true. I'm perfectly happy using the control key by reaching down with my left pinky...
On a typical PC keyboard of today, the Caps Lock is the
most difficult modifier key to press, and is pressed by the
weakest finger pinky.</quote>
On keyboards I've encountered Caps Lock is right on the left of an
A key on the home row - it is easy to type it (and certainly
easier than the Left Ctrl).
It makes the left pinky do 2 pinkies's work.</quote>
You press Caps Lock instead of Left Ctrl - the same work.
It forces the left hand to strain into spider legs
positions, or forces your right hand to flies about wildly if
the letter key is near the middle of the keyboard (e.g. T, G,
B).</quote>
The standard practice is to press the Right Ctrl (right hand) +
t,g,b (left hand) - no flying.
It renders many Control-‹key› spots void, since now with only one
pinky many otherwise good Ctrl-‹key› spots are hard to
use.</quote>
The Right Ctrl stays therefore there is no need to use only one pinky.
The most frequently used Ctrl-<key> combinations in Emacs is point movement commands. Caps Lock makes it easier to type some of them e.g., C-n/p.
The left hand now constantly shift from home position.</quote>
I wholeheartedly agree with swapping ctrl/caps. It also keeps other people from using my machines. :) Linux, Windoze, and Mac all have swapped ctrl keys.
Personally, I use command and option as meta. I don't like Aquamacs, they make it just different enough from standard Emacs to be annoying.
1. Try using a desktop computer, if you can.
2. If you can't use a desktop, get a separate monitor, keyboard and mouse for your laptop. Use this setup when you're coding at home.
3. Learn and use Emacs or Vim. They're seriously better on the wrists. If you cannot invest time in one of these editors, learn whatever editor you're using right now properly. Make use of keyboard shortcuts whenever possible, and avoid the mouse/trackpad like the plague.
4. Use a dark color scheme in your editor and make it fullscreen. You won't believe how much cognitive strain it eliminates until you've tried it.
5. If you're using Windows, use the Windows Classic theme. On Linux, try using whatever monochrome theme you can find. The Mac already has a monochrome theme. Staring at wild colors and funky visual effects makes you feel tired. Eliminate these distractions.
Just this much for now :)