← Back to context

Comment by egberts1

1 year ago

Why did a single person tossed out decades of CLI wisdoms devised by many gray-beards?

Bring back the verb-last CLI.

    systemctl rsyslog stop
    systemctl rsyslog start

Don't be suggesting `^op^art` over up-CtrlW This is worse than pacman.

Because this is awful? The way most other tools work is <command> <subcomand> <sub-subcommand> --option=argument argument.

There are so many ways to recall the command you typed from history... I don't understand your complains at all.

  • You must not be an sysadmin

    • I work in a company that creates (admittedly crappy) product for sysadmins (I have no say in design though, so don't blame that on me). I work in the infra / automation, so close to sysadmin, but not quite.

      So, this isn't a foreign world to me... I still don't think that:

      1. Starting a service is a big issue in general (most of the time this happens automatically anyways).

      2. The command syntax of systemcl is defective in any way. Of all things that might be problematic with systemd, this is just not in the list at all. It's such a bizarre complaint to have... kind of like arguing whether "gray" or "grey" is the right way to spell it. Really, it's a whatever. There are much larger issues, even when it comes to comfort, not functionality of systemd tools. Like, for example, the autogenerated names of device units. I hate trying to recall the rules for writing these, and on top of that, having to escape characters just to type the unit's name. That's just a ridiculous design.

    • Ah yes, famously one can only be a sysadmin if they're unable to use a different cli verb order.

      Come on now. Either present a real argument or accept the fact that tooling isn't forever going to be frozen to what you used in your 20's. Newer tooling uses newer best practices and the improved verb order is part of that.

I think this isn't shoddy engineering; I think you disagree with a design tradeoff that was consciously made here.

If CLIs are designed around facilitating the easiest means of editing the most commonly-edited word, different programs will end up with semantically very different CLIs. In some programs, the "noun" (e.g. file path) will be the thing most frequently edited. In some others, like systemctl, it'll be the "verb", like start/stop. That means that different programs designed around this principle will be semantically extremely inconsistent with each other.

On the other hand, if consistency of "base_command sub_command --subcommand-arg sub_sub_command --option argument" is taken as the guiding principle, many different tools will act semantically similarly. This enables unfamiliar users (talking first-time users or people who have just opened the manpage for the first time) to intuit the right way to present commands to those tools, rather than expecting them to memorize (or re-look-up as needed) each one's specific semantics.

While there's merit to both, I think the second one--systemd's CLI approach--is better. Put another way: the user-centric and consistent (with other applications) design are sometimes at odds in this way. A tool that is hyper-focused on optimizing the most common tasks for its (power) users risks oddball status and hostility to new users. It's important to pick a point on the spectrum that appropriately balances those two concerns. Python ("There should be one-- and preferably only one --obvious way to do it") and the Apple HIG ecosystem both understand the truth of this: that it is sometimes necessary to trade away efficiency for familiarity/consistency. There's a reason Perl languished while Python grew.

Like, I get it. I've been a sysadmin/devops for decades, and the paper cuts add up. But it's easy to forget the paper cuts I'm not getting: modern tools are (generally, with exceptions) more consistent; there are fewer commands that are resistant to memorization and need to be looked up each time; fewer commands that lead to questions like "wait, is it 'cmd help subcommand', 'cmd --help subcommand', or 'cmd subcommand --help'? Am I going to have to Google how to get the help output of this command?"

Cause you can manipulate multiple services in a single command? Not a big deal when you're looking at one or two services but when you've got a 5 to 15 interlinked and interdependent services and in situations where you may not want to restart everything, it's nice to just have one CLI with tab completion to deal with that.

Are there other cases of verb-last besides pre-systemd init systems?

apt-get/yum/dnf install foo git add file

And the normal CLI utilities: rm/touch/cat/ls/mv/cp etc are all verbs, and they act on nouns that come last.