Michael Eriksson
A Swede in Germany
Home » Software development | About me Impressum Contact Sitemap

Ergonomy for software developers

Most instructions miss the point

I have on many occasions seen information on how to work ergonomically with computers. Typical examples include: Seating arrangements, elbow positions, wrist positions, and that poor monitors should be avoided. What I have over the years found to be the one truly critical component has been constantly ignored: Damage done to fingers through pressing keys of various kinds—possibly, because the advice givers themselves were unproficient or casual users, or because they tried to apply advice from other areas (e.g. seated work in general).


Side-note:

Similarly, the makers of “ergonomic” keyboards seem to have no clue about the actual typing, but focus just on wrist positions. (Worse, the wrist positions dictated by such keyboards have seemed awkward and un-ergonomic during my brief experiments. However, it is possible that this would improve with more time to adapt.)


Here I will try to give the young software developer (or intensive user of computers in general) a few crucial tips that I wish that I had received in lieu of “sit with your back straight” when I started working seriously with computers. I stress, however, that the more typical ergonomic advice should not be neglected—there is a reason why the advice is given.

The core problem

A proficient and frequent typist can make an enormous number of key strokes over time, many of them sustained presses, many mouse-clicks. To give a rough order estimate: Assume that someone can type at 100 keystrokes per minute (which is not in anyway high) and does so for a grand-total of one hour a day. This amounts to 6000 keystrokes per day. Assume that this (privately and professionally) happens on 300 days a year. We now have 1.8 million keystrokes a year. Assume a life-time of computer use of 60 years, and we have a grand-total of 108 million keystrokes. For someone truly involved with computers, who spends both most of the work-day and a sizable part of his spare time using keyboard and mouse, this number can be reached in a fraction of the time—some computer games, e.g., necessitate a constant stream of keystrokes, while semi-addictively keeping the user going for five hours straight.

Unsurprisingly, in the light of such numbers, many users accumulate problems over the years.

How to alleviate the problem

  1. Avoid sustained presses; in particular, when using a mouse: A sustained press means a prolonged stress with no ability to relax, and it does much more damage than a brief up-and-down—in fact, it does more damage than even a consistent up-and-down for the same time period.

    Beware that some keys, depending on construction, can have a greater counter-force on the fingers the deeper they are pressed. A sustained press is subject to this maximal force the entire time, while an up-and-down will see a varying force even on the down-stroke (and will, obviously, be much better on the up-stroke and when moving the fingers to other positions).

    Corollaries: Try to find a set of keyboard short-cuts that avoids a constant stream of Control-, Shift-, and Alt- presses. Avoid tools that require too many sustained presses; in particular, drag-and-drop with a pressed mouse key.

  2. Find a mouse (or other corresponding device) that has very little resistance to key-presses. Beware that a mouse typically has a noticeable higher resistance than a keyboard.

  3. Ditto keyboard. Many notebook keyboards are excellent. A good rule of thumb is that the flatter the keys are, the less resistance they give.


    Side-note:

    One problem that I had was that most of the equipment provided at universities and my early employers used input devices with much too high a resistance. Fortunately, better devices are available at reasonable prices nowadays.

    Do not accept an unergonomic device provided by an employer, but insist on equipment that does not hurt you.


  4. Try to find ways of replacing mouse presses with keyboard presses.

  5. Do not work for too long periods without a break; in particular, stop at the slightest sign of pain.

  6. Try to type in a relaxed manner. Do not, as I have seen (and heard...) some do, hammer down the keys. Avoid keeping a key pressed down for longer than it needs to be pressed (this goes in particular for the likes of Shift).

  7. Make ample use of completion to minimize your typing; if the tools that you use do not support completion, find better tools.


    Addendum:

    Over time, I have grown less certain whether this is sound advice. Not only does use of completion often lead to a loss (!) of time for a proficient user, but the benefit in terms of ergonomy is often dubious: most potential cases are too short to benefit and completion functionality is often tied to key-sequences involving Control, Shift, or similar. (As noted above, these are particularly harmful.)

    I do use plenty of completion, but it is usually for the purpose of being consistent, getting things right, letting a program supply some piece of information that I would otherwise need to lookup, or similar. A good example is the use of tab-completion in a shell to input the right path of a file. Another is completing the name of a Java-method based on an object. Yet, another can be seen in the following paragraph, where I quote myself. I typed “lo” and then repeatedly used Vim’s keyword completion to supply the rest with no risk of typos. For a longer quote, however, copy-and-paste would have been more economical. (In other settings yet, especially in program code, putting the text in a constant of some sort and using it twice might have been preferable.)

    As to “loss (!) of time”: Only rarely is an individual word in a regular text long enough that completion saves time, once a certain level of typing speed has been reached, and there is the additional risk of having to choose the right completion among several or many candidates. For instance, if I type “comp” and invoke Vim’s dictionary completion (not to be confused with the keyword completion!), I am met not just with the “completion” and “complication” from the previous sentence, but many dozens of candidates—by the time that I had made the right choice, I could have supplemented the “letion” (or whatever I had intended) several times over. Completion in code is often a different matter, however, as variable names and whatnot can be longer than most regular words and as benefits like those discussed in the previous paragraph often come into play.


  8. Try to find keyboard shortcuts and other means to make common tasks less key intensive.

  9. Try to configure away double-clicks, e.g. in the Windows Explorer. A double click gives less relaxation time and can also unconsciously require more force.

  10. Consider using a different key-mapping or physical keyboard to spread the load more evenly over the fingers or to avoid unnecessary shifting. Consider e.g. a Dvorak keyboardw over a QWERTY keyboardw, or a US-English keyboard over a local one—the latter often have idiotic mappings for the non-alphanumeric keys. (Obviously, this advice is mostly relevant outside English-speaking countries.)

  11. Try to spread the load further by deliberately varying what hand presses what key. Pressing the function keys with different fingers is typically relatively easy, and only leads to a marginal time loss. Hitting the Esc key with the ring finger is actually easier than using the pinky after a brief training. If a particular key requires a pause to stop and think (which can be the case for a rarely used key even for a fully fluent typist), then deliberately using the “wrong” finger costs little extra time.


    Addendum:

    The claim concerning the Esc key surprised me on a re-reading. I do vaguely recall positive such experiments in the past, but the claim does not apply to my current keyboard when starting in a “fingers on the middle-row” position.

    Correspondingly, (a) the caution that not all advice need apply to all keyboards, nor to all hand–keyboard combinations, (b) the secondary advice that it can pay to experiment with keyboards of different sizes and with different key arrangements, especially for those with unusually large or small hands.


  12. Consider doing some minor warm-up before starting work, and possibly a relaxation exercise every now-and-then. (Again the normal ergonomy guides miss the point: They correctly talk of shoulders and similar here, but they typically leave the all-important fingers out.)

  13. Avoid spending too much time per day before a computer, e.g. by finding other spare-time interests. Computer games are more fun than girls, I admit, but spending more time with girls will move some stress from the fingers to the ears. Similarly, substitute more finger-friendly games for finger-unfriendly ones, etc.

  14. Spread the work more evenly over the day (or other time unit): One hour of intense stress does more harm than two half-hour periods with a twelve-hour divide; five minutes per hour over twelve hours is even better (but typically unrealistic).

  15. Try to identify and work-around any quirks your keyboard might have. The space key, for instance, is often much harder to press down than other keys; if so, avoid pressing it with any finger but the thumb.

  16. Do not deliberately try to work faster with the input devices. Doing so will typically lead to greater tension, more force used, less relaxation time, and can cause more work through an increased error rate. A relaxed speed will come naturally to those who just pay attention to typing correctly, while otherwise letting the fingers manage themselves.

  17. Avoid additional stresses from non-computer tasks, e.g. prolonged writing by hand.

Re-consider what systems and programs you use

Many of the above recommendations require some amount of control over the environment. This control is rarely provided by MS-Windows, leaving Linux users with a clear advantage (in addition to being more keyboard than mouse oriented to begin with). If you are not already leaning towards the more powerful environment that Linux provides, then this is another reason. Similarly, different tools have different customizability. Vim, my editor of choice, allows the mapping of any functionality of the editor to any one key—or to a series of keystrokes, should this be preferred.

Another complication is that employers often have predetermined systems and applications that must be used. The good news here is that Linux is gaining acceptance; the bad that most modern applications rely either on mouse use or Control- prefixed keyboard short-cuts.

Generally, most organizations will be very stubborn against changes (for various reasons—some legitimate, some not). Lobbying the right persons can help, however.

Beware that keyboards are mis-designed

What is the weakest finger on an average person? The left pinky. Which finger has to do the hardest tasks when typing? The left pinky!

It is true that the stronger fingers accumulate more keystrokes when typing (at least when touch-typing English on a QWERTY keyboard); however, look at the keys the pinky has to frequently handle in addition to its assigned letters: Control (a sustained-press key), Shift (a sustained-press key), Caps-lock, and Tab. (A few others are more infrequent.) Notably, these keys often have a greater size and resistance than the typical alphanumeric keys, and (as stated) two of them are sustained-press keys.


Side-note:

The Tab key might seem infrequent to an unproficient and/or Windows user; however, for proficient users and Linux users it plays an important role through tab-completion. In contrast, more proficient users have often done away with the Caps-lock key.


For a user of Vim, assuming no customization of the default keys, the situation is worse yet, because now the Esc key is one of the most commonly pressed, by default with the pinky, and the a key (with or without Shift for capitalization) also becomes more frequent through its append functionality in the “normal” mode. (On the upside: Looking at the “editor war”, Vim is probably still more ergonomic than Emacs, as the Control key is used more rarely.)

Touch-typing is a two-edged sword

On the one hand, touch-typing almost invariably results in a more relaxed and less forceful way of typing, which is good. On the other, touch-typists are generally faster, often much faster, which implies more keystrokes made per time unit—and very often correspondingly more keystrokes overall. While I believe that the overall balance is in favour of touch-typing, the increase in the number of keystrokes will undo much of the gain. (If someone, somehow, manages to avoid this increase, then it is a no-brainer.) Further, if a key is pressed down faster, the maximum downward force can be greater; however, I doubt that this effect will be truly significant considering that the time spent on the keystroke diminishes.


Side-note:

This is with regard strictly to the ergonomic issue: looking at productivity and other factors, touch-typing is far superior to even a proficient “hunt-and-peck” and its variations.


Physical training

Many other forms of stress injuries can be combatted by physical training; in particular, growing the muscles involved. Whether this applies here, too, is unclear to me; however, it does seem at least somewhat plausible. The hitch is that the fingers themselves contain comparatively little muscle mass, and rely upon muscle groups in the hand and the lower arm. Another complication is that there are few sports and training methods that have a positive effect on finger strength, other than as a minor side-effect.

My own situation

While I am fully capable of working, and typically only feel (minor) pain after having had a few consecutive days of much typing, I am not entirely untroubled. In particular, I do have to do some amount of management, including paying attention to signs of “over-typing”—which can result in my postponing a new article for this website at a time when I feel an actual urge to write. As can be imagined, I would rather not have to make such compromises.

Further, this is likely only possible because I have made considerable adaptions to those environments that I can control and pay attention to input devices in those that I cannot. Had I gone ahead with the equipment and techniques I used in the old millennium, I would have a severe problem by now.

My advice: Start prevention from the go, not when the problems are already present.


Side-note:

Of course, this description of my situation should be seen in the light of my being a very intense user. A casual, surf-one-hour-a-day, write-three-emails-a-week user would not need to manage his hands. As a comparison, a preliminary version of this page contained roughly 11 thousand characters—and was written in the span of roughly two-and-a-half hours (of non-continuous work). The grand-total of keystrokes needed, including Vim commands, corrections of errors, etc., is likely to be higher by, possibly, one or two thousand keystrokes. This is more than many casual users write in several weeks.



Addendum:

The original version of this page was written in 2009. As of 2023, my situation is better than back then. Reasons for this include that I have switched to an almost entirely non-mouse setup, the better quality of keyboard available, and that I have abstained from computer games for a long time. However, a comparison is complicated by the fact that I am on a sabbatical, which (a) gives me more flexibility in e.g. choice of tools, (b) the keystrokes made on behalf of an employer are temporarily out of the equation.

In light of both the above text and my experiences before and after its writing, I would have prioritized the following advice to a younger me:

  1. Get away from those clunky old keyboards of the 1990s.

  2. Cut down on mouse use.

  3. Spend less time with computer games.

In addition, I have the suspicion that getting more sleep could be a good idea. Subjectively, it seems to me that I have stood a greater risk of finger (and other) pains during periods where I have slept less than normally. This is well compatible with the idea of sleep as a body-heal-thyself activity, but is, of course, speculation on my behalf.