9 notes &
Ergonomics for programmers: the importance of a good font
Scotch tape fetish
Back when I was working for my Ph.D., there was this post-doc in our lab who had this funny habit. He had this big roll of scotch tape by his computer screen. Every morning, as he sat down for work, he tore off a good length of that tape to bind his left-hand ring and pinky fingers together.
“Is this some kind of fetish?”, I asked on a slow day. “No, it’s because of the pain.” He went on to explain that he used to mouse with his right hand, but then he developed severe carpal tunnel syndrome. When the pain became chronic, he switched to mousing with his left hand, but then the carpal tunnel started flaring up on this side as well. “That’s when I realized that I had this unconscious habit of stretching my pinky away just so when I held the mouse. Now, my right hand is busted for mousing, but I can still get by with the left by forcing my pinky in this relaxed position.”
Does your work involve repetitive gestures, such as mousing or typing at a keyboard all day? Well, then you have to care for your work ergonomics. This means a lot of things, but as a rule of thumb, you must be careful about avoiding any sort of excessive fatigue.
Eyestrain 10pt, bold
I am a lucky man not to have had to endure the torment of carpal tunnel, but I also have my pet peeve as a full-time software developer. Hard days get me headaches. Not migraines, thank god, but headaches sufficient to ask my kids not to be so noisy while I fix dinner. Dull, tired, sad headaches. I hold myself to some standard as a dad, so I need to have some control over these headaches.
I have remarked that the worst skullbores happen on days where I’m under pressure and I squint at the screen. I surprise myself peering confounded at the glass, shoulders tense, neck craned forward, back stooped, eyebrows furled. I put myself into this crow-like position unconsciously when I get nervous about some code or bug or negotiation or change of plan or what-have-you.
I figure headaches come from the physical fatigue of the crow stance, so this can be tackled as an ergonomics problem. How can I avoid squinting? The first thing that comes to mind is to reduce eyestrain any way I can. For reading text and documentation in my web browser, just increasing font size has worked wonders. I also ditched the old bright-characters-on-dark-background color scheme that I found so ‘leet when I was a college student. I now use lower-contrast black-on-lightgray color schemes, in which the characters do not become blurry as the day progresses. Figuring out colors for syntax highlighting that contrast sufficiently against gray backgrounds was a small hurdle.
However, it did not fully fix the dreadful headaches that come from difficult coding and debugging, activities I do in editors and terminals. These are the domain of monospace fonts, the readability of which does not seem to be directly enhanced by simple enlargement. Also, bigger monospace fonts yield work windows with less rows and columns, or that become so big that the editor and shell windows cannot fit side-by-side on the screen. In short, I needed a cleaner, more readable font that would get me to squint less.
The $220,000 font
I recently discovered the excellent font work of Fabrizio Schiavi (@fabrizioschiavi). He designed PragmataPro, a monospace font that is highly readable and comfortable even in small sizes. It is condensed in both width and height, but somehow still manages to breath on the screen. It is a real labor of love, as all the characters appear crisp and clear even for large font sizes.
The problem is that this font is sold at 170 euros. I know, “what’s a headache worth to you” and all of this, but I just do not have this kind of petty money on hand. However, Schiavi has a plan to make the font free, if he can somehow recoup the resources he spent designing it. The amount he is trying to raise gives pause, and his budget breakdown made me glad I live under Canada’s tax burden. Still, if he fails to reach his financing goal, Schiavi has pledged to offer the font to all contributors for a more affordable 20 euros.
This offer was quite palatable to me, and maybe it’s because my wife is a graphic designer too, but I contributed enough to be offered the ancestor font of PragmataPro, named Pragmata. This thing is my new sliced bread. Like PragmataPro, it is a horizontally condensed font design, but with a largish interline space. On my 1680x1050 screens, the font size that I find most comfortable still yields more than 40 lines of text, which, while less than Inconsolata’s yield, fits my need. I am surprised at how I like this interline space: it breathes and feels like the old electric typewriter I used when I was a kid.
Here’s a screenshot to show the font in action. On the left is a 25-lines iTerm2 window with a Gambit Scheme session. On the right is a 41-lines MacVim window with a bit of Markdown code. In both cases, I appreciate the equilibrium of the characters, more than twice as tall as they are wide. I also love the large space between the characters, which help them breath. It is this space that makes the medium-weight characters so crisp and easy to read. There is neither bloat nor blurriness to this font, even after reading page after page of terminal output.
Fond of your font?
We software developers have access to many free high-quality tools. There are also those tools that we paid for, sometimes dearly. I’ve seen people advocating passionately for the likes of TextMate, Mac OS X, optimizing C compilers, Matlab, Visual Studio… We see how one can get by without these tools we love, but we would not. I feel this way about the Pragmata font, and I expect as much from PragmataPro.
If editors, terminals and other monospace text hubs are crucial for software developers, then so are monospace fonts. Squinting is for moles. If we are to care, no, to obsess about window placement and color schemes, I think we should put as much care into choosing a readable and comfortable font. There are good free fonts out there. It is part of the ergonomics of software development, as much as a good typing position and mousing habits. Don’t wait until you have to tape your fingers together.