Everyone I know who recommends Dvorak is a programmer. And I'm more than content with my comfort and speed typing English; the pain of slowing down to type brackets all the time when programming is more of a pain point for me.
So with this in mind, it's interesting to note that Dvorak has moved the quote key to a slightly less favourable location, and basically banished paren/bracket. Not a solution for my pain point!
a 0.772163
b 1.2679
c 1.78209
d 1.1195
e 0.881398
f 1.47252
g 0.924242
h 0.358954
i 1.06756
j 0.835313
k 1.41458
l 0.981729
m 1.08955
n 0.9156
o 0.73849
p 1.74468
q 4.2497
r 1.21577
s 1.05023
t 1.03627
u 1.2967
v 1.77662
w 0.396003
x 13.7292
y 0.47566
z 3.78748
The numbers are (relative frequency in C) / (relative frequency in English). So "b" is slightly more common in C than English, but "w" is a lot more common in English than C.The raw counts for symbol characters:
_ 22890057
, 10895692
) 10749798
( 10745839
* 9211904
; 8187969
- 6628768
= 5878296
> 4428291
/ 3468260
. 3011078
{ 2212412
} 2211783
" 2120264
& 1647188
: 1032587
+ 962554
# 909859
[ 889538
] 888722
< 839910
| 643903
% 583092
! 561462
\ 540456
' 454201
@ 131199
? 112488
~ 84629
^ 19064
$ 17922
` 7272
[space] 74199965Based on alextgordons numbers (see http://news.ycombinator.com/item?id=2974381 )
EDIT: And in fact here's a heatmap of core.logic (1K LOC) which is fairly OO-ish in its design - http://twitpic.com/6hwj88. ( ) are strong but do not dominate everything.
UPDATE: And here's a 1.4K LOC Clojure program, core.match http://twitpic.com/6hwo8w/full. ( ) again do not dominate.
I wonder If there would be another keyboard layout specially made for programmers. If you look at it you'll see that most of it has a similar pattern.
In the end I settled on the programmer dvorak layout. It is basically a standard dvorak keyboard but with the special keys you need to program moved to easier locations (and the dvorak keyboard itself uses the homerow much more efficiently, so there is much less strain on your fingers and your wrists).
Same thing happens with the saxophone keywork. It seems that pinkies get to handle all the stuff that was not included in the original spec.
Oh, you want to add a shift key? Let the pinky handle it. A C# key? No problem, we can fit it in the pinky cluster.
Doen't nearly all serious Lisp developers use Emacs? And doesn't Emacs have piles of shortcuts for wrapping/unwrapping/manipulating s-expressions? I'd imagine that the resulting number of parens is wildly different than the number originally typed.
Can any experienced Lispers comment on this? Where can I find a cheat sheet of such shortcuts?
I don't think Paredit isn't included in Emacs, but here's the relavent page on the Emacs Wiki: http://www.emacswiki.org/emacs/ParEdit and here's a cheatsheet: http://www.emacswiki.org/emacs/PareditCheatsheet
There's also something similar for Vim, or at least something bundled with slimv, which is more than just Paredit (supporting something like SLIME) http://www.vim.org/scripts/script.php?script_id=2531
Note the images in the article are done by static analysis of text files, which is very different from measuring what people actually type.
In fact, on my keyboard, N is the most-obliterated key label, followed by MAD<. Also damaged: GHSECV. I think I can blame ASD on games, and E should be obvious. So why are CVNM< so very heavily worn? My best guess is that the labels are on the upper section of the keys, which is presumably the laziest part of the key for my fingers to reach?
http://www.compkeyboard.com/uploadpic/Microsoft%20Natural%20...
I know there is a lot of raw pointer and address usage in C, but I'm surprised at how little these keys show up in C++.
It's good to see that people are taking advantage of smart pointers ;)
(It's subtle though, so I could be reading too much into it).
You can compare this to the Lorum Ipsum text map and see its only slightly different: http://fayr.am/9yk6
I dunno what that means or what sort of value judgements it drives, but it's pretty different from the other heatmaps.
I think if that was included this would be a lot more useful. Is there a reason it wasn't?
You can definitely see $:, but otherwise it looks pretty much like English.
; Common Lisp
(defun add (x y) (+ x y))
; Scheme
(define (add x y) (+ x y))
; Clojure
(defn add [x y] (+ x y))
Also, Clojure eliminates some parentheses that are used in other Lisps: ; Common Lisp and Scheme
(cond ((> x 0) 1)
((= x 0) 0)
(t -1))
; Clojure
(cond (> x 0) 1
(= x 0) 0
:else -1)Even has Paul Graham name at the end, as if 'Look, this is totally legit!'
Shift is, but that could have (should have IMO) been extracted from the character frequencies in the source files...
http://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard#Prog...
Just as Dvorak was based on letter usage, this is based on examining large bodies of code just like the heatmaps in the OP.
It uses a semicolon to delimit statements within blocks, but (afaik) placing each statement inside its own <?php ... ?> tag would be valid.
There's also the alternative syntax[1], which is mostly used for templating these days, which looks like
<?php if ($foo): ?>
... html ...
<?php endif; ?>
and is probably the only place other than a ternary operator that might conceivably end a line with a colon.[1] http://php.net/manual/en/control-structures.alternative-synt...