Is Dvorak typing appropriate for programming?

46,503

Solution 1

There are Dvorak layouts specifically for programming: http://www.kaufmann.no/roland/dvorak/

Solution 2

A couple years back when I was starting to feel some pain in my wrists, I decided to learn how to type on a Dvorak layout. (Side note: I found it extremely simple to learn the layout using a qwerty keyboard while looking at an image of a Dvorak keyboard at the bottom of my screen)

The only programming difference primarily was that the square brackets and curly braces swapped positions with the minus and plus buttons above them. Depending on what language you're using and how heavily you're using those keys, that can be annoying; but then again, maybe your IDE will automatically insert those where appropriate. Or, you could use a program like AutoHotkey to map another key combination to those symbols.

Here's the thing with typing in Dvorak: (IMHO) you need to go all Dvorak or all qwerty, particularly if you heavily rely on keyboard shortcuts throughout all of your computing sessions.

My situation is that I use Vim very frequently both at work and at home. At my last job, computers were shared between multiple idiots people, and I could not reasonably expect other users to know how to switch out of Dvorak. I had to "re-learn" the muscle memory for Vim commands.

It's extremely easy for me to switch back and forth on the fly between qwerty and Dvorak for simple text, but (and maybe it's just me) all my known keyboard shortcuts are muscle memory. So a :w in Vim on qwerty ends up as a S,, and a I# to comment a line ends up as C#, instead of replacing the whole line with just a pound symbol. And you can just forget about hjkl to navigate in Vim - instead of pressing keys on the home row, now you have to press the equivalent of jcvp. Oh, you want to copy-cut-paste with one hand? xcv has now moved to bi. instead, so have fun reaching all over the keyboard. New tab in Firefox? You were just typing in Dvorak, so you hit ctrl-t, but the keyboard is actually in qwerty mode, so you just ctrl-k to jump to the web search bar.

One of the other low points of Dvorak is the awkward 30-60 second explanation if a coworker needs to use your computer for a moment.

So I'm very sad to say that after about 4 years of typing primarily in Dvorak, I have to type in qwerty now because it is simply unnecessarily difficult to switch back and forth between modes and retain my muscle memory of my keyboard shortcuts.

On the other hand, there is some Vim work-around support for Dvorak, so maybe today would be a good day for me to get back on the Dvorak wagon. And I suppose if somebody were feeling particularly ambitious, he could set up an AHK script to remap normal/shifted keys from qwerty to Dvorak, but just pass through the qwerty keys when ctrl/alt were held. Seems like it would be a lot of work for very little payoff, though.

To recap:

  • Dvorak is great for RSI
  • Switching between qwerty and Dvorak is easy for typing, horrible for keyboard shortcuts and other muscle memory
  • Dvorak can be a large hassle to use at work, depending on your work environment

I sincerely hope this gives you some more direction on the decision of whether to go Dvorak.

Solution 3

Believe it or not the amount of special characters (such as [], {}, etc) in source code is negligible compared to normal english text.

I wrote a small program that counted the occurrences of every character in the source code of a fairly big project I'm working on (50k lines), these are the results. The language is C++.

    E = 104050
    T = 86887
    I = 62788
    A = 61746
    R = 60438
    S = 58897
    N = 56595
    O = 51640
    L = 45490
    C = 39251
    D = 33776
    U = 30971
    " = 27858
    M = 25925
    , = 25296
    P = 23742
    ( = 21407
    ) = 21391
    F = 21232
    G = 20860
    / = 19745
    H = 19717
    ; = 19226
    _ = 16207
    B = 13576
    = = 12427
    Y = 10498
    0 = 10125
    . = 9842
    K = 9241
    : = 8907
    W = 8509
    V = 7922
    { = 7648
    } = 7639
     = 6626
    % = 6507
    Q = 5896
    1 = 5752
    - = 5382
    X = 5261
    ' = 3877
    \ = 3421
    2 = 3395
    + = 3172
    & = 2702
    [ = 2597
    ] = 2586
    3 = 2174
    Z = 2141
    4 = 1657
    J = 1599
    ! = 1595
    5 = 1560
    # = 1501
    6 = 1367
    | = 1029
    8 = 967
    9 = 953
    7 = 939
    ? = 610
    ` = 367
    ~ = 59
    $ = 47
    @ = 7
    ^ = 6

Solution 4

Didn't see this mentioned, so I thought I'd add this: I'm using the Dvorak layout on a QWERTY keyboard, with QWERTY command key layout. Means every time I press the command button (I'm on a Mac), the QWERTY layout applies. So I'm typing completely "blindfolded" with the Dvorak layout, but I didn't have to re-learn the keyboard shortcuts. Has worked great so far for the last 4 years and I wouldn't change back to QWERTY.

The only downside of this is when using VIM, but nowadays I mostly use vim only for simple things, e.g. modifying config files over SSH.

Solution 5

You may want to consider the colemak layout. from the faq:

Programming languages make heavy use of punctuation symbols. Colemak keeps almost all of the punctuation keys in their QWERTY positions to ease the transition from QWERTY. It depends on what programming languages you use, variable naming conventions (CamelCase vs. underscores) and what editor you use. In the end it's a matter of personal preference. You'd might want to remap the AltGr sequences to punctuation symbols you use often.

Share:
46,503

Related videos on Youtube

samoz
Author by

samoz

I am a cryptographer, working in the West Lafayete, IN area. My interests include reverse engineering, information security, ellipic curves, trusted computing environments, operating systems, and embedded systems. Most of my reversing is on Windows, but I like to practice my make-fu and Unix-fu on Arch Linux.

Updated on July 08, 2022

Comments

  • samoz
    samoz almost 2 years

    I'm always looking for ways to be more productive, and I've been reading a lot about typing using a Dvorak keyboard.

    It looks like this would be much more productive for writing normal prose, but what about for programming?

    I'm skeptical that it would be effective, since the use of semicolons, colons, brackets, and ampersands are much more common in programming than they are in every day typing.

    Has anyone had any experience with this?

    • KevinDTimm
      KevinDTimm almost 15 years
      typing is still typing. anything that makes you faster is a godsend. however, unfamiliarity with dvorak makes any specialized answer to your question by me uneducated.
    • Tim Reddy
      Tim Reddy almost 15 years
      I like to pair program...I hope that the OS has a hotkey that'll toggle between QWERTY and Dvorak.
    • Evan
      Evan almost 15 years
      The time spent learning Dvorak to an efficient level would probably be better spent on productivity...Corollary: The time spent on SO...
    • bohdan_trotsenko
      bohdan_trotsenko almost 14 years
      There is a good autohotkey script for switching into dvorak layout but keeping old hotkeys: autohotkey.com/forum/topic27474.html (Windows)
    • AnnanFay
      AnnanFay over 12 years
      Closed as not a constructive question? But ergonomics is very important! Where are we supposed to ask these types of questions?
    • sehe
      sehe over 12 years
      @samoz: it surprises me that someone would not deem his private time (i.e. at home) productive. I'm usually as productive at home as at work, mostly just doing other stuff (but many times involving keyboards, be it with or without ivory keys)
    • Mike de Klerk
      Mike de Klerk over 7 years
      Currently I am quite satisfied with the CPM I reach with QWERTY. The only reason for me that I am considering Dvorak is to reduce strain (RSI) and have more comfort. But before switching from QWERTY to Dvorak, I strongly advise an ergonomic keyboard, if you haven't got one already.
    • phuclv
      phuclv almost 7 years
      @TimReddy you can switch between layouts easity. On Windows you can switch between layouts with Ctrl+Shift by default, and languages with Alt+Shift
  • Adriano Varoli Piazza
    Adriano Varoli Piazza almost 15 years
    The worst case scenario you point out is a bit simplistic. It took me a couple of weeks to learn Dvorak, and during it, I was less productive. It paid off, and I wasn't working at the time, but not many people can just shrug off 2 weeks of lost productivity at their job.
  • Adriano Varoli Piazza
    Adriano Varoli Piazza almost 15 years
    If you use the normal ANSI layout, there's a Dvorak layout integrated with XP, Vista and most normal Linux distros (actually, these come with localized variants, and XP does not). So it's just a matter of enabling the language bar applet.
  • Adriano Varoli Piazza
    Adriano Varoli Piazza almost 15 years
    Because QWERTY is so much better for left-handed people? Dvorak, AFAIK, is also designed to spread the workload evenly on both hands, so being right- or left-handed should not matter.
  • Andrew Bainbridge
    Andrew Bainbridge almost 15 years
    Programmers use lots of keyboard shortcuts. Many keyboard shortcuts are easier on Qwerty than Dvorak. For example, cut, copy and paste - ctrl+x, ctrl+c, ctrl+v.
  • Andrew Bainbridge
    Andrew Bainbridge almost 15 years
    Just remembered why I found this is such a problem. Often, I tend to have my right hand on the cursor keys and the left hand doing the keyboard shortcuts. Lots of programs seem to be designed for this, with a strong bias towards shortcuts for left hand only. On Dvorak the shortcuts get all mixed up and many of them end up requiring two hands. Since users are all different though, maybe you won't find this to be a problem.
  • AlbertoPL
    AlbertoPL almost 15 years
    This is kind of cool. I like it.
  • Daniel May
    Daniel May almost 15 years
    I don't see how this can directly effect productivity - For me, at least, switching to a new keyboard layout is not going to have a massively detrimental effect on my logical thinking of how I'm going to get around the next bug set. Perhaps for people in report style-job where you are constantly typing without too much of a break - I can understand your point. I take what you said on board though, perhaps I was being simplistic in my conclusion.
  • Nick Dandoulakis
    Nick Dandoulakis almost 15 years
    many shortcuts have alternatives. Perhaps I'm old-school guy because I use ctrl+Ins, shift+Ins instead of ctrl+c, ctrl+v :-)
  • Daniel A. White
    Daniel A. White almost 15 years
    It looks like it has more dominate stuff on the right hand.
  • Adriano Varoli Piazza
    Adriano Varoli Piazza almost 15 years
    Yh, vwls rn't frqntl sd. Seriously, Dvorak did quite a bit of studying to create the layout, he didn't say 'it looks like this is more efficient'.
  • Ralph Sinsuat
    Ralph Sinsuat almost 15 years
    +1. Never heard of Colemak, but they hit a few sweet spots about Dvorak in that FAQ, especially with the pinky-reaching. And a Vim remapping?! And Linux support?!! I'm definitely trying this out. On the "social" side of keyboard layouts, Colemak can't be worse than Dvorak in any way, and if it's better on the physical strain side... We might have a winner here.
  • Andreas Bonini
    Andreas Bonini over 14 years
    Dvorak already has the huge con that the rest of the world uses qwerty, now if we start using modifications of dvorak too.. It's even worse! :)
  • Evgeny
    Evgeny over 13 years
    definitely write down and test passwords before switching if you are relying on the muscle memory to type them.
  • Bobby Cannon
    Bobby Cannon about 13 years
    I use dvorak and have been for years. Would not go back to Qwerty for nothing. It's painful to use Qwerty on other peoples VMs. Yuk!
  • Bobby Cannon
    Bobby Cannon about 13 years
    I've always been the only one that uses Dvorak among all my other peer developers. It's not a problem. They don't type on my computer and I don't type on theirs. I just feel sorry for them having to suffer through QWERTY. Once you learn dvorak you see how awful qwerty really is. It's just hard to notice until you've learned dvorak.
  • Dmitri Nesteruk
    Dmitri Nesteruk almost 13 years
    I think the thing to point out is that for English, Dvorak is a significant win over Qwerty, whereas Colemak is a marginal win over Dvorak.
  • sehe
    sehe over 12 years
    @AndreasBonini: by the same token, you could say that, since users of the dvorak keyboard layout have proven themselves to be flexible enough to adopt another layout, they can probably just as easily manage adapting to a personally tuned one - and to great effect? (just playing devil's advocate here)
  • sehe
    sehe over 12 years
    Thanks for a very helpful post. I could relate to what you were saying, even though I have never tried dvorak yet, and the amount of detail shows that you've really given this thought. On the other hand, without dvorak, I already have these awkward 30-60 second explanation moments while I switch Visual Studio out of ViEmu mode... :)
  • ANeves
    ANeves over 12 years
    @AndreasBonini , but QWERTY keyboards already have different punctuation keys in different countries. They are in different locations, they are different (US keyboard has no ´¨ç etc), and sometimes they even work differently! (In US keyboard there are no dead keys AFAIK, so one gets ~n instead of ñ, ^o instead of ô...)
  • Ryan Rho
    Ryan Rho over 12 years
    When it comes to shortcuts, Mac supports Dvorak with QWERTY shortcuts. So I use QUERTY shortcuts in Dvorak. The only advantage for QWERTY is that c and v are in better locations :)
  • JBentley
    JBentley about 11 years
    +1, very useful answer.
  • Chase Florell
    Chase Florell about 11 years
    so does that mean that colemak is marginally significant over qwerty?
  • Denys Kniazhev-Support Ukraine
    Denys Kniazhev-Support Ukraine almost 11 years
    I've been using Programmer Dvorak for 2 years, and I'm really happy with it. Changing muscle memory for shortcuts is hard, but not that hard. I have even created a typing tutorial for Programmer Dvorak: programmer-dvorak.appspot.com
  • Gordon Gustafson
    Gordon Gustafson over 10 years
    This will let you use dvorak in insert mode and qwerty in normal mode so you don't have to relearn anything. However, it doesn't work for ex commands or searches.
  • Gordon Gustafson
    Gordon Gustafson over 10 years
    I switched to Emacs with Evil and now have a flawless Vim + Dvorak experience. How to do that is off-topic here, but you can email me or ask a separate question if you're curious.
  • Nikola Geneshki
    Nikola Geneshki over 10 years
    strange numbers for all the braces and brackets... Nevertheless those are as hard to reach on both on qwerty and dvorak. Hardest thing for me on the dvorak is typing 'qwerty'.
  • Leo Jweda
    Leo Jweda about 10 years
    ( = 21407 ) = 21391 { = 7648 } = 7639 [ = 2597 ] = 2586 Why don't those match?
  • Leo Jweda
    Leo Jweda about 10 years
    @DmitriNesteruk If Dvorak >> QWERTY and Colemak > Dvorak then Colemak >> QWERTY, right?
  • nawfal
    nawfal almost 10 years
    @LeoJweda comments can distort it.
  • nawfal
    nawfal almost 10 years
    @DmitriNesteruk since Dvorak >> QWERTY, former's benefits are not disputed. But since Colemak > Dvorak the former's superiority is not unanimously accepted. Though Colemak has distinct technology advantage, I have some reservations.
  • Leo Jweda
    Leo Jweda almost 10 years
    @nawfal Unless he's using smilies in his comments they should still match.
  • nawfal
    nawfal almost 10 years
    @LeoJweda haha! I mean it's not necessarily required to match in comments. I'm sure every code will poorly formatted comments.
  • Sameer Alibhai
    Sameer Alibhai almost 9 years
    Is there any proof that this is actually more efficient when tested on lines of code (ie C,C#, javascript, perl, etc..)
  • pydsigner
    pydsigner almost 9 years
    @LeoJweda I strongly suspect things like commented-out function declarations.
  • Andreas Bonini
    Andreas Bonini almost 9 years
    @LeoJweda: 99.92% are matched.. If the code base is large enough, it's normal that for one reason or another a small minority don't. Hopefully it's not because of smiles, since :( would be much more common than :) in that case :P
  • Abdillah
    Abdillah almost 9 years
    I feel Colemak more suitable for usual typing, not programming. As the symbols lies heavily on right side (under your pinky territory!)
  • lks128
    lks128 over 8 years
    I've been using it for quite a while for now, maybe a year or so and ([{}]) are very comfortable, but I still can't get used to the numbers if I don't have stickers on the keyboard. Another con is that you have to install this modified layout on any system you use.
  • Lunyx
    Lunyx over 8 years
    I'm late to this, but this is assuming that you type out every single character. In practice, I'm often autocompleting and instead of typing out, for example, FooBar.SomeProperty, it would just be fb.sp, which greatly skews the ratio of keystrokes for alphabetical to non-alphabetical.
  • Andrew Smart
    Andrew Smart over 8 years
    The kaufmann.co layout is programmer dvorak from linux, with the author's own modifications I cannot stand. You can make your own layout matching linux's using a windows utility.
  • Andrew Smart
    Andrew Smart over 8 years
    +1 it can be a large hassle to use at work. Especially at shared workstations, or trying to demostrate something on a peer's computer. Windows has terrible support for it: -Every window can have its own keyboard layout setting! A nightmare when ever allowing more than one layout on the system settings.
  • Andrew Smart
    Andrew Smart over 8 years
    -The Windows login screen layout can be a nightmare for typing passwords. With lengthy difficult passwords, you have no idea what the layout is currently (no visual feedback), no way to easily determine the layout, and at my last work the system locked you out for an hour if you mistype the password a few times. Huge issue! Countless times off hours I'd get locked out.
  • Andrew Smart
    Andrew Smart over 8 years
    -Windows does not include programmer dvorak like linux does; the programmer dvorak layout readily available by kaufmann.co has his own weird tweaks that I cannot stand (all numbers and symbols are moved around). So I had to make my own to match linux's and even then there are annoying unfixable little differences between the layouts such as caps lock.
  • GabrielF
    GabrielF over 8 years
    @AndrewSmart it seems to me to be the other way around: programmer dvorak from linux is a modification of kaufmann's layout (or maybe just an older version?). But I also can't stand the numpad inversion: because it's "common on phones" simply isn't good enough reason for me. Luckily, debian's layout doesn't have this modification.
  • GabrielF
    GabrielF over 8 years
    @SameerAlibhai The research doesn't seem to have been shared, but there was one: It was generated through reflection of the most common constructs in these languages and the rules set forward by the August Dvorak in his research, then verified by scanning through thousands of source code lines ensuring that a good fit was found. (from kaufmann.no/roland/dvorak)
  • GabrielF
    GabrielF over 8 years
    Less than 6 * in big C++ code? No multiplications or dereference operators? Sounds weird.
  • Andreas Bonini
    Andreas Bonini over 8 years
    @GabrielF: I removed it from the list because it was too high as I use a lot /********/ as a separator. See stackoverflow.com/posts/1507668/revisions
  • RolKau
    RolKau over 7 years
    @AndrewSmart They are the same; I made them both. The Xkb (Linux) version is modular, though, you can choose whether you want the numpad or not. The keyboard layout architectures on Windows and macOS don't allow that.
  • Andrew Smart
    Andrew Smart over 7 years
    @RolKau They are not the same in my user experience. It must be a bug in the MS Windows executable published on your website then. On Windows 7 when using that programmer dvorak layout the q key was mapped to " (double quote), and the z key to ; (semicolon). There were many more differences, I had to make my own which matched the one on Linux. I love the one on Linux, tyvm if you indeed made it!
  • Ernest
    Ernest over 6 years
    Measuring key strokes may be more accurate as modern IDEs generally offer intellisense / autocomplete
  • Rahul Gupta
    Rahul Gupta about 6 years
    Thank you for sharing this.. It feels like it's a nightmare for vim users.. I'll stick with querty i guess..
  • Albert221
    Albert221 almost 6 years
    @AndreasBonini but instead of :( it can be (:!
  • SurpriseDog
    SurpriseDog about 5 years
    This happens enough, that Dvorak typers like me eventually learn to switch between keyboards on the fly. I can't type at the same speed in Qwerty, but it is doable.
  • SurpriseDog
    SurpriseDog about 5 years
    If you're using snake_case to name your variables for greater readability or as is the custom in languages like Python, then you will find Dvorak is actually much easier as the underscore key "_" is on the home row making typing these variables much easier and more natural to type. Also the + and - keys are only one key away from the home position as opposed to 2 rows in the QWERTY layout.
  • izhang05
    izhang05 over 4 years
    How did you remap the command key layout?
  • nilon
    nilon about 4 years
    Do you know how to config dvorak spanish in windows 10? I need help with that. In linux it is just one command: setxkbmap dvorak es. Is there such an implementation in microsoft?
  • SurpriseDog
    SurpriseDog almost 3 years
    @ThomasBonini You could write a script to scan for unmatched { ( [ and see what's going on. Just count up the { ( [ in each file and find the files with a mismatch.
  • Admin
    Admin over 2 years
    @LeoJweda Maybe someone though of creating a code block or a conditional test but later on changed his mind. That's why you see the opening braces appearing more often than the closing braces.