Hacker News new | ask | show | jobs
by mixmax 4963 days ago
This might be slightly off-topic, but am I the only one that thinks that command line tools are archaic with some pretty serious drawbacks? I see and acknowledge the power they can wield in the right hands, but for mere mortals it's a terrible experience. Especially on a windows box.

I've started learning Symfony2, and the default is to get it up and running using the dependancy manager composer, a commandline based tool. I've spent a week trying to finish the simple task of installing the framework. No success. Now, I don't make a living programming, so I'm definitely at the shallow end of the programming pool. But still. A week.

There are several problems as I see it:

- No discoverability. You are given no clues whatsoever as to what commands are available to you. You have to know exactly what you want to do. Yes, you can read manpages, forum posts, etc. but finding, learning and memorising a whole set of commands used in some program you might never use again seems like a terrible waste of productive time. Without the manual you're flying blind.

- All sorts of opaque dependencies. Composer for instance apparently requires git installed for it to work. But it doesn't say that anywhere. You also need to define paths, etc. which isn't covered anywhere.

- A million minor flaws and bugs. Until now I've run up against at least a few bugs, either in composer or in some other part of the chain of software. Only opaque general warnings are given, and finding out exactly what is wrong is next to impossible.

- Terrible UI. Copying and pasting doesn't follow convention, copying from a commandline to a notepad inserts linebreaks that you have to clean up manually, there's no way to maximise the cmd.exe window. The list of basic usability flaws goes on.

This isn't meant as trolling or ranting, although I must say I'm genuinely alienated by the commandline. I understand that text is great way for programs to talk to each other, I understand that the commandline is a great way to talk to a remote server, and I understand the power that piping, etc. gives you, so it's not like I'm denouncing the power that's inherent in the tool.

The problem is that the learning curve is tremendously steep, and I just don't feel it's worth it. To do the simplest thing I need to learn how a whole ecosystem works. I also have to page the information I need together from a number of different sources that I first have to find. It's kind of like having to build a car just to ride down to the baker to get some bread. It's quicker to walk than assemble a car before you can drive.

11 comments

>> This might be slightly off-topic, but am I the only one that thinks that command line tools are archaic with some pretty serious drawbacks? I see and acknowledge the power they can wield in the right hands, but for mere mortals it's a terrible experience.

You've asked the question and answered it yourself ;-)

Using a GUI over the CLI is probably preferred for 90% of the tasks 95% of the users typically perform. I don't agree with all the drawbacks you listed, but I can see where they are coming from. The CLI is simply not so great for typical computer users.

That said, a good CLI is absolutely invaluable for power users, system adminstrators, developers, etc. There's only so much you can conveniently do through a GUI, as soon as you need to compose multiple complex actions into a script or perform advanced data extraction, search operations, automate tasks, etc. there really is no alternative for a good CLI.

The funny thing about a powerful CLI is that it isn't very accessible unless you invest quite a bit of time mastering it, but once you do, you'll find out that you can do many (most?) things more efficiently by typing up commands and composing them into scripts. Once you get proficient using the CLI, you'll find yourself using the CLI for all kinds of things you used to do through a GUI before. For example selecting and copying around files or extracting archives, personally I think CLI tools (in my case unix CLI tools) to be much more flexible and convenient than something like WinZip.

But just like most people will never use their computer to write scripts or computer programs, they will also never invest time in learning the CLI. And usually they don't really need to anyway, just like most people don't need (or want) to learn how to change the oil on their car themselves, no matter how easy it is if you know how to do it. It's not something they enjoy learning about, but that doesn't mean changing oil is useless or difficult.

The lack of a proper CLI in Windows 9x and XP has always bothered me a great deal, as a developer and power user. It was one of the main reasons to switch to Linux and later OS X. Apparently these days Windows has a pretty good CLI with PowerShell, but the Windows train has already departed a long time ago for me. But it's still a good thing Microsoft finally decided they had to provide power tools like a CLI, it's one reason less blocking me from every going back to Windows (a lot of others still remain though ;-)

That's a great reply!

The problem is that people like me, who are somewhat technically inclined but not fulltime programmers, fall in between two chairs. I need to do some reasonably advanced stuff, but I face a steep learning curve before I can do it, and I'm not sure it's worth it since it's not my main occupation.

Just a small note to your comment above, the issues you mentioned with Symphony, they are not just because you haven't "mastered" the CLI. It sounds like they are true bugs in whatever manual or documentation accompanies Symphony, and it would be a good idea to report your experience with setting it up on their issue tracking system.

I think many people often discard technologies for their implementation rather than their ideas.

Strongly agree, but nearly all of this can be fixed with better tools. Wish isn't it, but it's a step in the right direction.

For example, there's absolutely no reason why command line tool options can't be discoverable in the same way object methods in Java/C#-ish IDEs are.

If these are the problems you see with CLI, then you're doing it wrong.

- Discoverability: tab completion, apropos manpages, listing out your search path directories, using your Debian GNU/Linux distribution's package management tools to search / explain packages and commands.

- Dependencies: Debian GNU/Linux, APT, and policy. There's a reason I'm an unrepentant bigot. Debian-based distros are a fair substitute. RPM remains a pale shadow, largely for lack of policy. Proprietary operating systems have fundamental conflicts of interest which preclude an effective solution.

- Bugs: Addressed in policy and via an active user and developer community, with low barriers to communication and interaction between them. Again, Debian GNU/Linux nails this. No, it's not bug-free, but you'll find very, very few showstoppers in stable releases.

- UI: If you're not using pipes, command expansion, xargs, etc., you're mostly doing it wrong. Pasting into vim allows you to sort your linebreaks via regex replacement or any of numerous other means.

How old are you, kid?

the "kid" seems to be on windows, which ha a crappy cli in a non posix env , which makes it even more difficult to use with a cli...
Even there, a substantial number of issues can be addressed through Cygwin, though its packaging features still leave a lot to be desired.
> - No discoverability.

proper command line shells and tools offer auto-completion and inline help.

> - All sorts of opaque dependencies.

Bad or unfinished products is a concept orthogonal with command line. I've had to manually install a particular unspecified version of .NET to get some graphical application to work, for instance.

> - A million minor flaws and bugs.

Again, totally unrelated to CLI. Most applications are barely usable, for instance almost all of professional in-house applications at most companies are abysmal, though graphical.

> - Terrible UI.

Probably a unix program; you shouldn't use Notepad, it doesn't understand any other line end convention than <CR><LF>. Notepad is mostly useless, and there are many valid replacements.

> proper command line shells and tools offer auto-completion and inline help.

This is not discoverability. How will it help me figure out curl's command line options? How will it help me not having to remember whether tool X wants "command [files] [options]" or "command [options] [files]" or either? How will it help me reuse something i just ls'ed into vision without having to retype half the path i just typed into that ls command?

> How will it help me figure out curl's command line options?

Try typing "curl", the output (on Ubuntu 12.10) is: "curl: try 'curl --help' or 'curl --manual' for more information"

>How will it help me not having to remember whether tool X wants "command [files] [options]" or "command [options] [files]" or either?

Both are almost always excepted, but command [options] [files] is standard. Also, if you do something wrong, you are often given an explanation as to what you did. Also `command -h` or `man command`.

>How will it help me reuse something i just ls'ed into vision without having to retype half the path i just typed into that ls command?

Up arrow.

Those are trivially found in almost every application via `command --help` or `command /?` or worst case, "man/info command".

I feel like this is a Git conversation from several months ago all over again. The CLI is not magic. You have to invest in learning how to use it. Next we're going to hear about how Java/C#/PHP isn't intuitive or discoverable enough.

As a developer, the last point bothers me the most. Why can't I use my standard OS shortcuts with the command line?! It looks just like a text prompt, and yet it doesn't behave like one. (And I'm sorry, but bash shortcuts are ugly.)

For me, at least, the dependency issue has been resolved with automatic build systems like MacPorts. It's been a while since I had to manually seek out the dependencies for a command line program by hand.

Discoverability is very much an issue. I tried to figure out how to get ffmpeg to do something last night, and it took me hours. I find Google to be far more indispensable when using the command line than the man pages.

Despite all these issues, I still find the command line invaluable. :)

Yep, command line sucks. But it's a question of critical mass and network effects. Command line tools are always there, even when you're on some weird ssh tunneled setup. There's been a number of times when I've been fumbling with some goofy gui setup while some senior level dude is trying to help me with something and they always kind of roll their eyes and say, "Just use the command line."

I think the way most people learn these things is to have someone who knows what they're doing sit down next to them for an hour or so and explain how everything works. I suggest finding someone like that -- flailing around with google is orders of magnitude slower.

IMO the only drawback is learnability. And it is countered by the fact that you can make some serious gains in productivity with only a little time invested.

I started really investing in cygwin last year and I'm constantly moving more and more of my work into it. All my coworkers have a tedious build process that involves lots of clicking around windows explorer while mine is a two character sequence that has some other value-add factored in.

In addition to these benefits, shell tools take much less memory than gui ones, and I really notice the difference running mysql & psql on the command line vs firing up pgAdmin or MySQL workbench.

Yeah, I only learned to use the command line when I switched from windows to linux and osx. I'm now useless at anything windows, and, well, I don't ever mess around in their command line.

Besides you can never learn everything all at once, but you slowly pick things up over time as you need them. Then, one day, you wake up and the command line feels like home. My advice, don't try to learn any of it until you have a specific need of doing something, only then will you really retain anything you gleam from it. And don't try to use/learn it on windows.

Typing is always going to be faster than clicking around in an interface. Take the time to learn it. There was a time when command line was also for "mere mortals". What moved us away from that? Windows. Something to think about.
I respectfully disagree.

moving around a filesystem for instance, in a GUI based tool I click on a folder and view it's contents. In a commandline tool I type an often long path, hit enter and view a list of files and/or folders in that particular folder. If I want to move up or down I issue another command that I have to type. I don't get any visual cues as to where I am in the structure either.

I fail to see how typing 20 letters and hitting enter is easier than one click with a mouse. In respect to histoory I think that what happened was that normal users moved on to a more intuitive and faster interface for normal things.

How often are you "moving up and down" on the command-line? I usually have a few terminals open to common places that I need to be (or tabs, if that's how you roll) all with command histories applicable to each task.

Instead of 20 letters, just type the first couple, tab complete (z-shell makes this fluid) and hit enter. If some directories have a single sub directory, it's just tab-tab-tab and you're at the base.

To get a "visual cue", type pwd or have a setting for your shell that follows your directory path.

You can also set up aliases or shell variables for common paths. This has the benefit of not being cluttered (like shortcuts on a desktop) while allowing you to "cd essays" instead of "cd documents/writing/essays".

Also, there's the benefit of find/grep. If you can't remember where a file is, but you know generally where it is, cd there, find "part-you-remember" or grep -R "some unique text" and you'll get your answer soon enough. This has the benefit over full desktop search in that you get local results, so you may have to only sift through 3 or 4 "README" files instead of dozens.

Sometimes I use a graphical file browser, but mostly for images. For that, I use nautilus. But I can open nautilus from my current directory. For example, to get to my code, I can just "cd project-name; nautilus ." (having set up a variable) instead of trying to navigate there from /.

I'm not saying GUI tools are bad; I'm saying that for many tasks, the command-line is more efficient, but a GUI tool is just a command away.

I use Symfony 2 now, but I stared out with CakePHP. It has better documentation and is a less engineered than Symfony. Maybe give CakePHP a try?
Most of your complaints sound like problems with documentation (it existing and/or you using it) or problems with a poorly defined tool (edit), lol, or is specific to the Windows shell.

I can think of several GUI apps that have ALL of those problems but I also can't script them, alias them or fix them.

I spent 75% of my day in the terminal because I'm proficient and fast with it. Most of programming has a learning curve, I don't see why people expect otherwise when it comes to an interface that is every bit as powerful as a GUI but with a specific interface.

No offense but with the number of misconceptions in that post, maybe you need to spend more time with it before dismissing it out of hand. (edit) seriously, you don't know about Notepad.exe and line breaks. :/ Man... if you would spend a bit of time on tooling and learning your environment you probably wouldn't be spending half the time you are doing whatever it is you're doing. Jumping into something is fun, but for sufficiently complex things, you DO have to step back and read the manual.

Knowing what Symphony does, I'm quite sure that learning the CLI tool would be a far better use of everyone's effort than a GUI tool. This is even a place where I think the CLI tool makes exceedingly more sense to use.

edit: To be fair, if I had to use Windows default tools and a PHP generator tool all day long, my words would probably be more angry than yours.

You make some good points, let me try to answer.

First, I'm certainly not dismissing it. Yes, I'm frustrated, but I'm also aware that a lot of people much smarter than me swear by this tool, so there's obviously a lot of value there. I'm more dismayed by the learning curve. I come from a sales/marketing/ux/business kind of background so my mindset is different. I like my tools to be beautiful and intuitive. As simple as possible but no simpler as Einstein famously said.

The problem, as I see it, is that the commandline is like a marathon you have to run before you reap any rewards. Learning the commandline involves a whole sleuth of different things. Finding the right tools (I can infer from your post I obviously don't have those :-)), learning how filesystems work, unixy commands, git, cygwin, the list goes on. Seen from my perspective (and this might well be wrong) you basically have to have a good grasp of a whole boatload of ideas, technologies and concepts before a commandline tool is of any use to you. There's no easy way to learn a bit at a time. It's an either/or kind of deal.

I don't see any easy solutions to this, but I think it's a problem.

My experience is almost the complete opposite. The first time I touched the commandline was to apt-get packages in linux. Doing this invovled me learning nothing more than apt-get install, and apt-cache search.

I slowly accumulate knowledge of how to use other programs as I needed to use them (the same way I learn how to use gui programs.) The only conceptual block for me with the command-line was the concept of piping the output of one command into another.

>I don't see any easy solutions to this, but I think it's a problem.

Computers are complicated. Most users have no idea how hard. You HAVE to be willing to learn. I honestly have no idea what you expect and I don't think you do either. I don't honestly think there's anything to do.

This.

As much as I recommend that a serious power user learn and use a solid shell (bash or zsh, as my earlier comment suggests), several nines worth of users probably never will do so. Many could, though it's still probably somewhere between 10-25% of all users who would really have the aptitude to do so. And I do feel that the time invested in learning good tools on a well engineered platform pays of in spades.

That said: general-purpose computers are hard to use, very complex, and far more users know how to use them in some small way but really have little or no deep understanding of what they're doing or why. It's something that the tablet/handheld market's addressing, though I fear that the inclination to turn these into pure consumption devices will ultimately torpedo this goal.