Live data from Hacker News

Ask HN: Good examples of interactive command-line user experience?

news.ycombinator.com

41–50 of 83 posts

Re: Ask HN: Good examples of interactive command-line user experience?

#41
post #34

Earlier quoted context omitted.

Sad to see this in the grey. Git is unintuitive to those who don't understand it. If you read about its internals and learn how it works, the command line gets much better. It's well documented and it gives you a whole lot of power and insight into the inner workings of the VCS. Things like launching your editor to do more complex commands, plugging a script into git bisect, these are all great design choices.

All of what you say is correct. git is great in many ways and not too difficult to use once you grok the internals. But git's user interface is inconsistent, has got weird error messages and confusing terminology with too many ways to do some things. Good thing that it has quite decent manpages which explain these things thoroughly. The UI gets the job done but it sure isn't a great example of a well designed command…

It's rough in some ways, and elegant in others. A bad error message does not a bad UX make. Good error messages are great, but remember UX is also about hitting the important points well.

Re: Ask HN: Good examples of interactive command-line user experience?

#43
post #36
post #32

There was a talk at Pycon 2017 about this [0] that's pretty good. He(amjith) goes through several examples with his favorite being bpython [1] and even covers writing such a thing in python live on stage. [0] https://www.youtube.com/watch?v=hJhZhLg3obk [1] https://bpython-interpreter.org/

Python prompt toolkit is worth a look https://github.com/jonathanslenders/python-prompt-toolkit/bl...

Yes good on you for mentioning that, as well as the other projects in the umbrella:

- pymux (tmux clone): https://github.com/jonathanslenders/pymux/

- pyvim (vim clone): https://github.com/jonathanslenders/pyvim/

Lots of community-driven CLI tools with superb autocompletion:

- ptpython: http://github.com/jonathanslenders/ptpython/

- pgcli: http://pgcli.com/ + mycli: http://mycli.net/

- complete shells: xonsh (http://xon.sh/) + ergonomica (https://ergonomica.github.io/)

Re: Ask HN: Good examples of interactive command-line user experience?

#45

I would recommend that you check out the Heroku CLI Style Guide: https://devcenter.heroku.com/articles/cli-style-guide There are many different teams within Heroku that need to provide interactions for developers via CLI whether its for dynos or data services. The guide was a way to codify building a consistent interaction that all product managers and engineers could follow. Disclaimer: I work for heroku.

One thing not mentioned there is exit statuses. I think they're just as important a thing to think about, up there with what arguments to accept.

Thanks for the feedback! I'll see if we can get that in the guide.

Re: Ask HN: Good examples of interactive command-line user experience?

#46
post #13

Earlier quoted context omitted.

For the love of your chosen deity, please do not take git as a good example to base your CLI UX on..

Why is it bad? Genuine question, and please don't give me the "it's so unintuitive" answer, that's why programs come with documentation.

That's not why programs come with documentation. Documentation helps, but being intuitive in usage is something completely different. Intuitive means you can either do the simplest operations without reading the docs, or that you can figure it out as you go from the context clues. Git does neither. You need to learn about the model, the operations, the repo / staging / checkout / remote areas to complete the most trivial "modify-commit-push" workflow.

Git as a command will not help you.

Re: Ask HN: Good examples of interactive command-line user experience?

#47
post #6

git

Sad to see this in the grey. Git is unintuitive to those who don't understand it. If you read about its internals and learn how it works, the command line gets much better. It's well documented and it gives you a whole lot of power and insight into the inner workings of the VCS. Things like launching your editor to do more complex commands, plugging a script into git bisect, these are all great design choices.

There is even a science paper showing that "for most people Git is a magic black box they whisper obscure spells into": http://www.ppig.org/sites/default/files/2014-PPIG-25th-Churc...

Re: Ask HN: Good examples of interactive command-line user experience?

#48
post #13

Earlier quoted context omitted.

For the love of your chosen deity, please do not take git as a good example to base your CLI UX on..

I think there are a number of great things to learn from the git UX. - sub commands (and sub sub commands) provide a high level abstraction over the many different tools and features. The "toolkit" approach allows for easy expansion and refactoring of individual features, and is entirely pluggable by end users. It even provides tools to interface seamlessly (git rev-parse --parseopt; rev-parse is amazing and allows y…

> Help flags and interactive messages and descriptions and suggestions of what to do next. Have you ever performed an interactive rebase? Or resolved a merge commit? Or corrected a tracking branch?

Yes to all. Then I showed it to people new to git. And saw them fail week after week. They got into states they didn't expect, didn't understand, and didn't see expected feedback. Clever people who needed to blow away the repo to get to a known state in the easiest way. The most common problem was making a new commit in the middle of a rebase, and accidental committing or blowing away conflicts on pull. Next was switching the branch during an interactive operation and basically ending up with unknown state.

You listed many things which make git powerful, but a good ux is something different. It requires good, consistent context, clear boundaries between expected and unexpected operations (why can you checkout during rebase, for example?), and discoverability. If you interact with enough developers, you'll get asked "what do I do? I don't know what just happened" - and that's the mark of bad ux.

Re: Ask HN: Good examples of interactive command-line user experience?

#49

Earlier quoted context omitted.

Sad to see this in the grey. Git is unintuitive to those who don't understand it. If you read about its internals and learn how it works, the command line gets much better. It's well documented and it gives you a whole lot of power and insight into the inner workings of the VCS. Things like launching your editor to do more complex commands, plugging a script into git bisect, these are all great design choices.

There is even a science paper showing that "for most people Git is a magic black box they whisper obscure spells into": http://www.ppig.org/sites/default/files/2014-PPIG-25th-Churc...

I question this study's sample size and diversity.

Git was made by and made for kernel hackers to support the Linux kernel. It has an expectation that the user understands how their computer works and wants a tool catered to that knowledge. The average web developer writing Ruby or Node in Atom on their Macbook Pro isn't in the target audienece. For someone in git's target audienece, it's a great tool with far better UX than any other VCS - because it gets out of your way and gives you powerful tools for mucking with the VCS to suit your needs precisely. THIS is what makes for a good UX. A tool that's easy to learn is great, but if it can't be mastered and bent to the user's will then I'd rather take one that's hard to learn but accomodating of the master.

Re: Ask HN: Good examples of interactive command-line user experience?

#50
Midnight Commander and its spiritual predecessors going all the way back to Norton Commander and Volkov Commander are marvellous examples of TUI.

They're intuitive, interactive, come with embedded help, and use text mode to present a sophisticated, productive interface.

Post reply on HN