TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Most Pressed Keys and Programming Syntaxes

152 点作者 deniszgonjanin超过 13 年前

32 条评论

quellhorst超过 13 年前
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 未加载
andylei超过 13 年前
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 未加载
swannodette超过 13 年前
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.
saintfiends超过 13 年前
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-超过 13 年前
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_nsu超过 13 年前
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 未加载
zyb09超过 13 年前
Clearly ObjC programmers are the only ones, who comment their code responsibly.
评论 #2974736 未加载
评论 #2973985 未加载
quellhorst超过 13 年前
Would like to see a Dvorak version of this.
5hoom超过 13 年前
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 未加载
KirinDave超过 13 年前
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 未加载
jemfinch超过 13 年前
This really needs to take into account modifier keys (in particular, shift).
duck超过 13 年前
<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 未加载
Newky超过 13 年前
The javascript image shows limited to no usage on the $ key, Doesn't say a lot for jQuery usage.
评论 #2974089 未加载
评论 #2974090 未加载
cwp超过 13 年前
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.
bryze超过 13 年前
Has anyone done this for programmer Dvorak yet? I guess I'm just looking for validation..
pa7超过 13 年前
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>
danobeavis超过 13 年前
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>
swannodette超过 13 年前
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 未加载
MrVitaliy超过 13 年前
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 未加载
bfung超过 13 年前
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).
landhar超过 13 年前
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_b超过 13 年前
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.
yvdriess超过 13 年前
It appears that it just scans source files, not actual key presses. I barely touch the parenthesis keys when programming Lisp for example.
hernan7超过 13 年前
Perl programmers do seem to comment a lot... the "#" looks almost as heavily used as the "$", which is mandatory for variables.
saintfiends超过 13 年前
In reality though enclosing glyphs will not be very well balanced. Opening brackets will be typed more than closing brackets.
dodo53超过 13 年前
vim and emacs would be fun too :oP
评论 #2973816 未加载
4ad超过 13 年前
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_pen超过 13 年前
I'd love to see a keyboard layout based on data like this.
评论 #2973929 未加载
killion超过 13 年前
I bet the backspace key is used the most.
francescolaffi超过 13 年前
time for a programmer keyboard layout? "ASERTNIOL" in the middle line would be good for several langs
MicahWedemeyer超过 13 年前
The most pressed keys are ⌘ (or CTRL), C, and V.
Kwpolska超过 13 年前
Doesn't PHP use a colon at the end of every line? WTF?
评论 #2974187 未加载