News for hackers. Stuff that matters.
Re:Why was '~' chosen to represent the home directory? by robomartin on Monday January 21, 2013 @01:43PM (#5092930)
Funny how all roads lead to a discussion of the merits of vi/m.

At least some of you now understand that these tools were designed as you see them today because they were dealing with crippled hardware (from today's vantage point). There was no magical study on keystroke efficiency at the inception. They had lemons and made lemonade.

Now, quit arguing and get back to reading Facebook!

Yup, that's me ducking in the corner.

Re:Why was '~' chosen to represent the home directory? by stcredzero on Monday January 21, 2013 @03:07PM (#5093410)
HJKL is madness. It's more proof that "The Inmates are Running the Asylum" when it comes to usability. We programmers are so much more apt at remapping functions to arbitrary inputs/symbols that we continue to put up with things like this, decades after the reason disappears. This is also why we need to make special efforts at understanding non-programmer users.
Re:Why was '~' chosen to represent the home directory? by alecdbrooks on Monday January 21, 2013 @03:21PM (#5093494)
I do agree that "we need to make special efforts at understanding non-programmer users." But this isn't a good example since Vim is a specialized editor mostly recommended for programers. If the general-purpose text editors (and word processors) required you to use HJKL, you might have a point. (EDIT: I misunderstood stcredzero's argument. See stcredzero's comment below.)

It's also true that functions can be mapped to arbitrary inputs and systems. But I think there's value in learning HJKL rather than remapping them:

1. They're on the home row, giving a slight speed benefit for these commonly used actions.

2. You get used to the movement keys that will be the default in any copy of Vi/m and quite a few other tools. (HJKL, along with WASD and dedicated arrow keys, is probably the most common mapping of left, right, up, and down to keys on a keyboard.)

Re:Why was '~' chosen to represent the home directory? by stcredzero on Monday January 21, 2013 @03:29PM (#5093555)
> But this isn't a good example since Vim is a specialized editor mostly recommended for programers.

Arrgh. This is an example of why programmers are different, not of a bad interface for ordinary people. Thanks for considering me so daft as to think non-programmers people use VIM.

Re:Why was '~' chosen to represent the home directory? by alecdbrooks on Monday January 21, 2013 @03:53PM (#5093703)
I apologize for my (unintended) insult. I should have read your comment more carefully.

I still disagree that HJKL is madness, however. It's not the best possible scheme, but it is reasonable to keep it for its remaining advantages.

Re:Why was '~' chosen to represent the home directory? by rubyrescue on Monday January 21, 2013 @03:21PM (#5093497)
i have tried both and hjkl is just faster. it's "madness" the same way having 88 white unmarked keys on a piano is "madness" to someone who doesn't play.
Re:Why was '~' chosen to represent the home directory? by robomartin on Monday January 21, 2013 @04:51PM (#5093943)
Sometimes stirring-up shit can be a win-win situation.

I could agree with you and get the anti-vim guys all worked up. I could even back it up with random links and examples from all over the web.

I could also disagree with you and get pro-vim guys all riled-up. Again, suitable links, stats and a photo of some guy with carpal-tunnel would do the trick.

That's great stuff!

To quote one of the most memorable lines in motion picture lore:

"Interesting game. The only way to win is not to play."

I use vim. And I've used everything else. I don't care. All of it pales in magnitude to the efficiency losses elsewhere in the process of developing a software product.

My guess is that on a daily basis I waste more time going for a cup of coffee, shooting the shit, reading/posting on HN, getting pulled in all manner of directions on the internet than any text editor could save me short of a brain-to-code interface.

And, of course, there's the actual work of figuring out how to code something. I've spent days diagraming state machines with, yes, hold-on, paper and pencil. Once there, an hour or two and the bug-free code is written and working. Yes, even if you use Notepad.

You want to be more efficient? Get really good at going from problem to finished, shippable, documented, flexible, reusable and bug-free code. What you use to enter said code probably does not matter.

I'm going back to polishing my keyboard.

Maybe you guys ought to do the same.

Re:Why was '~' chosen to represent the home directory? by qu4z-2 on Wednesday January 23, 2013 @04:42PM (#5105465)
I slightly disagree. Obviously you're entirely correct about the amount of time spent editing text versus figuring out how to code stuff. The "time efficiency" argument for vim is pretty rubbish.

For me (and I appreciate the irony) I like vim because it has a lower cognitive load. I can say things like "Change the contents of the quotes to say Goodbye Planet", rather than having to actually execute the instructions --

move left a word, move left a word, start highlight, move right a word, move right a word, move right a word, stop and check to see my cursor is in the right place, press delete, type phrase "Goodbye Planet"

The benefits measured in time are no doubt negligible (or even negative -- as you say, editing time pales in comparison to other work), but the benefits to my concentration are much higher. Tedious, repetitive work makes me frustrated, distracted, or both. If I can keep myself in a good mental space and not be constantly interrupted by having to babysit my source editor, I can be more productive.

PS: And then I spend the time on HN :/

Re:Why was '~' chosen to represent the home directory? by obscaenvs on Tuesday January 22, 2013 @03:13AM (#5096128)
robomartin: A voice of reason in a sea of inane babble.
Re:Why was '~' chosen to represent the home directory? by robomartin on Tuesday January 22, 2013 @02:06PM (#5098923)
Thanks for the vote of confidence. Now I have the challenge of actually trying to be that person.
Re:Why was '~' chosen to represent the home directory? by kragen on Monday January 21, 2013 @11:02PM (#5095439)
Chad, while it's true that having your direction keys where you can easily reach them is faster than having them somewhere else, using the mouse is faster than moving one cell at a time with direction keys, and Jef Raskin's "LEAP" research in the 1980s showed that incremental search is faster than using the mouse. Try it in vim:

    :set incsearch
    :set hlsearch
(ObFlameRetardant: I prefer Emacs myself for programming, but vim is a perfectly excellent editor.)
Re:Why was '~' chosen to represent the home directory? by qu4z-2 on Wednesday January 23, 2013 @04:54PM (#5105526)
I do love search for file navigation (incremental is even better, but not strictly necessary).

Do you have a link to the study about mouse vs cell-based key movement?

I have a couple of questions:

- While I fully believe that navigating by mouse is faster, on a desktop the overhead of switching between typing and mousing is quite high. On my laptop I often use the trackpoint over relevant keyboard shortcuts because it's already right under my fingers, but on my desktop I much prefer using the shortcuts due to the overhead of switching.

- For a movement that's three cells or fewer, I find it hard to imagine that mouse would be faster (unless perhaps it's set to follow the cursor?). I assume the study averages over a variety of distances across the entire screen. I hope that most vim users aren't using hjkl for adjustments of more than three or so cells. A combination of {}wb and especially ?/ will handle the bulk of jumps quickly. hjkl are then useful keys for adjusting just a couple of characters to refine your jump -- and now they're already right under your fingers.

Re:Why was '~' chosen to represent the home directory? by kragen on Wednesday January 23, 2013 @10:18PM (#5106939)
I don't have a link. I remember that one such set of experiments was done by a famous usability expert at Sun who's not Nielsen, but I can't remember who he was.

There's a slowdown associated with considering too many different options, too, btw. It's just more invisible.

Re:Why was '~' chosen to represent the home directory? by MartinCron on Monday January 21, 2013 @04:34PM (#5093877)
88 white unmarked keys on a piano would be madness. You forgot the black keys.
Re:Why was '~' chosen to represent the home directory? by chimeracoder on Monday January 21, 2013 @05:00PM (#5093988)
The piano/keyboard isn't my main instrument, but I'm not sure that the color of the keys would make a huge difference. Practiced/professional violinists, for example, don't use sight to figure out how to place their fingers, and pianists don't even have to worry about tuning the way violinists do.
Re:Why was '~' chosen to represent the home directory? by lnanek2 on Monday January 21, 2013 @05:11PM (#5094039)
The two people above you are pretty much saying the same thing. Piano keys being unmarked and making sense to pianists as the best way was being used as proof that using keys not marked with arrows could be the best way for editors. I'll throw in with agreeing as well, my piano teacher hated when music had finger numbers on it and things like that, using them just slowed you down and messed you up, especially when the hands changed positions. Labeled piano keys would be bad because it would prevent people from learning the right way to play.
Re:Why was '~' chosen to represent the home directory? by charonn0 on Monday January 21, 2013 @09:12PM (#5095116)
In many (most?) early pianos the colors were reversed.
Re:Why was '~' chosen to represent the home directory? by andrewflnr on Monday January 21, 2013 @09:30PM (#5095176)
You would only really need a reference point every octave. I've always felt that having "sharp notes" on, basically, their own row of the piano was silly, and I've speculated on how one could design a sane keyboard that puts all (musical) keys on an equal basis... In short, the black (physical) keys are part of the madness. ;)
Re:Why was '~' chosen to represent the home directory? by mkl on Monday January 21, 2013 @11:09PM (#5095459)
You may be interested in the Janko keyboard layout then:

http://www.engadget.com/2005/03/04/music-thing-the-chromaton...

https://en.wikipedia.org/wiki/Janko_keyboard

I really want one.

Re:Why was '~' chosen to represent the home directory? by andrewflnr on Tuesday January 22, 2013 @11:44AM (#5097952)
Not quite what I had in mind, but definitely interesting.
Re:Why was '~' chosen to represent the home directory? by MartinCron on Tuesday January 22, 2013 @01:57AM (#5095945)
So do I. That looks insane,
Re:Why was '~' chosen to represent the home directory? by stephengillie on Monday January 21, 2013 @09:13PM (#5095120)
Sanity is having arrow buttons on your mouse.

(also Enter, ESC, space, delete, backspace, etc etc)

Re:Why was '~' chosen to represent the home directory? by mkl on Monday January 21, 2013 @11:02PM (#5095440)
You jest, I expect, but I've actually tried it, more or less, and it works quite well. I don't (can't) use a physical keyboard, and while I use a touch screen a lot now I used to do absolutely everything with a mouse, or, often, two mice so they don't need to be gripped so tightly, one for moving and the other (with a taped over sensor) for clicking. Then I replaced the clicking mouse with a USB numeric keypad with the keys remapped to mouse buttons, arrows, and "Enter, ESC, space, delete, backspace, etc etc". It was worse for my joints, but (obviously) a bit more efficient.
Re:Why was '~' chosen to represent the home directory? by stephengillie on Tuesday January 22, 2013 @01:53PM (#5098850)
You expect I jest, but I actually spent $120 on a Razer Naga just so I could use the reprogrammable thumb buttons.