Is the Dvorak layout a good choice for programming? I wrote a little console application to find out. Drag and drop one or more folders onto CharStats.exe to analyse the C, C++ and C# source files. Designer files are ignored, as they are automatically generated.
Line statistics
All lines in the source code files are analysed to see if they are code, comments or blank lines.
Character statistics
Letters plus full stop, comma, semicolon and double quote are tallied. Other characters could have been included, but many of them are not on the home, top or bottom rows. The frequency of each character is displayed as a percentage and bar graph.
Percentage of characters on each row
The home, top and bottom rows are compared for the Dvorak and QWERTY layouts.
Points
Each layout starts with 100 points. One point is deducted for each percentage point on the top row, and two points are deducted for the bottom row.
Using a reasonably large project that I’ve worked on since 2008, we get the following results:
Line statistics Code 124,817 Comment 961 Blank 34,151 Total 159,929 Character statistics E 11.8% .......................................................... T 9.0% ............................................. R 7.8% ...................................... I 7.5% ..................................... A 6.4% ................................ N 6.2% ............................... S 6.0% .............................. O 5.7% ............................ D 4.7% ....................... L 4.1% .................... C 4.1% .................... P 3.2% ................ U 3.1% ............... M 2.8% .............. G 2.5% ............ . 2.2% .......... B 1.9% ......... ; 1.8% ......... V 1.5% ....... F 1.5% ....... Y 1.4% ...... W 1.1% ..... H 1.0% .... , 0.8% .... X 0.5% .. J 0.5% .. K 0.3% . " 0.3% . Q 0.1% Z 0.1% Percentage of characters on each row Dvorak QWERTY Home 61.5% 29.1% Top 27.8% 50.7% Bottom 10.7% 20.1% Each layout starts with 100 points. Points are deducted as follows: Home = 0 points Top = -1 points Bottom = -2 points Dvorak QWERTY Home 0.0 0.0 Top -27.8 -50.7 Bottom -21.5 -40.3 Total 50.7 9.0
Clearly, typing this code on Dvorak was much easier than it would have been on QWERTY. Dvorak makes a lot of sense for programmers.
Download the CharStats Visual Studio solution here.
Recent Comments