Coworker:" ...so this openflow switch has a really great CLI tool that lets you configure all sorts of settings programatically such as..."

Boss: "I don't like CLI tools, they're too hard to use and can be unreliable. Before you do your task, can you spend a couple of weeks writing a REST API and a web interface to the network switch so you don't have to rely on CLI commands? I think that will be much better and safer."

Coworker: "Well, will you ever have to use it? I think I'll be okay with just the CLI, I actually prefer it..."

Boss: "No, the CLI is unsafe, please just write a REST API and get back to me in a couple of weeks."

Me: *dies inside*

The program they're using is closed-source. Any REST API will have to just make calls in a subprocess shell to the CLI binary.

There were just so many things wrong with the scenario I facepalmed my way out of the conference room.

  • 4
    Son of a preacher man....

    Seriously. I don't know how often I preached that CLI - if there is no module / API available - must be used careful.

    And an Rest API is not careful....

    It's an API on top of a layer on an unstable CLI command.

    *Gnaaaarrrr* Hulk smashs.......
  • 4
    "... They can be unreliable..."
    "... CLI tools are unsafe..."

    This really tells who hasn't got any idea of what they are talking about...
  • 0
    CLIs lack usability because the discoverability just isn't there. So they are unsuited for regular users. On the other hand, CLIs are easy to script, thus suited for e.g. admins.

    Since a regular user is unlikely to configure a switch, this should have been a CLI. Hopefully with a better thought out CLI than e.g. Git.
  • 2
    @Fast-Nop well my boss wanted X to create a UI for X's own personal use only. It woukd have been a massive waste of time. I've since talked him out of it, earning me thanks from X.
  • 1
    @Fast-Nop I love CLI for the discoverability though
  • 1
    @toriyaki that suggests that you don't know what discoverability even is.
  • 1
    @Fast-Nop help me discover discoverability
  • 1
    @toriyaki It means that the user can readily see which actions are possible without even knowing the program or reading the manual. At the prompt, the user doesn't see anything.

    On the other hand, it also means that the user is not drowned in a sea of meaningless options, that's why pure GUI rendering of a truckload of CLI options also falls flat.

    Both together mean that GUI design is hard and only works when you design it around a well thought-out workflow.

    This in turn usually collides with configurability, which is why e.g. compiler options are better as command line parameters. The multi-tabbed dialogues in Visual Studio are pretty horrible.

    In such a case, a setup wizard is usually better, and Clonezilla demonstrates successfully how to reach that for novices while still being scriptable for seasoned users: at the end of the wizard, it prints the resulting command line options for the next call or scripting.
  • 2
    @Fast-Nop hmm, that doesn't differ from my notion of 'discoverability'.

    I find CLI way easier to learn since it's pretty standardized. Just pass in a --help or read the man page. Whenever possible, I look at the CLI precisely to 'discover' what the app is actually capable of.

    I hate re-learning trendy GUIs every x years, along with all the hidden options (press ALT to bring up a hidden menu!), and undocumented features accessible only through keyboard shortcuts (looking at you Adobe).

    REST interfaces seem even worse. Unless you have the documentation on you. Good luck guessing the parameters in a curl request.
  • 1
    @toriyaki reading the man page is not discoverability. I mentioned specifically "without reading the manual" because the whole point of good discoverability is that you don't need to read a manual.
  • 2
    @Fast-Nop what's an example of good discoverability then?

    With GUI, I find myself googling how to do stuff.
  • 1
    @toriyaki I think you should first read what I wrote. That's the second question that I had already addressed before you asked.
  • 1
    @Fast-Nop Clonezilla Wizard? That’s not a “discoverability” example though.
  • 1
    @toriyaki of course it is. Compare walking through that wizard with the CLI string that it finally prints for possible future script use. You did use it yourself, I assume?

    Also, think about how much time it would have cost to assemble that command string just by reading the manpage.
Add Comment