Live data from Hacker News

Most Pressed Keys and Programming Syntaxes

mahdiyusuf.com

31–40 of 99 posts

Re: Most Pressed Keys and Programming Syntaxes

#31

Earlier quoted context omitted.

I have thought about switching to Dvorak, it's hard to find from where I live. I'd love to know what model or brand you settled for.

If you mean buying a hardware keyboard with dvorak letters, then don't. If you learn to touch type (and there's no point switching to Dvorak if you don't intend to) then you don't need to look at your keyboard, indeed being able to will only teach you bad habits. Print a paper copy of the key layout to pin next to your monitor when starting out and use a typing tutor like gtypist to train yourself instead.

I have no problem typing without looking. Problem as I mentioned above, it is difficult to type with my pinky. It is kind of short (Not oddly short, just that I have shorter fingers than average) and it's awkward. That's what slows me down.

So I'm looking for a layout which makes my other fingers work more.

Re: Most Pressed Keys and Programming Syntaxes

#32

Doesn't PHP use a colon at the end of every line? WTF?

No.

It uses a semicolon to delimit statements within blocks, but (afaik) placing each statement inside its own tag would be valid.

There's also the alternative syntax[1], which is mostly used for templating these days, which looks like

    
     ... html ...
    
and is probably the only place other than a ternary operator that might conceivably end a line with a colon.

[1] http://php.net/manual/en/control-structures.alternative-synt...

Re: Most Pressed Keys and Programming Syntaxes

#33
post #24
post #19

The javascript image shows limited to no usage on the $ key, Doesn't say a lot for jQuery usage.

The article mentions that "the heat map does miss out on things like shift and caps. ex. in perl with the dollar sign. ($)".

Yeah, but the $ is shown as frequently-pressed in the Perl heatmap, so that must not be what he means.

Re: Most Pressed Keys and Programming Syntaxes

#34
4 of my haskell files put into heatmap. One of them is an applicative-functor-style use of attoparsec, which tends to have more punctuation than normal haskell code. Even with the frequent use of :'s, $'s and ()'s, the alphanumeric keystrokes dominate the input.

http://fayr.am/9xkE

You can compare this to the Lorum Ipsum text map and see its only slightly different: http://fayr.am/9yk6

I dunno what that means or what sort of value judgements it drives, but it's pretty different from the other heatmaps.

Re: Most Pressed Keys and Programming Syntaxes

#35
post #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).

Seems odd that are said to be used more in C than in C++ (templates).

Re: Most Pressed Keys and Programming Syntaxes

#36
post #23
post #19

The javascript image shows limited to no usage on the $ key, Doesn't say a lot for jQuery usage.

In the codebase here we use 'jQuery' instead of '$'.

Ditto. If you pull in multiple plugins or additional frameworks (for some reason, we mix YUI with jquery), the $() notation can become broken, and you have to explicitly call jQuery().

Re: Most Pressed Keys and Programming Syntaxes

#37

Earlier quoted context omitted.

If you mean buying a hardware keyboard with dvorak letters, then don't. If you learn to touch type (and there's no point switching to Dvorak if you don't intend to) then you don't need to look at your keyboard, indeed being able to will only teach you bad habits. Print a paper copy of the key layout to pin next to your monitor when starting out and use a typing tutor like gtypist to train yourself instead.

I have no problem typing without looking. Problem as I mentioned above, it is difficult to type with my pinky. It is kind of short (Not oddly short, just that I have shorter fingers than average) and it's awkward. That's what slows me down. So I'm looking for a layout which makes my other fingers work more.

It sounds like a smaller and/or curved keyboard might be a physical alternative, rather than learn a new layout e.g. the expensive Kinesis contoured devices.

http://www.kinesis-ergo.com/contoured.htm

Re: Most Pressed Keys and Programming Syntaxes

#39
post #23

Earlier quoted context omitted.

In the codebase here we use 'jQuery' instead of '$'.

Ditto. If you pull in multiple plugins or additional frameworks (for some reason, we mix YUI with jquery), the $() notation can become broken, and you have to explicitly call jQuery().

Unless you put all your code in a big closure to make a correct $ in function scope:

  (function ($)
  {
  
  }) (jQuery);

Re: Most Pressed Keys and Programming Syntaxes

#40

4 of my haskell files put into heatmap. One of them is an applicative-functor-style use of attoparsec, which tends to have more punctuation than normal haskell code. Even with the frequent use of :'s, $'s and ()'s, the alphanumeric keystrokes dominate the input. http://fayr.am/9xkE You can compare this to the Lorum Ipsum text map and see its only slightly different: http://fayr.am/9yk6 I dunno what that means or what…

And on Dvorak, all of the yellow letters except the "R" are on the home row.... (R is on the O.)
Post reply on HN