

Underscores are stupid? Get a Japanese keyboard - recurser
http://recursive-design.com/blog/2012/05/16/underscores-are-stupid-get-a-japanese-keyboard/

======
vorg
If youre going to use a Japanese keyboard, why not go all the way and use
Kanji in your code also? Instead of (courtesy of Wikipedia)...

    
    
      def create_set_and_get(initial_value=0) # Note the default value of 0
        closure_value = initial_value
        return Proc.new {|x| closure_value = x}, Proc.new { closure_value }
      end
    

...we could write (excuse my Chinese)...

    
    
      做 创_去_和_来(先_值=0)
        闭_值 = 先_值
        回 程.新 {|x| 闭_值 = x}, 程.新 { 闭_值 }
      终
    

Oh look: all the "words" are a single character each! Why not get rid of all
those silly grammar symbols in between them (just like in Chinese and Japanese
writing)...

    
    
      做创去和来(先值=0)
        闭值=先值
        回程新{|x|闭值=x},程新{闭值}
      终
    

Now there's tons of whitespace on the righthand side, so why not make it all a
single line, with spaces instead of newlines...

    
    
      做创去和来(先值=0)  闭值=先值  回程新{|x|闭值=x},程新{闭值}  终
    

A lot terser! Makes all the talk about semicolons and underscores sound a
little silly to some people, doesn't it?

~~~
m_for_monkey
Already exists: <http://www.chinesepython.org/>. (Scroll down for a short
translated code snippet.)

English info: <http://www.chinesepython.org/english/english.html>.

~~~
vorg
Chinese Python is a Chinese version of Python, but doesnt utilize the inherent
tersity of CJK characters. For example it translates "import sys" as "載入 系統".
The example I gave would eliminate spaces, semicolons, underscores between
words by using one and only one CJK character per English word, so in the
example "import sys" would become, say, "入統".

------
ars
Or just reprogram your keyboard (xmodmap) to make any button do anything you
want.

~~~
recurser
I'm curious - do you physically take the keys off and swap them when you do
major mapping changes like this to make using it easier? Or just use touch
typing/muscle memory and ignore what's written on the keys?

~~~
mistercow
I use Colemak and occasionally one-handed Dvorak (when I'm having RSI issues
in one hand or the other), but my keys are laid out QWERTY. Move the keys, and
touch typing becomes much more difficult because you lose your "homing bumps"
at the f and j positions. Also, learning a new layout is easiest with a
diagram floating on the screen, not by trying to look through your fingers at
the keyboard.

~~~
reeses
I am another Colemak user. I use a Truly Ergonomic keyboard on my desktop, and
having to look at the keyboard because of the odd placement of enter, tab,
quotes, etc. absolutely kills my throughput compared to my laptop.

~~~
mistercow
Interesting. I had not seen that kind of keyboard before. Seems like having
"b" on the left hand would also be distracting, but maybe that's how other
people type.

------
brokentone
I don't like his statistics so much:

Ruby - Saving 34% (6,613 keystrokes) PHP - Saving 52% (105,250 keystrokes)

Those percentages are not the most helpful. They represent a relationship
between the positive delta and the negative delta, rather than a savings for
the project (which I feel is the first implication in a percentage saved).

~~~
recurser
Yeah I don't really like them either, and I wrote them. I thought twice about
including the percentages, and I did try to highlight that fact:

    
    
        Note that the percentages below are only relative to
        these 2 sets of 3 characters, and don’t represent the 
        total percentage of keystrokes saved.
    

The percentages are only really there to provide an easier way to compare the
(relatively small) Ruby sample, and the (relatively large) PHP sample. Simply
saying that one project saved 6000 strokes vs. the other with 100,000 strokes
seemed a bit meaningless given the relative sizes of the projects, and doing a
full-on frequency analysis of modifier key usage seemed like more trouble that
it was worth... perhaps in hindsight I should have done it anyway.

zokier provided an interesting link to a previous discussion below
(<http://news.ycombinator.com/item?id=2973776>, specifically
<http://news.ycombinator.com/item?id=2977303>) which does a much more thorough
analysis of Finnish/Swedish vs. US layouts - I'd like to run his code using
the Japanese layout when I get a chance.

------
zokier
see this previous discussion for keyboard/programming stats:
<http://news.ycombinator.com/item?id=2973776>

Especially the methodology I used then to compare Finnish/Swedish and US
layouts seems similar to his.

------
yuchi
Actually Yukihiro "Matz" Matsumoto, designer of Ruby is Japanese. It's pretty
ironic, isn't it?

~~~
bradleyland
It's not ironic at all. One would expect that authors using a particular
keyboard layout would tend to favor characters that are easy to type. In that
way, it's the opposite of irony. The outcome is exactly what we'd expect.

~~~
blahedo
See also the keyboard used to develop the original vi:

<https://en.wikipedia.org/wiki/File:KB_Terminal_ADM3A.svg>

~~~
yuchi
That explains also the tilde=home :)

A recent article I've read somewhere explains it very well!

------
quarterto
I have the number keys mapped to their symbols (i.e. pressing 1 gives !,
pressing Shift+1 gives 1 etc.) using a custom XKB map. Feels so much more
efficient, although I don't have any hard stats.

~~~
lloeki
Sounds almost like a FR layout.

~~~
draven
FR layout is great for this (and writing lisp is easier when the parenthesis
are easily typed) but the []{} characters are horrible to type!

------
ksec
Interesting, according to the stats, if you have = sign done with out the
shift it would have saved another 20% of the keystrokes.

------
rshm
This is my current .Xmodmap file

keycode 48 = quotedbl apostrophe quotedbl apostrophe

keycode 66 = Tab Caps_Lock NoSymbol Caps_Lock

keycode 20 = underscore minus underscore minus

------
jhuni
Use dashes for separators like in Lisp.

~~~
LeonidasXIV
Just it doesn't work in most languages, as the - sign is usually the minus
operator. In Java and Python 3 for example you can use Unicode in identifiers,
maybe you can use mdash there (unless they forbid punctuation characters).

~~~
NateEag
For Emacs users, there is the wonderful package Smart Dash Mode:
<http://malsyned.net/smart-dash.html>

It takes a pretty good stab at whether you want a dash or an underscore, based
on context.

It's a whole lot easier on the wrists.

(The only problem is you start to wish you had it everywhere, not just in
Emacs.)

~~~
LeonidasXIV
Wow, as an Vim user, I think this is seriously cool. Now it'd need to support
camelCode as well, so when I write camel-code in JavaScript, I get the right
thing. That'd be awesome.

------
nknight
> _The Control key is in a far more comfortable position below the Tab key,
> where caps lock would be on a traditional keyboard_

Well, there's tradition and there's tradition... Traditional Unix systems
usually had ctrl there, and the old Symbolics/"MIT space cadet" keyboard
actually had what I believe is the equivalent of backspace ("rub out") in that
location. The modern location of caps lock seems to be a PCism.

Edit: Forgot to mention, notably even the Apple II and III had ctrl there, I
don't think Apple switched to the "modern" layout until the Mac:

<http://www.flickr.com/photos/suburbia_org_uk/4820757193/>

[http://www.old-
computers.com/museum/photos/Apple_III_Keyboar...](http://www.old-
computers.com/museum/photos/Apple_III_Keyboard_s1.jpg)

------
cheatercheater
Don't get a Japanese keyboard... just get a better layout!

<http://bitbucket.org/cheater/us_split/overview>

It's just like qwerty, but better, because it inflicts less pain.

I didn't even know, but Apple started using it with iPads!
[http://www.gottabemobile.com/2012/02/03/ipads-split-
keyboard...](http://www.gottabemobile.com/2012/02/03/ipads-split-keyboard-has-
hidden-buttons/)

