Developer UI Done Right: Mercurial Commandline!

Developer tools are famous for having bad usability. In Code Complete Steve McConnell listed this as a case of 'the cobbler's children go barefoot'. (A fancier term for the same effect is 'vocational irony.' you know, like House MD).

But here's a case where User Experience in a very very developer-specific tool is surprisingly polished, in a way that you wouldn't quite expect.

Follow along if you will...

I'm using mercurial and I decide my work is ready to be pushed. At this point, the stack of tasks in my head (the things I'm trying to achieve) just says "push."

I try to push.

C:...>hg push
pushing to ...
searching for changes
abort: push creates new remote head a751ec334b3e!
(you should pull and merge or use push -f to force)

Interesting! It failed, but not in the typical 'pages and pages of angry red error messages' way. Instead I get a one line error description and then this delicious hint -- I can use 'pull and merge' to get past the problem.

(Note that I've elided any personal details, and hashes have been modified to protect the innocent)

So now the stack in my head says "pull, merge, push".

So I pull.

C:...>hg pull
pulling from ...
searching for changes
adding changesets
adding manifests
adding file changes
added 2 changesets with 1 changes to 1 files (+1 heads)
(run 'hg heads' to see heads, 'hg merge' to merge)

This succeeded nicely. But again there is a hint. Having performed the pull, it looks like I need to merge.

The hint reinforces what the previous command told me and helps me to confidently move in the direction I was already headed. (Or: it serves to remind me that I need to merge, in case I had forgotten). The stack in my head now says "merge, push."

I attempt the merge.

C:...>hg merge
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)

It tells me the merge succeeded. This is pretty spectacular all by itself, but for users of distributed version control systems it's a common enough occurrence, so I'll skip over that bit. Again, I get a neat little hint. It reminds me to commit before I do anything else. So the stack in my head now says "commit, push"

I attempt to commit...

C:...>hg commit
...

This last command gives me only happy messages, which I've not included as they're of no interest. There is no hint what to do this time, as mercurial does not remember that my ultimate goal here was to push. But I haven't forgotten that simple goal. So I try the last remaining step: I push.

C:...>hg push
pushing to ...
searching for changes
adding changesets
adding manifests
adding file changes
added 2 changesets with 1 changes to 1 files

And everything is right in the world.

There's something just so neat about the hand-holding that mercurial performs throughout the exercise. I want to pick it up and cuddle it and rub my nose against its little nose.

(of course frequent mercurial users will know shorter and slightly better ways to achieve this same thing, but these little step by step hints are completely adequate for the occasional user like me.)

Now why was all of this amazing? As I said, it's a developer tool, so that's already a good reason to expect poor UI.

But secondly, it's an open source tool. There is a belief that open source software favours usability less than other things.

Third, the hints that were so helpful are a form of documentation. And open source projects very often get criticised for their lack of documentation. Again we have a nice counter example.

Fourth -- it's a commandline tool! A commandline tool! This is a category of software that is not known for being helpful and forgiving to the beginner or infrequent user. Yet mercurial is demonstrating a way in which it is possible to be kind to such users.

All up: I continue to find it nice on a whole bunch of levels. Hat tip to mercurial.

(Next article in this series: "Mercurial And How To Undo a 'hg -forget *' Command, Or, Mercurial, You Evil Unusable Bastard, Why Hast Thou Forsaken Me? Undo! Undo!")

 

I'm currently writing a book about how to build your first product. If building a product is something you'd like to do, then sign up to be notified when the book is available.

Your comment, please?

Your Name
Your Url (optional)
Note: I may edit, reuse or delete your comment. Don't be mean.