For most other languages the focus seems to be mainly on letters (typing out keywords/identifiers), so in that sense there is little evidence that one language would be easier to write than another.
Additionally, I imagine that some of the code is auto-completed by an IDE, which this analysis fails to account for.
As an aside, its interesting (to me, as a Colemak user) that all of the hot alphabetic characters in all the analyzed languages are on the home row of the Colemak layout (except L, which seems to be kind of hot in C++).
while the following do not: break, case, continue, default, double, else, enum, extern, register, return, signed, sizeof, typedef, unsigned, volatile
Seems legit.
It can generate keystroke data like this, but the data is stored locally.
(Simple) Example:
PHP:
$myString = sprintf('Total: %.2f', $myFloat);
ObjC:
NSString *myString = [NSString stringWithFormat:@"Total: %.2f", myFloat];
Maybe this is the reason these characters don't score too highly in overall frequency? I have no answer for the high frequency of '/'.Since these are generated offline, the keyboard heatmaps are meaningless and the representation is slightly misleading IMO.
As mentioned, auto-complete and similar functionality change the heatmap, but that's what people actually press. This data would be alot better for actual use.
Though I don't mean it as a scold, it wasn't really in the hands of the author to collect such vast amounts of live data, and surely a lot more work than was his intension.
Also, for Lisp, I never touch the closing paren. M-( does both at the same time.
And I can visually see the reasoning behind Colemak being like this, now.
[1] http://softwaremaniacs.org/soft/highlight/en/ http://softwaremaniacs.org/media/soft/highlight/test.html
[2] http://blog.chrislowis.co.uk/2009/01/04/identify-programming...
EDIT: though looking at my sources, where it seems to also be popular, it mostly seems to match inside non-syntax (field, nickname, to_i, strip, index, client).
The reason, of course, is that 4 is also $, which is used to denote a scalar in Perl.
Thus, because 5,6,7 correspond to %,^,&, which generally get used to a lesser degree for things like modulo, hashes, exponentiation and logical-and, they're used less.
The heat map isn't accounting for shift. 5,6,7 also include %,^,&
I only know about this because it was referenced in a book on cryptanalysis. The simplest sort of cipher can be broken by paying attention to the relative frequency of letters in the original text. I remember a useful mnemonic for remembering the most common letters: the sentence "a sin to err" contains them. E, followed by t and a, are the most common out of those (t and a are very close).
However, it is in most of my variable names. Given that it's the most common letter in English, that makes sense.
There's the famous phrase "ETAOIN SHRDLU", dating back to printing press days, of the approximate order of the most common letters in English.
Not to be confused with the early AI program "SHRDLU"". :-)
It seems the only safe character across many countries are 0-9a-z.,-\ plus space/tab/return. Not a lot to work with :)