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-sy…
Most Pressed Keys and Programming Syntaxes
41–50 of 99 posts
Re: Most Pressed Keys and Programming Syntaxes
#42Re: Most Pressed Keys and Programming Syntaxes
#43Re: Most Pressed Keys and Programming Syntaxes
#44I think if that was included this would be a lot more useful. Is there a reason it wasn't?
Re: Most Pressed Keys and Programming Syntaxes
#45it'd be interesting to see these heatmaps in some sort of normalized way. for example, 'e' is the most common letter in english, so its the most commonly used letter in these programming languages. it'd be very interesting to see, for example, this heatmap with the intensities divided by each letter's frequency of use in the English language, or across a large set of data including a lot of different programming lang…
a 0.772163
b 1.2679
c 1.78209
d 1.1195
e 0.881398
f 1.47252
g 0.924242
h 0.358954
i 1.06756
j 0.835313
k 1.41458
l 0.981729
m 1.08955
n 0.9156
o 0.73849
p 1.74468
q 4.2497
r 1.21577
s 1.05023
t 1.03627
u 1.2967
v 1.77662
w 0.396003
x 13.7292
y 0.47566
z 3.78748
The numbers are (relative frequency in C) / (relative frequency in English). So "b" is slightly more common in C than English, but "w" is a lot more common in English than C.The raw counts for symbol characters:
_ 22890057
, 10895692
) 10749798
( 10745839
* 9211904
; 8187969
- 6628768
= 5878296
> 4428291
/ 3468260
. 3011078
{ 2212412
} 2211783
" 2120264
& 1647188
: 1032587
+ 962554
# 909859
[ 889538
] 888722
Re: Most Pressed Keys and Programming Syntaxes
#46Earlier quoted context omitted.
It is funny that you should mention it, because I have spent a lot of time finding keyboard layouts more suitable for programing. In the end I settled on the programmer dvorak layout. It is basically a standard dvorak keyboard but with the special keys you need to program moved to easier locations (and the dvorak keyboard itself uses the homerow much more efficiently, so there is much less strain on your fingers and…
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.
Re: Most Pressed Keys and Programming Syntaxes
#47Earlier quoted context omitted.
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-sy…
but the don't seem to be used too much on this heatmap.
Re: Most Pressed Keys and Programming Syntaxes
#48Earlier quoted context omitted.
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
#49I looked at the heatmaps, then looked at my keyboard. The keys with rubbed out labels nearly match his findings 100%. My 'N' isn't (only because the key is slightly larger than my other keys). Other than that, he is spot on.
Re: Most Pressed Keys and Programming Syntaxes
#50I photoshopped this really quick for to compare ruby on Dvorak and Qwerty. https://img.skitch.com/20110908-q24qths9k4u6438wpd989qreci.j...
Everyone I know who recommends Dvorak is a programmer. And I'm more than content with my comfort and speed typing English; the pain of slowing down to type brackets all the time when programming is more of a pain point for me.
So with this in mind, it's interesting to note that Dvorak has moved the quote key to a slightly less favourable location, and basically banished paren/bracket. Not a solution for my pain point!