// you’re reading...

Other

Dvorak and Programming

dvorak keyboard

Last month when I was talking about cleaning my keyboard, I’ve mentioned Dvorak, a keyboard layout alternative to the common QWERTY. That has sparked some discussion, so I wanted to follow up on the topic.

So what is Dvorak, and why should anyone care?

The Dvorak Zine does a wonderful job explaining the history of keyboard layouts, in a comic format. A very Why’s (Poignant) Guide to Ruby style of approach. Mmm.. chunky bacon!

There are a few problems with QWERTY, the keyboard used by most people. Most famously, the keyboard was originally designed to slow down the typing speed (that was an issue for the mechanical typewriters, circa 1900). It also got a dose of corporate influence and marketing:

It has been suggested the top row was designed to have all the letters for the word “typewriter” so that typewriter salesmen could “peck” the word “typewriter” more quickly and easily without appearing to have to “hunt” for the keys.

For a more practical example, write “starwars” and notice if there’s anything particular about typing out that word ;)

Though Dvorak is not without problems as well. I found Brandon Thomson’s reflection on Dvorak after 7 years of use to be quite interesting:

The real problem was that you cannot always change the layout. I looked like a computer novice in front of colleagues on several occasions when I needed to use a public terminal but had to revert to hunt-and-peck because the keyboard layout was unchangeable. I don’t mind looking stupid, but it does get old explaining to people why you in fact cannot type on a standard keyboard.

I have a similar problem with having to use Windows OS on public terminals.

Dvorak’s main advantage is that it was designed to optimize its use for the English language. Dvorak’s main disadvantage, for me, is that it was designed to optimize its use for the English language. I think DVzine illustrates that point well on page 9:

dvorak semicolon

The thing is – Dvorak’s optimization in favour of English came at the expense of other languages. Namely the programming variety. I do use a semi-colon quite often. In fact, it ends every single line. A typical program uses considerably more semi-colons, than letters “Z”. Similarly, other vital characters “<>.[]{} have been moved further away, as a trade-off to bring some letter keys to more accessible spots.

The problem is highlighted by the emergence of Programmer Dvorak – a modified Dvorak layout, “targeted towards people writing source code for C, Java, Pascal, LISP, CSS and XML”.

The most noticeable difference is that the top row is devoted to brackets and other operational characters, and the numbers must be accessed using the shift key.

Though besides being a non-standard Dvorak flavour, and introducing a plethora of new problems – this simply seems like an ugly hack. Also, any optimization in favour of programming languages would now come at the expense of English.

I think I’m going to stick to using QWERTY for now. Any advantages gained for the English text will not be worth the disadvantages faced by the programming languages. I write code on regular enough basis for this to be a valid point. Perhaps in the future, if I find myself typing enough text to hit QWERTY’s limitations in more pronounced ways, I will try again to master both layouts.

Read more



Discussion

  1. Posted by cbright | October 15, 2007, 9:16 am

    QWERTY was designed to separate commonly used pairs of keys, but not necessarily slow down typing speed.

    http://www.independent.org/newsroom/article.asp?id=356

    What really annoys me are the Microsoft keyboards used in some of the MC labs. “Let’s put the Page Up key where the Page Down key is normally!” Thanks, Microsoft.

    Reply to comment

  2. Posted by Tony | October 15, 2007, 12:18 pm

    That article doesn’t really disproof the alleged “myth”, though it casts everything into doubt with conflicting study results. It’s point was this:

    if you have learned to type on a QWERTY keyboard, the cost of retraining for Dvorak (however modest) is not worth paying.

    I don’t go to those MC labs anymore ;)

    Reply to comment

  3. Posted by Paul Butler | October 15, 2007, 12:32 pm

    I find that with programming, the limiting factor is how fast I can think, not how fast I can type. Same with writing english, actually.If I were going to re-train my brain to be a faster programmer, it would be by doing contest problems that force me to think faster, not learning to type faster. Does Dvorak work well with vi?

    I use the Mac MC labs, and the keyboard shortcuts are what slow me down from time to time.

    Reply to comment

    Elena replied on: November 20th, 2009 at 5:46 pm

    Yes, Dvorak works quite well with Vi(m). Only adaptation: use “e” instead of “w” in combined commands “cw”, “dw”, ecc.

    Reply to comment

  4. Posted by Tony | October 15, 2007, 1:15 pm

    Paul – it’s same here. While Dvorak has the potential to easily speed-type at 100 WPM, I simply don’t find myself in the situations where such potential could be realized. I suppose it mattered in the machine-typing days when someone would retype entire documents. Now I spend a considerable time thinking about what I should type first.

    Dvorak doesn’t generally work well with the shortcuts. A QWERTY-Dvorak hybrid layout (Dvorak typing QWERTY shortcuts) seems to work quite well for GUI applications. I don’t know how well it would work with vi.

    Reply to comment

  5. Posted by Scott Fusco | October 15, 2007, 5:10 pm

    Interesting article, but I think the usefulness of the keyboard is severely diminished by the fact that most people have practiced on QWERTY’s for so long. I can type around 100 words per minute and wouldn’t want to have to re-acquaint myself with such a basic and necessary skill as learning to type.

    Reply to comment

  6. Posted by engtech | October 17, 2007, 2:08 am

    It’s not worth switching because of the number of times in life you’ll be on Someone Else’s Keyboard.

    Reply to comment

  7. Posted by Tony | October 17, 2007, 1:49 pm

    I guess similarly I should not bother to learn Japanese, because of the number of times in life that I’ll be speaking to someone else in English ;)

    QWERTY will not be instantly forgotten – people who have learned Dvorak say that they can switch between the two quite easily. I suppose the WPM speed could go down with the discontinued practise, but normally one doesn’t type up essays on “someone else’s keyboard”. Unless it’s for school, like in Brandon’s example.

    Reply to comment

  8. Posted by bashar | October 18, 2007, 7:48 pm

    Even though it was something useful to try, I believe you made the right choice sticking to the same layout. It’s difficult to master two layouts, and by your self you can’t avoid using the normal layout.

    Another problem with it is for multi-language users. Buttons come with two langs printed on them.

    Reply to comment

  9. Posted by What is QWERTY? | October 19, 2007, 1:24 pm

    This is the exact reason that I abandoned Dvorak. In addition to programming, my keyboard shortcuts would get all messed up. I never could learn the keyboard shortcuts in Dvorak, as it’s not keys that I’m pressing but rather muscle memory.

    Reply to comment

  10. Posted by Michael | October 21, 2007, 9:34 pm

    The post was interesting. I tried a DSK layout in late 80’s and after a few hours I was pretty good on it. Unfortunately, the problem was switching to other keyboards. Over all my typing speed dropped across the board.

    I had the same problem when my wife got hooked on the MS ergonomic keyboard that was split. Even though the keys were still laid out in a qwerty format, I had a terrible time switching between systems.

    Hopefully touch technology coming out of MS Surface, IPhone and others will propel touch capabilities in the next decade or two so keyboards will be able to be reconfigured with a button.

    Reply to comment

  11. Posted by Roland Kaufmann | December 1, 2007, 6:12 pm

    The real reason for using a Dvorak layout is not primarily speed, but comfort. I used to have aching fingers after spending some time by the keyboard; now I can easily write the entire day and still not feel a thing. However, my experience is also that I can write faster than before, too.

    Learning Dvorak is like learning another language; you do not necessarily loose your ability to speak the first by taking on a second. No other keyboards in my physical presence other than my own have the Dvorak layout, but I am still able to write on those.

    I probably spend more time writing prose than writing programs, but I still use by this day the Programmer Dvorak layout simply because I find that it is also just as well suited for the former. All the alphabetical keys remains the same as originally designed by Dvorak, and that is intentional. There are also other layouts that move around alphabetic characters to make room for symbol characters; however, I haven’t seen any hard data justifying this trade-off, and I remain sceptical since most people still write more English than programs (if not other than in comments :-) )

    By the way, my native language is Norwegian, not English, which is suboptimal for the Dvorak keyboard, but in my personal opinion I still find it better than Qwerty. (As a side note: The character usage profile of the Norwegian language actually seems to make Qwerty better suited for it than for English).

    Writing program code on a non-English keyboard can actually be quite a nuisance; for instance is left brace located on Ctrl-Alt-7 on the native Norwegian keyboard. If that doesn’t hinder the flow of thinking, I don’t know. With the Programmer Dvorak keyboard layout, I am able to write program text continuously, like normal text.

    The reasons the numerical keys are put on a shift position are (1) there is a numerical keypad that is probably easier to use if you are used to type numbers on calculators and phones, (2) if you are typing a number in text using digits instead of words, then it mostly have more than one digit (i.e. we use words like “one”, “two”, but 502) and the overhead of pressing CAPS LOCK is not that great (in contrast, symbol characters are usually appear alone), and (3) programmers shouldn’t write magic constants in code :-)

    Keyboard shortcuts is an issue, but it depends on how you memorize it. Anyway, you should strive to use the right Control-key when pressing X, C or V on Qwerty, but it seems that most people do the opposite.

    Reply to comment

  12. Posted by Tony | December 3, 2007, 3:33 am

    Hey Roland,
    that’s quite a write up! Thank you for sharing your experience and opinion on Dvorak.

    I do write more code than English… while at work ;)

    I am curious though — what’s the benefit of using the right Control-key, in context of shortcuts? Copy/Cut/Paste is usually used for when I’m moving things around, and so my right hand is on the mouse, not the keyboard.

    Reply to comment

  13. Posted by Roland Kaufmann | December 4, 2007, 3:36 pm

    As Roedy Green jokingly put it; users of the Dvorak keyboard layout tend to post longer messages since it is easier for them to type it all :-)

    Even if you write more code than prose, I would still look into the Dvorak layout. There are still comments to be written, and the keywords are usually in English.

    There is nothing in the Dvorak layout per se that prevents it from having the same assignment of the symbol characters as Qwerty. (Apart from quote and semi-colon) The original layout from Dvorak himself had quite a different placement than is used today. (Actually, the Programmer variant starts off as a modification of the original layout, not the standard).

    The ANSI committee has of course been focusing on business/office use-cases when placing the symbol keys. Tokens in programming languages have often been chosen on the criteria of which keys are easiest to hit when on a U.S. keyboard, rather than the other way around. For some reason unknown to me, a different placement has been chosen for the symbol keys on the Dvorak layout, but I reckon that programming languages has not been taken into consideration here either.

    I would however say that it is debatable whether the placement of the braces on Qwerty vs. standard Dvorak is better or worse. Both stretches the right pinky about the same amount. I guess it feels worse on the Dvorak because it is almost where they used to be on the Qwerty.

    The reason for using the right Control key is simply to avoid stretching the fingers; it is a general rule — you should use the opposite modifier key (Shift, Control, Alt) than of the key that you intend to press. Most users do the opposite, though. Which is why I think that it may not be such a bad thing that the keyboard shortcuts have been moved. At least it provides better grounds to shake off that bad habit.

    More generally, you should try to avoid using the mouse at all! Most if not all IDEs have keyboard shortcuts for most of its operations. Moving the hand back and forth to the mouse take much more time then pressing keys. You could also consider a keyboard with an integrated touchpad such as this one: (I am not affiliated with this company, simply just a happy customer)

    Reply to comment

  14. Posted by Roland Kaufmann | December 4, 2007, 3:38 pm

    Seems like the link did not make it to the last comment; I try again:

    http://www.keyboardco.com/keyboard_details.asp?PRODUCT=503

    Reply to comment

  15. Posted by alsachti | December 23, 2007, 4:41 am

    I work on a french AZERTY keyboard. I’m not a very fast typist, but I think a different layout would be indeed more comfortable and easier to learn.

    AZERTY (and probably QWERTY, and “normal” DVORAK) is unfit for programming. If I want to type a character like “]” or “}”, I need to press “Alt Gr” and a key of the top row (with the same hand !!!).

    However, on a “programmer dvorak”, “” are still difficult to access.

    And the fact is, I’m writing in several languages : english, programming languages… and french.

    Reply to comment

  16. Posted by Roland Kaufmann | December 26, 2007, 3:57 pm

    My understanding is that AZERTY is simply QWERTY with some modifications to make it more suitable for typing French, by switching some characters with a typically high usage in French but low in English with those vice versa. Kind of like the approach that Dvorak took, but to a much smaller degree. However, I have not seen the underlaying statistics.

    Since you name the key “Alt Gr”, I guess that you have a PC, perhaps running Windows. You could try using Left Ctrl Left Alt as an alternative to Alt Gr, to avoid using the same hand for the modifier key and the symbol key.

    I admit that the quote characters are at a somewhat disadvantageous position, but it is always a trade-off: If not the quote key, then some other character would have to occupy that position. And how often do you really type the quote character? In prose, and in code? (And have you *really* counted? :-) )

    Reply to comment

  17. Posted by Videre | January 21, 2008, 5:56 am

    I think it’s worth mentioning, mr. Kaufman, that you’re the developer of “programmer dvorak”. I have no experience with dvorak in any form, so I’m in no position to comment on any of them, but that said, I think that you should leave the reviews to those more unbiased.

    Reply to comment

  18. Posted by Roland Kaufmann | January 21, 2008, 2:48 pm

    I didn’t see the original post as much as a review but more as an introduction to a debate of the challenges of combining touch-typing with programming.

    I apologize if I led anyone to believe that my comments were meant to be an independent opinion; that was not my intention. To my defense I have to note that the link on my name goes to the homepage of the keyboard layout, and it has my name in it. However, I should have stated it explicitly from the start instead of assuming it would be known. I am most certainly biased!

    Rather, my comments were meant to elaborate on the thoughts behind some of the trade-offs that have gone into the design. As the original review found them strange, and a lot of people initially do, I wanted to shed some light on their rationale and the alternatives.

    In a way, the entire layout is a review of the Dvorak keyboard layout in conjunction with programming, because I created it out of the desire to do just that and the frustration of having no good alternatives available. For years I was the only user, and I would still use it even if no one else did. I do not make any money out of it.

    My reasons for commenting on it is that I believe that anyone that consider converting to Dvorak (and I think there are mostly converts; I haven’t yet met any of those trained to Dvorak as their first layout), should hear from those who have gone down that path before them, because of the high cost of doing a thorough evaluation.

    But then again, I am biased. :-)

    Not that I mind hearing some criticism from people that have taken a look at (Programmer) Dvorak and turned it down. In fact, I try to ask everyone I know that use it if they feel that anything could be improved, to see if I have missed out (or perhaps overstated the importance of) something.

    In particular, I would like to hear the reasons for why “any optimization in favour of programming languages would now come at the expense of English”, from those who have that experience.

    I think my time is up… :-)

    Reply to comment

  19. Posted by Tony | January 21, 2008, 11:52 pm

    Well since I’m being quoted in that last statement, I feel like I should elaborate.

    A keyboard has a lot of letters and numbers and symbols that need to be arranged, but not every key on a keyboard is equally accessible — this is where alternative layouts come in. Placing commonly used keys in easily accessible locations make the overall layout easier to use, but now one must decide which keys are more “common”. Semicolon, a prime example, is rarely used in English text, so an English optimized layout would place this key further away. On the flip side, it is much more common in certain programming languages, so this set would benefit from having it closer in. This creates a conflict between two sets, so an optimization towards one must come at an expense of the other.

    So different keyboard layouts settle at various points of this balancing act.

    Reply to comment

  20. Posted by Roland Kaufmann | January 26, 2008, 3:02 pm

    I’ll stick my head out with yet another comment:

    You are indeed right that some keys — most notably the semicolon, but also keys like ‘f’ — has quite a different usage profile in English than in programming languages, and that a keyboard optimized solely for a programming language would look quite different.

    But the converse is also true, and I don’t think you would be very productive on a keyboard optimized solely towards for instance C or Java, unless programming is the *only* thing that you do, and there is no documentation, notes, correspondence and blog entries(!).

    Consequently, I think you should consider the layouts in sum. Yes, the semicolon is placed at a more awkward place. But perhaps there are other improvements that make more than up for it?

    My approach has been to start out with English (using the existing Dvorak) giving it first priority and then adjust all the other symbols to better match programming (by the same principles) second.

    But there is, as you mentioned, other layouts that does otherwise. I believe that the Colemak layout[1] retains most of the symbols as they were (if you like that), and that the Arensito layout[2] claims to have taken programming more into consideration. I will leave it to others to comment on those.

    [1] http://colemak.com
    [2] http://www.pvv.org/~hakonhal/keyboard/

    Reply to comment

  21. Posted by Skylan Hill | February 1, 2008, 2:18 pm

    Not to toot my own horn too much, but the ability to type on both Dvorak and QWERTY isn’t that hard to master.

    Fact is I use QWERTY at work, and have a Kinesis Contour at home that I regularly switch between Dvorak and QWERTY (for games). I don’t have the same speed that I used to have when I was a QWERTY or Dvorak only; but it’s only a matter of flipping the mental switch. I’ve been doing this since mid-98.

    I would suggest if you were going to go this route to stick with one for a period of time, then after the new layout becomes ingrained, allow yourself to switch between the two. I found that having a keyboard with a very different physical feel (the Contour) made it easy to flip the QWERTY/Dvorak switch. Nowadays, I just have to think “….Qwerty.” or “….Dvorak.”

    I ran a test as I was typing this to see how hard it is to flip the switch–not very–interestingly, there’s an element of feedback, where-in I see that I’m typing in the wrong mode and quickly, unconciously flip to the proper mode.

    Specifically in regards to how either layout stacks up for programming: they both suck, just in different regards–IMO.

    Reply to comment

  22. Posted by Jake | March 18, 2008, 9:40 pm

    This is only a far off dream I know (or prove me wrong and I will be quite happy), but what I would like to see is a keyboard with the ability to automatically change what the keys represent. Perhaps a small LCD screen could be on each key (it is essential for me to have a real keyboard to type, as even this laptop keyboard I am on now is quite limited compared to a full clicky keyboard) and with the press of a button, it could be recreated. Then the OS would also take note of the layout change. Then again, this wouldn’t be as essential because I can use a tray icon in KDE.

    As Roland pointed out above, a programmer isn’t always going to be programming, unless they are Richard Stallman. ;) Thus, this would allow someone to have one layout for optimization in programming, and another for optimization in typing. The same principle would be even more useful when switching between languages. Then we could see layouts that no longer have to give English options. Greek layouts, for example, could be focused only on Greek characters. They would no longer have the need to be able to type in Latin characters too.

    Oh well. Even if the technology were to exist by some odd stroke of luck, there’s no way that it will be widespread in the foreseeable future.

    Reply to comment

  23. Posted by Tony | March 18, 2008, 9:56 pm

    @Jake — you are thinking of the Optimus Maximus keyboard that came out a while ago

    Optimus Maximus keyboard

    It’s a nice toy, could probably make for a very interesting layout learning tool, with some specialized software. Though ultimately you’d be touch-typing anyway. Any blank keyboard should do.

    Reply to comment

  24. Posted by Jake | March 19, 2008, 4:11 pm

    @Tony:

    Thank you for the link! I do not remember seeing that before, but it was mentioned on a blog post (with several other keyboards, so there is a possibility that I missed it) that was in my browsing history. Google Desktop is interesting to have around, speaking of which.

    Anyway, the keyboard does seem to have many attributes that I would like. However, I cannot see paying over one hundred dollars for a keyboard first of all. Secondly, I do not see Linux support. If there is no Linux support, then it’s pointless for me to try. Most important though is how it types. A review on Engadget I came across said that the typing experience on it was less than pleasurable. I guess I will stick with my old Packard Bell PS/2 keyboard. It types great, it’s durable, and it works across the board assuming I have my PS/2 to USB adapter with me.

    Reply to comment

  25. Posted by Claire | September 29, 2008, 12:22 am

    I recently got into the whole idea of Dvorak (recently as in early today) and I found a Microsoft program, the Microsoft Keyboard Layout Creator, that lets you create your own keyboard… I thought it might be helpful for people trying to personalize their setup.

    http://www.microsoft.com/globaldev/tools/msklc.mspx

    Reply to comment

Post a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>