Most Pressed Keys and Programming Syntaxes
31–40 of 75 posts
Re: Most Pressed Keys and Programming Syntaxes
#32Earlier quoted context omitted.
No because this heat map is clearly generated "offline". That is, this is built from a source-file dataset. An "online" dataset would be the output of a key logger. Online analysis would show the number of right parentheses to be a tiny fraction of left parentheses due to auto insertion and other paredit-like operations.
Still, the OP is right - for every character that can only be types by pressing SHIFT should also increase the counter for SHIFT.
"Shouldn't shift be twice as hot as the parentheses?"
For offline analysis? No. Shift should be as hot as the SUM of both types of parentheses. In practice, both parentheses will be equal in count modulo some epsilon for unmatched parenthesis in strings and comments. Therefore, shift will be close to twice as either parenthesis.
For online analysis? No. Shifted characters can come into existence without being typed. For parenthesis, autocompletion is one way. Automatic bracket matching is another. There are many more, including template expansion, copy/paste, and several paredit operations.
Re: Most Pressed Keys and Programming Syntaxes
#33Re: Most Pressed Keys and Programming Syntaxes
#34Re: Most Pressed Keys and Programming Syntaxes
#35Re: Most Pressed Keys and Programming Syntaxes
#36Re: Most Pressed Keys and Programming Syntaxes
#37I wonder what a programming language designed to minimize shifting would look like. Python does a pretty good job because it uses few curly brackets and no semicolons.
It seems the only safe character across many countries are 0-9a-z.,-\ plus space/tab/return. Not a lot to work with :)
Re: Most Pressed Keys and Programming Syntaxes
#38Interesting how "i" is more common in some languages than others. C and C++ make sense (for(i = 0; i < n; i++)), but Ruby is a puzzler.
EDIT: though looking at my sources, where it seems to also be popular, it mostly seems to match inside non-syntax (field, nickname, to_i, strip, index, client).
Re: Most Pressed Keys and Programming Syntaxes
#39Vaguely related, if anyone is interested in tracking their own typing (and individual key counts) check out http://whatpulse.org it's pretty great :-) (my profile, http://whatpulse.org/stats/users/210575/ )
...so this captures every key and mouse movement on your computer, then sends it to a 3rd party server for 'analysis'. Seems legit.
Re: Most Pressed Keys and Programming Syntaxes
#40Earlier quoted context omitted.
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 usefu…