TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Most Pressed Keys and Programming Syntaxes

152 pointsby deniszgonjaninover 13 years ago

32 comments

quellhorstover 13 years ago
I photoshopped this really quick for to compare ruby on Dvorak and Qwerty. <a href="https://img.skitch.com/20110908-q24qths9k4u6438wpd989qreci.jpg" rel="nofollow">https://img.skitch.com/20110908-q24qths9k4u6438wpd989qreci.j...</a>
评论 #2974489 未加载
评论 #2975535 未加载
andyleiover 13 years ago
it'd be interesting to see these heatmaps in some sort of normalized way. for example, 'e' is the most common letter in english, so its the most commonly used letter in these programming languages. it'd be very interesting to see, for example, this heatmap with the intensities divided by each letter's frequency of use in the English language, or across a large set of data including a lot of different programming languages
评论 #2974381 未加载
评论 #2973904 未加载
评论 #2974108 未加载
swannodetteover 13 years ago
It's interesting to note that a big reason ( ) dominate in Lisp here is that pg adopts the FP habit of short var names. If anything this is probably just a measure of the tendency to use long vs short name - mainstream OO practice encourages the former. It would be interesting to rerun the heatmap for Lisp with a typical CLOS program. I think you'll find that ( ) no longer dominate.<p>EDIT: And in fact here's a heatmap of core.logic (1K LOC) which is fairly OO-ish in its design - <a href="http://twitpic.com/6hwj88" rel="nofollow">http://twitpic.com/6hwj88</a>. ( ) are strong but do not dominate everything.<p>UPDATE: And here's a 1.4K LOC Clojure program, core.match <a href="http://twitpic.com/6hwo8w/full" rel="nofollow">http://twitpic.com/6hwo8w/full</a>. ( ) again do not dominate.
saintfiendsover 13 years ago
This just graphically displays what I whine about most of the time. Why does my pinky has to do most the work? My pinky is pretty short and all the pinky movements are awkward. It considerably slows down my code typing speed.<p>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.
评论 #2974052 未加载
评论 #2975679 未加载
tomh-over 13 years ago
Lisp: <a href="http://dl.dropbox.com/u/2196687/lisp-keystrokes.png" rel="nofollow">http://dl.dropbox.com/u/2196687/lisp-keystrokes.png</a>
评论 #2974891 未加载
评论 #2974664 未加载
评论 #2975295 未加载
robert_nsuover 13 years ago
I looked at the heatmaps, then looked at my keyboard. The keys with rubbed out labels nearly match his findings 100%. My 'N' isn't (only because the key is slightly larger than my other keys). Other than that, he is spot on.
评论 #2974530 未加载
评论 #2974456 未加载
zyb09over 13 years ago
Clearly ObjC programmers are the only ones, who comment their code responsibly.
评论 #2974736 未加载
评论 #2973985 未加载
quellhorstover 13 years ago
Would like to see a Dvorak version of this.
5hoomover 13 years ago
Interesting to note the difference between C and C++ with regards to the '*' and '&#38;' keys.<p>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++.<p>It's good to see that people are taking advantage of smart pointers ;)<p>(It's subtle though, so I could be reading too much into it).
评论 #2974244 未加载
KirinDaveover 13 years ago
4 of my haskell files put into heatmap. One of them is an applicative-functor-style use of attoparsec, which tends to have more punctuation than normal haskell code. Even with the frequent use of :'s, $'s and ()'s, the alphanumeric keystrokes dominate the input.<p><a href="http://fayr.am/9xkE" rel="nofollow">http://fayr.am/9xkE</a><p>You can compare this to the Lorum Ipsum text map and see its only slightly different: <a href="http://fayr.am/9yk6" rel="nofollow">http://fayr.am/9yk6</a><p>I dunno what that means or what sort of value judgements it drives, but it's pretty different from the other heatmaps.
评论 #2974308 未加载
jemfinchover 13 years ago
This really needs to take into account modifier keys (in particular, shift).
duckover 13 years ago
<i>Whitespace hasn’t been taken into consideration (tabs and spaces) which would have been a cool thing to see.</i><p>I think if that was included this would be a lot more useful. Is there a reason it wasn't?
评论 #2974506 未加载
Newkyover 13 years ago
The javascript image shows limited to no usage on the $ key, Doesn't say a lot for jQuery usage.
评论 #2974089 未加载
评论 #2974090 未加载
cwpover 13 years ago
Here's one for Smalltalk. It's based on my .changes file - about 200K LOC, with all the lines containing '----' and $! removed. What's left is, I think, stuff that actually got typed into a browser.<p>You can definitely see $:, but otherwise it looks pretty much like English.
bryzeover 13 years ago
Has anyone done this for programmer Dvorak yet? I guess I'm just looking for validation..
pa7over 13 years ago
If anyone cares: I just added the DVORAK keyboard layout to the keyboard heatmap and open sourced the code. Here is the repo URL: <a href="https://github.com/pa7/Keyboard-Heatmap" rel="nofollow">https://github.com/pa7/Keyboard-Heatmap</a>
danobeavisover 13 years ago
apropos of the brainfuck reference earlier today, here is a brainfuck interpreter, written in brainfuck, visualized through the keyboard heatmap.<p><a href="http://i.imgur.com/lSDYJ.jpg" rel="nofollow">http://i.imgur.com/lSDYJ.jpg</a>
swannodetteover 13 years ago
Just to drive the point home, Clojure's core.clj is 6,500+ lines of Lisp, funny enough, <i>parens do not dominate</i> - <a href="http://twitpic.com/6hwt28/full" rel="nofollow">http://twitpic.com/6hwt28/full</a>.
评论 #2975042 未加载
MrVitaliyover 13 years ago
The title is misleading. They just extracted character frequencies from source files which fail to capture 'Delete', 'Shift', 'Ctrl', 'Alt', etc keys.<p>Even has Paul Graham name at the end, as if 'Look, this is totally legit!'
评论 #2974837 未加载
bfungover 13 years ago
Of course there's also the missing shortcut keys. For example, Java projects using an IDE would probably have crtl-space be the most frequently pressed keys (autocomplete).
landharover 13 years ago
The problem with this is that you can't tell the difference between numerals and symbols or even worse between two symbols in the same key (such as '_' and '-').
ori_bover 13 years ago
Interesting. It seems strange that Javascript and Ruby seem to use 'r' significantly less than other languages. I have no idea why that would be.
yvdriessover 13 years ago
It appears that it just scans source files, not actual key presses. I barely touch the parenthesis keys when programming Lisp for example.
hernan7over 13 years ago
Perl programmers do seem to comment a lot... the "#" looks almost as heavily used as the "$", which is mandatory for variables.
saintfiendsover 13 years ago
In reality though enclosing glyphs will not be very well balanced. Opening brackets will be typed more than closing brackets.
dodo53over 13 years ago
vim and emacs would be fun too :oP
评论 #2973816 未加载
4adover 13 years ago
based on my visual observation, apart from lisp, python seems to skew furthest away from average. Its heatmap is much cooler, with less extremes. I wonder why.
doki_penover 13 years ago
I'd love to see a keyboard layout based on data like this.
评论 #2973929 未加载
killionover 13 years ago
I bet the backspace key is used the most.
francescolaffiover 13 years ago
time for a programmer keyboard layout? "ASERTNIOL" in the middle line would be good for several langs
MicahWedemeyerover 13 years ago
The most pressed keys are ⌘ (or CTRL), C, and V.
Kwpolskaover 13 years ago
Doesn't PHP use a colon at the end of every line? WTF?
评论 #2974187 未加载