Hacker News new | ask | show | jobs
by zzalpha 3162 days ago
I'm not sure where I came across this concept, but I've heard the use of a terminal described as entering into an interactive conversation with the computer.

That is, where users of a point-and-click interface might interact with a computer superficially, the command-line allows for a fluidity of expression and progression of intent that it's extremely difficult to supplant.

When you realize this, the mistake this comic makes is obvious: the command-line is, for many problem domains, simply a superior method of human-computer interaction. In fact, in many ways, it's the GUI that squanders the immense power we have at our fingertips, as it frequently makes it more difficult to express intent rather than less.

For example, here's a basic task: Find all files in a given directory with spaces in their names, and replace those spaces with underscores.

At a command-line I can think of any number of ways to solve this problem. I'd probably opt for a combination of find, sed, and bash looping.

Now try to do this efficiently in any existing GUI interface that isn't purpose built for this exact operation.

The conversations we enter into on the command-line allow us to iteratively build up solutions to problems, solving them with simple, composable tools. There is simply no GUI equivalent.

1 comments

The "conversation with your computer" aside (which basically comes down to "REPLs trump more static solutions"), I find that many really awesome solutions for problems came out of restrictions on resources or interaction possibilities. I assume that Vi and its text operation "language" wouldn't be invented today, even if it never existed; the modern mind wouldn't try not to use a GUI and base everything on keystrokes. It's far more likely that the according programmer would go "well that'd be a nice feature! I'll make a context menu entry for it!".

From a similar perspective: The terminal has by far the best options when it comes down to interacting with program output based on text. There's nothing comparable in the GUI world. Yes, using the terminal to edit pictures would be a Bad Idea™[1][2], but so is using a GUI to do the terminal's job. Pick adequate tools for your job - and if you refuse to: at least don't bother those who do.

[1]: Also, did anyone else note how Blade Runner features the worst user interface for any task in modern sci-fi? I'm talking about the "picture enhancement" scene. That is not the task you want to control with voice input. I imagine terminal-based solutions for image editing would have similar interactions.

[2]: Well, there's Image Magick and the like, but those excel because they're built for repeatability, not interaction.