Friday, February 3, 2012

The Keyboard Cult (Delphi Code Monkey Edition)

Programmers use keyboards all day long, and so we tend to get exercised about our favorite, and least favorite keyboards. I have been on a bit of a "keyboard" jag lately, as I have been through a series of keyboard disappointments, and I'm confident that keyboards, if done better, might do more to help programmers than any other innovation in computing. This is big.

Jeff Atwood rather famously blogged some time ago about the Keyboard Cult in programming. His article mentions the various types of key technologies available (dome versus keyswitch), layouts (curved ergonomic, standard, and oddball ergonomic units), and various things. I'd like to talk about how important keyboards are to doing our job, as programmers, no matter what language we use. My history, as a Borland Barbarian and Turbo Pascal geek from the late 80s and early 90s factors in here, and so I'll call this the "Delphi code monkey" edition of the Keyboard Cult discussion. I am a programmer of a certain age, I've been writing code for more than 27 years, and I've been getting paid to write code for the last 24 of those.

I'd like to go back through the keyboards that mattered most to me, in the years I have been a software developer, and point out what made each one great, or not so great.

Pre-Computer Era: The IBM Selectric Typewriter



I learned to touch type in Grade 9, on an IBM Selectric II electric typewriter. My typing teacher taught us the classic typing techniques, that were taught to her, back when she started on a manual typewriter. Starting with home keys (F and J), we did simple "move away from home row and back" exercises. The first day started with "F-R-F" and "J-U-J" repetition exercises. This helped us acquire muscle-memory knowledge of the QWERTY layout, and after the basic layout is comitted to muscle memory, we would do drills to increase speed, all the while "not looking at the keyboard". If the keyboard had in fact been blank, with some color codes we probably would have learned more quickly,once the initial fear of looking away from the keys had been overcome. By the end of grade 9 I could touch type at 60 WPM. I am currently around 120 WPM, while writing code, and up to 150 WPM while composing English sentences in a word processor. I do not think at all about what I'm doing while I'm typing, any more than a pianist has to think about where the black key for C#/D-flat that is two octaves above middle-C is. I bet that if you put all the names of the notes on a piano it would only slow down a beginning pianist, and that the best approach would be to put dots where your home left and home right hand position are, and to let your brain learn by muscle memory and repetition where everything is.

The letter keys, and most of the punctuation keys on the computer keyboard in front of you right now are mostly the same as this IBM Selectric, that is, if you live in the USA or Canada. The only punctuation move that I can see is that the shifted 1 key is an Exclamation point on PC keyboards, but it's a plus-minus (±) sign on this IBM Selectric layout. There are no cursor keys. There is no escape key, and the only modifier key (Ctrl,Alt,Meta,Command) is the Shift key.

The first time I used a computer keyboard, I had to learn about even more additional keys that only appear on a computer. When I was in grade 8, a classmate brought in a "TRS-80" microcomputer. Everybody thought that the red key labelled "Break" was hilarious. "Look at me, I'm BREAKing your computer" the kids yelled at Steve, as they pressed the Break key. We didn't know what it did.


8-bit Microcomputer Era: The Commodore 64

I learned to code on a Commodore 64, in BASIC and Assembler, using a keyboard, without a mouse.



Basic programming was done using line oriented program entry without a text editor, IDE, or anything other than the 4K ROM BASIC that shipped hard-wired into the computer, and which came up automatically when you turned it on.

The version control system we used was called "save early, and save often, and don't re-use the same file-name twice", and in practice, it looked like this:
SAVE "PROG032",08 


I still long for a return to a simpler keyboard. If you do too, you might be interested in the spiritual successor of the Early Hacker Keyboards. One of the best is called the Happy Hacking Keyboard, and if you yearn for simpler days, this might be keyboard nirvana for you. There are also a whole raft of "tenkeyless" keyboards, including the venerable IBM Model M Compact.

If you are in fact still a Commodore 64 hacker at heart, then what you really want is the all new Commodore 64 X, from the reborn "Commodore USA". This isn't just a keyboard that looks like a Commodore 64, it's an actual modern PC capable of running Windows 7 or Linux, shoved inside the loaf-of-bread size plastic box.


88 and 101 Key PC Keyboards (1987-1994)

Like most people who had 8 bit computers, I bought my first PC clone in the late 1980s. I never owned an IBM-branded computer, I used a series of clones, and their clone keyboards, and I adjusted each time to slight differences in the keyboard layout. At some point after the introduction of the IBM PC AT, powered by an Intel 80286, the backslash key moved to the position above the enter key, and stayed there, and a lot of programmers like me got used to that position, because the backslash is the path separator in DOS, and the special-character-in-a-string-literal code in the C family of programming languages. I did not love, and did not hate any of these keyboards. When Windows 3.1 came out, I did not immediately add "using a mouse" to my programming techniques. I used DOS-based IDEs to write software, and became proficient in the use of hundreds of keyboard shortcuts. `Shift+F8` meant "Run until return" in Turbo Pascal, and is still the default shortcut for that feature in Delphi today.

Certain elements of this keyboard layout are no longer optional, but are essential to my ability to write code now. A standard IBM PC AT cursor key arrangement (the inverted-T format), the location and size of the insert/delete/home/end/pageup/pagedn keys above the cursor keys, the location of delete, backspace, Escape, enter, backslash, ctrl, alt, shift, and almost every other key, must not change, I will become quickly frustrated. My brain is no longer capable of adjusting to changes in keyboard layouts, just as my eyes have a harder time adjusting to different focal lengths.

Ergo Keyboards Era(1994-2012)

When the original Microsoft Natural Keyboard came out, I became a devoted owner and user of the keyboard. I owned several, and they lasted me almost ten years. In the end, Microsoft makes the best curved-top ergonomic keyboards out there, and my favorite keyboard, which is no longer available, is the original 1.0 version of the Microsoft Natural Keyboard. The current "Model 4000" has normal PC cursor keys. These are the most acceptable keyboards that I have found that accomplish several objectives for me:

1. Help me type quickly and accurately.
2. Help me work all day without getting uncomfortable, or getting RSI, or carpal tunnel syndrome.


The Ugly Truth

I wish there was something out there that was better, but for the life of me, I can't find it. I am unwilling to learn a completely new way of inputting data (such as DataHand) or radically altered ergonomic keyboards like Kinesis.

Mechanical keyboards help me with problem #1 above (speed,accuracy) because the click sound is a form of positive feedback. However, they do not help me with the RSI/soreness problems that conventional keyboards have. What I wish I could find is something that combines the mechanical feel of a good clicky Cherry MX keyswitch, with an ergonomic layout.

Think Different?


The other alternative I'm considering is using an Apple aluminum keyboard. The thing about them, is that the small tenkeyless (No numeric keypad) ones are almost as small as my much beloved Commodore 64, or the happy hacking keyboard, and the low-travel design of the low profile keyboard, might just be less stressful on my hands then even the ergonomic keyboards from Microsoft. Right now I'm typing on my macbook pro, and I notice that my hand position is nearly as relaxed and open as the position I can maintain on my computer at work, where I've got a Microsoft Natural Keyboard Pro that is about 10 years old.


What do you think?


I'd like to hear from you, what you like and what you expect from a keyboard you use all day to code.

1 comment:

  1. Maybe some says it's a strange perspective but when you think back what was called myth afterwards has been simply a limitation of the way humans interact with the device... Length of a procedure not longer than one screen or two on a terminal with 25 lines.

    Or F1... F20. Does come from IBM PF1 ... PF20, special keys for screens I think, but I am not totally sure about this.

    Pascal is one of the few languages that allows you to develop on almost every keyboard, you can grab in a convenient fashion. For other languages you still need US keyboards.

    Apple Aluminum Keyboard works well ... it leaves a different feeling. Let me describe the feeling - precision. I think it influences the way you work. While I still prefer good old cherry keyboards anyway ... because I don't work a lot in our office little also at customers sites and what you find there is standard.

    ReplyDelete