Most Pressed Keys and Programming Syntaxes

  • I admit, the Lisp one at the end made me laugh.

    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.

  • If this were actual keys pressed while programming rather than an analysis of completed code, the action on app switch and editor meta-keys would rival that of the highest ranking regular keys.

  • It would be nice to see these heat maps normalized by the average frequency of each key. Then you can really see what stands out about each particular language.

  • Vaguely related, if anyone is interested in tracking their own typing (and individual key counts) check out http://whatpulse.org it's pretty great :-) (my profile, http://whatpulse.org/stats/users/210575/)

  • I skimmed comments here and couldn't find anything that talks about why e is so popular? Is it because ETAOIN? Because almost no "{" "}" pressed in C/Java. Almost no ":" used in Python. "/" key is more popular than "[" "]" in Objective-C. This makes no sense. I don't believe that blog post.

  • I would like to see what a heatmap generated from a "real" typing session would look like (with a keylogger). You could see the influence of the editor as well.

    Since these are generated offline, the keyboard heatmaps are meaningless and the representation is slightly misleading IMO.

  • A live sample would be much more interesting, both would be best. I'd be most interested in the meta keys. As a scandinavian especially {}, [] etc. buttons are very awkward to press. Infact, so are most special characters used in programming.

    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.

  • It's not really measuring "pressed keys", it's measuring a final product -- I'd be interested to see which languages highlight the backspace/delete keys more.

  • I'd be interested in seeing which keys I press most when I'm programming in APL.

  • Next bit would be interesting to look at hand position of programmers in different languages. I know when I am programming Perl my right hand tends to move back and forth into different positions while my left hand stays in the standard position. Wondering if I am unique there or if it is common, and how other languages affect this.

  • I'd be curious to see the same analysis done but with alternate keyboard layouts, such as dvorak or colemak.

  • "Shift" is a big omission, though you can guess at it from the emphasis on certain numeric keys. One of the great things about Python is that there are fewer chorded characters. It's also one of the worst things about Lisp on a standard keyboard.

  • Interesting, but a different visualisation would be even more interesting: heat maps showing deviations from the mean. This would highlight the differences between the languages, which (except for the case of Lisp) are rather subtle.

  • It would be nice to consider how auto-completion actually biases the real distribution of key-presses, e.g. I wouldn't expect closing parenthesis or brackets to be pressed as often as their opening counterparts.

  • Not if you're an emacs user. I use key-chords most programming language forms.

    Also, for Lisp, I never touch the closing paren. M-( does both at the same time.

  • Here are the keys directly under my fingers on the home row: A R S T N E I O

    And I can visually see the reasoning behind Colemak being like this, now.

  • It'd be useful to use the histograms to distinguish between different programming languages for automatic language detections of something like gists.

  • Interesting how "i" is more common in some languages than others. C and C++ make sense (for(i = 0; i < n; i++)), but Ruby is a puzzler.

  • I can understand 0 and 1 being frequently used. But I wonder why 5,6 & 7 seem to be under-used compared to the other numbers?

  • What looks strange to me is that semicolon is is not one of the most common in C-derived languages.

  • Why is E the most common across multiple languages (except Lisp (which I assume is due to the parentheses))? I assume it's usage is higher because it's a vowel, but none of the other vowels are nearly that high.

  • What kind of C programming is this guy doing? '*' is relatively untouched.

  • Dear author: would you consider also generating the results for Dvorak?

  • I wonder what a programming language designed to minimize shifting would look like. Python does a pretty good job because it uses few curly brackets and no semicolons.

  • Gotta say, I expected more square brackets for Objective-C.