Live data from Hacker News

Most Pressed Keys and Programming Syntaxes

mahdiyusuf.com

11–20 of 99 posts

Re: Most Pressed Keys and Programming Syntaxes

#11
post #10
post #3

I'd love to see a keyboard layout based on data like this.

It already exists in terms of a more logical layout for faster typing of many latin-based languages. Instead of QUERTY keyboard, it's called the Dvorak layout and is really common in certain circles and places - I believe that in OS X you can switch to this alternative layout pretty easily if you're interested in learning a faster way of typing. More info here: http://atmac.org/dvorak-keyboard-layout-switching

There's also some programmer versions of Dvorak, that make the punctuation more accessible too (by demoting numerals to needing the shift-key to be held):

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.

Re: Most Pressed Keys and Programming Syntaxes

#14
Interesting to note the difference between C and C++ with regards to the '*' and '&' keys.

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).

Re: Most Pressed Keys and Programming Syntaxes

#17
post #5

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 lang…

For this reason, I think it would have been more interesting to ignore the alphabet keys and just heatmap the rest.

But then you lose the impact of the entire set of reserved words. At the point of ignoring the entire alphabet, you're looking at developer preferences for spacing and operators. Might be a nice sidebar to the existing heat maps.

Re: Most Pressed Keys and Programming Syntaxes

#18

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. 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.

It is funny that you should mention it, because I have spent a lot of time finding keyboard layouts more suitable for programing.

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).

Post reply on HN