Hacker News new | ask | show | jobs
by chongli 2177 days ago
blaming the user is the wrong way to go -- you just set it up wrong.

Sometimes the user is wrong. If a person drives their car into a lake and drowns, do we say that cars are broken because they allow this? Or do we point to the millions of other drivers out there and say that driving on roads (and not into lakes) is the expected user behaviour?

An extreme example, sure, but I think it also translates to software. Some people criticize vi/vim for being modal because it confuses beginners. They use this as the basis of an argument that vi is a bad way to edit text or that modal interfaces are bad in general. But tons of other people take the time to learn the vi system of modal editing and they love it so much that they write plugins for everything else in an attempt to replicate that experience. Who is wrong here?

2 comments

That vim dumps you into a screen with no guidance and where your keypresses appear to do nothing (or apparently random things!) would be the problem here. It would take very little to have it say "type :help to learn how to use this program" in the bottom of the screen when it starts up. It's also confusing because many Linux systems are set up by default to launch vim whenever another application requests an editor, even if the user uses something they are more comfortable with otherwise. This could be resolved by asking "which editor do you want to use?" instead of dumping the user into a randomly selected editor.

You can build powerful systems without confusing people who often never intended to wind up in your program in the first place. You can even build them to show people how to use them.

It would be great to have a tutorial you can run, a tutor of some kind perhaps.
> It's also confusing because many Linux systems are set up by default to launch vim whenever another application requests an editor, even if the user uses something they are more comfortable with otherwise.

  export EDITOR=/my/fancy/editor
You usually don’t figure this out until after you’ve already run into this issue.

In Windows if you open a new filetype for the first time, it asks you what application you’d like to set as the default type, and on top of that it tells you where to go to change that later. That’s what beginner friendly UX looks like, not just throwing the newborn into the pool like Linux does with Vim editing.

It is not that I don't understand the "problem" - after all, I ended my very first accidental vi session with a reboot as well. But that was 23 years ago, long before Linux/GNU distros would be installed with a GUI and then boot into a GUI.

If the "newborn" in 2020 insists on using the terminal instead of the much more beginner friendly options that are the default nowadays... granted, but why compare a terminal editor in unix to a GUI? That is like comparing apples and oranges and then complaining that the strawberries don't taste like bananas.

Throwing up a menu to provide context and ask you what you want to do, rather than assuming a default, is not some thing that only magical GUIs can do. CLIs with menus is not some crazy new thing.

As an example of how manually configuring the editor flag can be annoying, consider a job where you regularly ssh into many machines, each that just by default use vim. I know how to use vim, I just don't like it, but pretty much every single machine I have booted into always assumes I want to use vim, and even if you remember to change the flag doing it to many machines all the time is majorly annoying.

Way to miss the entire point.
That's what the EDITOR environment variable is for.
Which is great... as long as you knew about that environment variable before you got into this situation in the first place. You're not exactly told about it during the install process or "first steps" guides for any distro I'm aware of.
>do we point to the millions of other drivers out there and say that driving on roads

Cliffs, lakes, and highways often have guardrails, even if millions of cars drive by without going over the lines.

Vim, IMO, is different because it's not meant for consumption by the general public. Vim is a sysadmin tool, in unix-like environments, where the users have a general amount of competency before even encountering it. The whole rat-experiment analogy is more about stories that are public facing.