Developer UI Done Right: Mercurial Commandline!
secretGeek .:dot Nuts about dot Net:.
home .: about .: sign up .: sitemap .: secretGeek RSS

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!")





'Matt' on Mon, 16 Jul 2012 22:49:18 GMT, sez:

Your article made me sit back and take a moment to think about the development process that would lead to Mercurial's status methods.

As a Java developer, I spend a lot of time thinking about logging and proper exception handling. However, I don't often think about how the developer who comes after me will use the command-line tools I develop as part of a project.

Thinking about WHEN exceptions are triggered, and WHAT the tool's user should do when they are, is a step beyond proper exception handling much like change control and commit policies are a step beyond merely using source control.



'Matt Casto' on Tue, 17 Jul 2012 01:57:18 GMT, sez:

Today I did my first mercurial commit, so this post is very timely. At my office people are using TortoiseHg and Kiln, but I think I prefer the command line so far. Maybe that will change as I get more used to things.



'Nathan Evans' on Tue, 17 Jul 2012 12:51:08 GMT, sez:

And this is a great example why Mercurial is, IMO, better than Git. 95% of the power, none of the hilariously geeky ceremony.

Mercurial CLI is so easy to use that even junior developers can use it.



'togakangaroo' on Tue, 17 Jul 2012 18:54:25 GMT, sez:

One of the big (ok, HUGE) reasons that I prefer Mercurial to Git.

An interesting side-note. The Fogcreek guys have written the 'gestalt' plugin to help guide people even further. The basic idea is that at any time you can type 'hg next' and it will analyze, your working directory, heads, and origin to give you a hint of what the next step in the workflow is.

It's listed as a 'kiln' extension but it works just fine on bare-metal Hg.

https://developers.kilnhg.com/Code/Kiln/Group/Kiln-Extensions/File/tests/test-gestalt.py?rev=tip



'Pitarou' on Fri, 20 Jul 2012 01:56:28 GMT, sez:

I tried the Haskell platform on Windows recently, and found that the CLI would suggest corrections to my typos. For instance, if I type "zip_with" it might say, "Did you mean 'zipWith'?"

Do any other modern tools / languages have that feature?




name


website (optional)


enter the word:
 

comment (HTML not allowed)


All viewpoints welcome. Incivility is not tolerated, such comments are deleted.

 

I'm the co-author of TimeSnapper, a life analysis system that stores and plays-back your computer use. It makes timesheet recording a breeze, helps you recover lost work and shows you how to sharpen your act.

 

NimbleText - FREE text manipulation and data extraction

NimbleText is a Powerful FREE Tool

I wrote this, and use it every day for:

  • extracting data from text
  • manipulating text
  • generating code

It makes you look awesome. You should use NimbleText, you handsome devil!

 

Articles

The Canine Pyramid The Canine Pyramid
Humans: A Tragedy. Humans: A Tragedy.
ACK! ACK!
OfficeQuest... Gamification for the Office Suite OfficeQuest... Gamification for the Office Suite
New product launch: NimbleSET New product launch: NimbleSET
Programming The Robot from Diary of a Wimpy Kid Programming The Robot from Diary of a Wimpy Kid
Happy new year 2014 Happy new year 2014
Downtime as a service Downtime as a service
The Shape of Your Irrationality The Shape of Your Irrationality
This is why I don't go to nice restaurants any more. This is why I don't go to nice restaurants any more.
A flowchart of what programmers do at work all day A flowchart of what programmers do at work all day
The Telepresent Man. The Telepresent Man.
Interview with an Ex-Microsoftie. Interview with an Ex-Microsoftie.
CRUMBS! Commandline navigation tool for Powershell CRUMBS! Commandline navigation tool for Powershell
Little tool for making Amazon affiliate links Little tool for making Amazon affiliate links
Extracting a Trello board as markdown Extracting a Trello board as markdown
hgs: Manage Lots of Mercurial Projects Simultaneously hgs: Manage Lots of Mercurial Projects Simultaneously
You Must Get It! You Must Get It!
AddDays: A Very Simple Date Calculator AddDays: A Very Simple Date Calculator
Google caught in a lie. Google caught in a lie.
NimbleText 2.0: More Than Twice The Price! NimbleText 2.0: More Than Twice The Price!
A Computer Simulation of Creative Work, or 'How To Get Nothing Done' A Computer Simulation of Creative Work, or 'How To Get Nothing Done'
NimbleText 1.9 -- BoomTown! NimbleText 1.9 -- BoomTown!
Line Endings. Line Endings.
**This** is how you pivot **This** is how you pivot
Art of the command-line helper Art of the command-line helper
Go and read a book. Go and read a book.
Slurp up mega-traffic by writing scalable, timeless search-bait Slurp up mega-traffic by writing scalable, timeless search-bait
Do *NOT* try this Hacking Script at home Do *NOT* try this Hacking Script at home
The 'Should I automate it?' Calculator The 'Should I automate it?' Calculator

Archives Complete secretGeek Archives

TimeSnapper -- Automated Screenshot Journal TimeSnapper: automatic screenshot journal

25 steps for building a Micro-ISV 25 steps for building a Micro-ISV
3 minute guides -- babysteps in new technologies: powershell, JSON, watir, F# 3 Minute Guide Series
Universal Troubleshooting checklist Universal Troubleshooting Checklist
Top 10 SecretGeek articles Top 10 SecretGeek articles
ShinyPower (help with Powershell) ShinyPower
Now at CodePlex

Realtime CSS Editor, in a browser RealTime Online CSS Editor
Gradient Maker -- a tool for making background images that blend from one colour to another. Forget photoshop, this is the bomb. Gradient Maker



[powered by Google] 

How to be depressed How to be depressed
You are not inadequate.



Recommended Reading


the little schemer


The Best Software Writing I
The Business Of Software (Eric Sink)

Recommended blogs

Jeff Atwood
Joseph Cooney
Phil Haack
Scott Hanselman
Julia Lerman
Rhys Parry
Joel Pobar
OJ Reeves
Eric Sink

InfoText - amazing search for SharePoint
LogEnvy - event logs made sexy
Computer, Unlocked. A rapid computer customization resource
Aussie Bushwalking
BrisParks :: best parks for kids in brisbane
PhysioTec, Brisbane Specialist Physiotherapy & Pilates
 
home .: about .: sign up .: sitemap .: secretGeek RSS .: © Leon Bambrick 2006 .: privacy

home .: about .: sign up .: sitemap .: RSS .: © Leon Bambrick 2006 .: privacy