Hacker News new | ask | show | jobs
by Curmudgel 4262 days ago
Well, yes and no. If you want to look at something very small, you have to learn how to use a microscope. It's not that hard to learn how to use a simple microscope, and you can make adjustments by thinking about the physical principles, which are universal. And if a certain type of microscope isn't suitable, you can always change or someone can design a better one.

The *nix command line is not based on physical law. There is no mathematical or physical reason that human-computer action has to be through an underpowered, user hostile design that requires lots of unnecessary memorization. People use it because everyone does. You can come up with a better design, but you'll still have to use the old design if you want to interact with anyone else.

Edit: By "underpowered", I mean that passing byte streams and parsing them is less powerful than passing objects. And this is made worse by the fact that different commands have different output syntaxes.

4 comments

If the command line were underpowered, it would have been abandoned decades ago. It's still around precisely because it's incredibly powerful, and nobody has come up with a suitable replacement that doesn't involve sacrificing a lot of power.

Further, all of the "No, obviously this would work much better!"s have been tried already. Dozens of times, if not hundreds. Some of them you can even download right now. Nevertheless, the command line persists. It may not be perfect in every detail, but it's far harder to exceed than it seems at an initial, frustrated glance. If you hope to someday so replace it, it would be wise to understand exactly why that is, lest your effort completely fail in exactly the same way as so many prior attempts.

It's not that the commandline is necessarily underpowered, imo, it's that the discoverability and intuitiveness of the *nix userland is pretty low. Man pages are a great way to document every flag a program accepts, but are a terrible way for someone to figure out some simple use case for the program. Similarly, flags are named without any regard for intuitiveness (-l is liable to mean different things for any program you encounter, and the precise meanings one program decided on can be hard to remember because there is no explicit commonality with any other tool).

In that sense, it absolutely is a user hostile design and it involves lots of unnecessary memorization.

It's unintuitive if you come from Window-GUI-land. It's plenty intuitive that should consult the manual within UNIX-land.

Remember, intuition is not some inborn instinct. It's a product of training. To a user of MULTICS, iOS is wildly unintuitive.

Yes, by no means consider my post a defense of every quirky detail of history. My point is more that one must start by correctly identifying the problems before one could hope to solve the problems, and "lack of power" is definitely not it.
The command line is the heart of Unix and Friends, which is why it wasn't abandoned decades ago. And it's almost impossible to replace the *nixes because of network effects and extraordinarily high costs.

The command line is "powerful" because it is "simple" in the sense that it doesn't really do anything for you. Commands have their own input and output syntax based on their needs and it's up to the user to figure out how to fit it together. I think one having standard serialization format, so that you wouldn't have to waste time learning and thinking about each command's special little syntax would be much more powerful.

I use command lines maybe once a month. For almost everything, it has been replaced. For those places it hasn't, I blame the tool for not automating some process that could have easily been automated.
I absolutely live at the command line, and when I'm forced into a walled garden I blame the tool for not properly exposing its functionality to the rest of the system so I can easily automate it the way I want it automated.

Edited to add:

Note that this isn't a claim that anyone else (in particular) is Doing It Wrong - it's what works for me, I'm sure there are other points in the space that work as well or better for others. That, itself, should not be taken as a claim that every point in the space is equivalent - that's not true either. What I do strongly refute is any notion that the command line is "under powered" in general.

Used to be me. But I got sick of remembering all the arcane stuff. Now its a pulldown menu away in an IDE.
That reads a bit odd.

"I used to be fluent in French. But I got sick of remembering all the arcane stuff. Now it's just pages away in a phrase book."

Probably you were never really fluent in French in the first place. Which is to say, you were never really entirely comfortable at the shell. Which is fine - as I said, I don't assert that it's the best fit for everyone. But for me, just like producing English doesn't feel like I'm "remembering arcane stuff" neither does producing Bash, even though I fully recognize that objectively both are plenty weird.

That's just wrong. I've written shells. I've written tools. I started in this business before IDE's existed. Some folks grow out of it, some stay because its so cool to know what all those switches mean.
Some days I wish someone would have already created a tool to do all of the stuff I needed to do.
They did, you just have to do a bunch of command-line bullshittery to get it to work.
That day, no one will pay you to do what you do.
> (...) underpowered, user hostile design that requires lots of unnecessary memorization.

User hostile I can understand. Underpowered is just plain false. Parsing log files, relating data between them and aggregating results is a common task for any decent sysadmin. I know no interface as powerful (measured as the ratio of information quality over time spent) as the Unix command line.

Many powerful interfaces have ultra steep learning curves. The Unix shell is one of them. Steep learning curves are a flaw, of course, but they do not invalidate the other qualities of the interface.

>an underpowered, user hostile design

In your opinion, of course. Many of us find the * nix command line not only elegant and highly-productive, but actually enjoyable.

In fact, the only Linux command line tools that I did not immediately start using in a highly productive manner are `tar` and `find`, arguably two of tools that least abide by the ideals of * nix command line tools (I've since gotten used to `find`, but `tar` may always send me searching for my personal wiki's corresponding entry[1]).

If you want to argue that there are better ways to program on the console, I grant that it's possible -- although as mentioned, I find the composability of * nix tools to be an almost magically productive approach.

But to condemn anyone to a life of GUI tools is not only going to drastically increase their chance of developing carpal tunnel syndrome, but also inevitably will slow down their work flow -- often drastically. It's simply not possible for even an experienced user to point and click with a mouse as fast as an fluent typist can issue commands on the terminal.

1. http://xkcd.com/1168/

I too love the CLI, but I wish someone would go through and standardize flags, naming, ordering concerns, long-form arguments, etc across all of the POSIX tools. GNU put in some effort here, but in my opinion they didn't go far enough and non-GNU operating systems (BSD, OSX, etc) are missing out.

Actually, as much as I dislike Apple, they're probably one of the few entities that could pull off something like this.

Honestly I feel like most Unix command-line tools are pretty good. I can make a good guess what "-n" and "-i" will mean on a new Unix tool based on context.

The git commands are a big exception; it's like each individual git command was written by its own committee, each deep with NIH syndrome. The one example I remember is two different git tools having a different way of colorizing their output.

I so agree with you. The only thing I hate about the *nix userland is that all tools follow their own set of arbitrary concerns regarding the things you mentioned. Really limits the intuitiveness and discoverability of the system.
I don't think Apple could. Their influence on serverland is virtually nil.
Part of the reason that people still use the *nix style interface is that the large number of people who thought they'd come up with a better design were actually wrong about that. It's harder than it looks.