Live data from Hacker News

Most Pressed Keys and Programming Syntaxes

mahdiyusuf.com

11–20 of 75 posts

Re: Most Pressed Keys and Programming Syntaxes

#11
post #7
post #6

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.

E is the most common letter in the English language. There was even a fun book written without the e: http://en.wikipedia.org/wiki/Gadsby_(novel)

There is also A Void: it was originally written in French, which (I think) uses the letter "e" more often than English and then translated to English. In both cases it did not use the letter "e" at all.

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

Re: Most Pressed Keys and Programming Syntaxes

#14
"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.

Re: Most Pressed Keys and Programming Syntaxes

#16
post #2

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.

Shouldn't shift be twice as hot as the parentheses?

Re: Most Pressed Keys and Programming Syntaxes

#20
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.
Post reply on HN