Hacker News new | ask | show | jobs
by sordina 5090 days ago
Shouldn't shift be twice as hot as the parentheses?
2 comments

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.
If you want to be pedantic...

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

If you want to be pedantic...

Shift is used for many combinations besides just parentheses, such as that capital at the start of this sentence. It would likely be more than twice as much.

A lot of emotions here. Making some of us jump to keyboard without reading carefully.
Well, they could have used caps lock. Very unlikely I know.
Should the offline generate recognize ) as a combination of 0 and Shift anyway?

And furthermore, where are all the numbers, tabs and spaces?

Yes, and in fact they are ignoring Control, Space and Tab too.