Live data from Hacker News

Most Pressed Keys and Programming Syntaxes

mahdiyusuf.com

1–10 of 75 posts

Re: Most Pressed Keys and Programming Syntaxes

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

Re: Most Pressed Keys and Programming Syntaxes

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

One question is why the Lisp code doesn't use the letter E as much as every language? Is that just due to normalizing of parentheses?

Re: Most Pressed Keys and Programming Syntaxes

#5
post #4
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.

One question is why the Lisp code doesn't use the letter E as much as every language? Is that just due to normalizing of parentheses?

It probably gets used about the same amount as the other languages, it's just that the parentheses get used an insane amount and outweigh all the other characters.

Re: Most Pressed Keys and Programming Syntaxes

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

Re: Most Pressed Keys and Programming Syntaxes

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

Yeah, paredit would make only the left paren red...

Re: Most Pressed Keys and Programming Syntaxes

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

At first I thought it would be in most keywords. But looking at one of my Python files (a tiny sample, to be sure), I see that it doesn't occur all that often in the keywords I used.

However, it is in most of my variable names. Given that it's the most common letter in English, that makes sense.

There's the famous phrase "ETAOIN SHRDLU", dating back to printing press days, of the approximate order of the most common letters in English.

Not to be confused with the early AI program "SHRDLU"". :-)

Re: Most Pressed Keys and Programming Syntaxes

#10
post #5
post #4

Earlier quoted context omitted.

One question is why the Lisp code doesn't use the letter E as much as every language? Is that just due to normalizing of parentheses?

It probably gets used about the same amount as the other languages, it's just that the parentheses get used an insane amount and outweigh all the other characters.

It might be more interesting to see these with the vowels factored out.
Post reply on HN