One of the most salient features of our Tech Hiring culture is that there is so much bullshit. Everyone knows this. Each of us contributes his share. But we tend to take the situation for granted.
vim has become a meme for being harder to quit than smoking or alcohol
but is it really fair though?
Here is how you can quit vim
:quit
Save changes to "/private/tmp/hello.txt"?
[Y]es, (N)o, (C)ancel:
the : part opens a command palette much like in visual studio code or IntelliJ
quit seems like... utterly reasonable.
then the user may have unsaved change, what's the right thing to do? That's ...asking to save, discard or cancel. Utterly reasonable as well.
So what's the big deal?
One issue is code golf : developers striving to advertize the shortest possible solution that solves a particular problem (quitting without saving). So they will tell you to use :q! . Code golf is bad. Strives for clarity, not for shortness.
But the true issue is UNIX's masterfully simple yet evil decision to let each program decides what it feels is the best way to quit for himself.
That seems high minded. Aren't app developers adults?
Adults don't approach decision making this way. Instead, to evaluate whether a decision is good, they look at and only care about one thing: the effects of that particular decision has in the real world:
Here the decision forces the user to recommeber:
want to quit vim? that's :q! for ya'
want to quit nano? That's ^X N. Supposedly much easier?
want to quit man? that's q. Shorter than vim, code golf win!
want to quit emacs? That's C-x C-c
want to quit python? That's >>> quit()
want to quit node? That's .exit
want to quit perl ? That's ^c
want to quit telnet? That's ^]. For some reason?
want to quit a ssh session? That's exit
want to quit echo <<HERE ? That's HERE
want to quit a java program? That's sometimes killall java
want to quit something with kill? often programs will choose themselves how to interpret your signals, very nice and handy
I am sure I forget some, but it's enough I think to see the masterfully evil decision UNIX made.
How to quit a program in Unix?
vim has become a meme for being harder to quit than smoking or alcohol
but is it really fair though?
Here is how you can quit vim
:part opens a command palette much like in visual studio code or IntelliJquitseems like... utterly reasonable.So what's the big deal?
One issue is code golf : developers striving to advertize the shortest possible solution that solves a particular problem (quitting without saving). So they will tell you to use
:q!. Code golf is bad. Strives for clarity, not for shortness.But the true issue is UNIX's masterfully simple yet evil decision to let each program decides what it feels is the best way to quit for himself.
That seems high minded. Aren't app developers adults?
Adults don't approach decision making this way. Instead, to evaluate whether a decision is good, they look at and only care about one thing: the effects of that particular decision has in the real world:
Here the decision forces the user to recommeber:
:q!for ya'nano? That's^X N. Supposedly much easier?man? that'sq. Shorter than vim, code golf win!emacs? That'sC-x C-cpython? That's>>> quit()node? That's.exitperl? That's^ctelnet? That's^]. For some reason?sshsession? That'sexitecho <<HERE? That'sHEREkillall javakill? often programs will choose themselves how to interpret your signals, very nice and handyI am sure I forget some, but it's enough I think to see the masterfully evil decision UNIX made.
The evil decision being to not take any decision.
Which is also a decision.
And often a very bad one.
How to quit
ed? That'sq:)