Is Dvorak typing appropriate for programming?

TypingDvorak

Typing Problem Overview


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?

Typing Solutions


Solution 1 - Typing

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 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 homerow, now you have to press the equivalent of jcvp. Oh, you want to copy-cut-paste with one hand? xcv have 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 2 - Typing

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
< = 7178
> = 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 3 - Typing

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

Solution 4 - Typing

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 - Typing

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.

Solution 6 - Typing

The purpose of the Dvorak keyboard is to prevent strain on the hands by keeping the most typed letters on the home row, at least for English. I highly doubt this would help with programming in any significant way due to the speed at which code is written. I always think about what I write as I write it, and variable names are never completely conforming to standard English. In fact, I would not be surprised if the letter frequencies in a typical file of source code varies dramatically from established English letter frequencies.

If you suffer from something like Carpal Tunnel, Dvorak may help alleviate that. I'd have to say that the Dvorak keyboard probably helps with regular writing and typing far more than with programming.

Solution 7 - Typing

QWERTY and Dvorak keyboard layouts were designed for typing text not code.

You can try layouts for typing code like this one: Programmer Dvorak Keyboard Layout

Solution 8 - Typing

I've been using Dvorak for more than 1.5 years. The reason of using Dvorak layout is not the speed, but the comfort itself. You think more than you type code. I code mostly using emacs, however, I'm not using default keybinding. Since emacs is relatively highly customisable, I use Ergoemacs keybindings. It really helps me to code in emacs, while retaining my Dvorak comfort without jumping here and there when I want to do an emacs operation which mostly done using key combination.

Solution 9 - Typing

Being used to dvorak can be a bit of a problem if you're working in a team or something like that where you type on other peoples computers.

Solution 10 - Typing

I use a Dvorak-es layout -optimized for the frequency of letters in the Spanish language- both for programming and typing, and the special keys (){}[]<>/* etc. are the same in this and Qwerty.

If you're doing the switch to Dvorak, perhaps it would pay to design your own "Programmer's Dvorak" layout with the standard QWERTY positions for these keys. At least on Windows you could use the MS Keyboard Layout creator to do this.

Solution 11 - Typing

Well any keyboard can be appropriate for programming. It just would matter if you find it comfortable for typing because it breaks your way of typing with QWERTY.

On a side note, this keyboard would be awful for left-handed people such as myself.

Solution 12 - Typing

Similar to the previous answer - any keyboard layout can be appropriate if that is what you feel comfortable with and can work efficiently with. Dvorak could always be a possiblity if you're interested in it - why don't you give it a try? I'm sure you can find an old keyboard to switch a few keys around on.

Worst case scenario: you revert back to qwerty. :)

Link

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionsamozView Question on Stackoverflow
Solution 1 - TypingMark RushakoffView Answer on Stackoverflow
Solution 2 - TypingThomas BoniniView Answer on Stackoverflow
Solution 3 - TypingChristopherView Answer on Stackoverflow
Solution 4 - TypingPascalView Answer on Stackoverflow
Solution 5 - TypinganthonyView Answer on Stackoverflow
Solution 6 - TypingAlbertoPLView Answer on Stackoverflow
Solution 7 - TypingNick DandoulakisView Answer on Stackoverflow
Solution 8 - TypingDidietView Answer on Stackoverflow
Solution 9 - TypingmhmhmhmhView Answer on Stackoverflow
Solution 10 - TypingAdriano Varoli PiazzaView Answer on Stackoverflow
Solution 11 - TypingDaniel A. WhiteView Answer on Stackoverflow
Solution 12 - TypingDaniel MayView Answer on Stackoverflow