Unlearning How to Type
What building and using an Ergodox keyboard taught me about my development style
Courtesy Chris Rittersdorf
A week ago I finished building an Ergodox keyboard. I began this project with the intention of easing RSI problems and having fun. But in adjusting to this new keyboard layout, I learned some valuable lessons about my personal development style instead.
Exposing Bad Habits
At a glance, the keyboard seems like a standard QWERTY keyboard split down the middle with several “pinky” keys (Return, Space, Backspace, Delete, etc.) re-located for a user’s thumbs (similar to a Kinesis Advantage). Additionally, the keys are laid out in an ortholinear pattern; straight columns, but with rows staggered for a user’s individual finger length.
In theory, this layout will provide a more comfortable experience for the long-term. In the short term, this layout has quickly taught me about my poor typing habits. The split prevents my right hand from crossing over to keys meant for the left hand. Additionally, the linear columns of keys exposed a few keys I’ve been typing with the wrong finger. I thought I mastered touch-typing in high school, but my new keyboard says otherwise. That appears to be the problem though. I’ve been using the same bad habits I picked up a decade and a half ago. Maybe I should pay a visit to Mavis Beacon soon.
Think With Your Brain, Not With Your Fingers
Readjusting to this new layout has impacted how the code I write looks. I’m very slow at typing on the Ergodx and the layout has thrown my muscle memory in the trash. Each keystroke I make is deliberate, and I’m careful not to make a mistake since the Delete has been relocated.
Muscle memory is both a bane and a boon to us as developers. At times it makes us efficient because it helps us code with less cognitive friction. At other times it slows us down because it makes us thoughtlessly repeat bad habits out of comfort.
I’ve long known how muscle memory impacts my code design even before I started using a different keyboard and that’s because of Vim. Vim is a text editor that’s withstood the test of time for me because my fingers know how to operate it better than my brain does. It’s like autopilot for code. When I would switch back to a text editor I was less familiar with, I started to notice something. My code was much cleaner, better designed and DRY.
Why was that? It would seem more intuitive that a comfortable editor yields better code. When I used Vim, my thought process was very fast. My mind was clear not thinking about keystrokes because of my muscle-memory autopilot. That meant I was more likely to pause and think about the design of my APIs, and I was also more likely to copy and paste code (since my fingers were so fast at it).
Let’s compare that to my thought process when using an unfamiliar text editor. That thought process is more chatty, in thinking about keystrokes, and how the editor works. I have to take my fingers off the home row to reach for arrow keys sometimes, and that feels uncomfortable. The overall process is slower and less comfortable. That slowness and discomfort made me want to write less code. And wanting to write less code made me pause, plan, and think about how to write more powerful code in fewer characters.
If you’ve been a developer for more than a few years and have settled into your ways of building software, try an experiment and see what happens when you shake those ways up. You don’t even have to invest the time and money into building a keyboard. You can simply just change your keyboard layout in your computer’s settings. It’ll be weird at first, but in the end you might discover something about your development habits you didn’t know before.