IanG on Tap

Ian Griffiths in Weblog Form (RSS 2.0)

Blog Navigation

July (2014)

(4 items)

April (2014)

(1 item)

March (2014)

(1 item)

January (2014)

(2 items)

November (2013)

(2 items)

July (2013)

(4 items)

April (2013)

(1 item)

February (2013)

(6 items)

September (2011)

(2 items)

November (2010)

(4 items)

September (2010)

(1 item)

August (2010)

(4 items)

July (2010)

(2 items)

September (2009)

(1 item)

June (2009)

(1 item)

April (2009)

(1 item)

November (2008)

(1 item)

October (2008)

(1 item)

September (2008)

(1 item)

July (2008)

(1 item)

June (2008)

(1 item)

May (2008)

(2 items)

April (2008)

(2 items)

March (2008)

(5 items)

January (2008)

(3 items)

December (2007)

(1 item)

November (2007)

(1 item)

October (2007)

(1 item)

September (2007)

(3 items)

August (2007)

(1 item)

July (2007)

(1 item)

June (2007)

(2 items)

May (2007)

(8 items)

April (2007)

(2 items)

March (2007)

(7 items)

February (2007)

(2 items)

January (2007)

(2 items)

November (2006)

(1 item)

October (2006)

(2 items)

September (2006)

(1 item)

June (2006)

(2 items)

May (2006)

(4 items)

April (2006)

(1 item)

March (2006)

(5 items)

January (2006)

(1 item)

December (2005)

(3 items)

November (2005)

(2 items)

October (2005)

(2 items)

September (2005)

(8 items)

August (2005)

(7 items)

June (2005)

(3 items)

May (2005)

(7 items)

April (2005)

(6 items)

March (2005)

(1 item)

February (2005)

(2 items)

January (2005)

(5 items)

December (2004)

(5 items)

November (2004)

(7 items)

October (2004)

(3 items)

September (2004)

(7 items)

August (2004)

(16 items)

July (2004)

(10 items)

June (2004)

(27 items)

May (2004)

(15 items)

April (2004)

(15 items)

March (2004)

(13 items)

February (2004)

(16 items)

January (2004)

(15 items)

Blog Home

RSS 2.0

Writing

Programming C# 5.0

Programming WPF

Other Sites

Interact Software

Windows Vista Task Dialog

Wednesday 21 December, 2005, 05:59 PM

We developers are, on the whole, a lazy breed. It goes with the territory, I think. And I’m not talking about common low-grade laziness here. I’m referring to total commitment laziness: being prepared to put in an extraordinary amount of effort to avoid doing something.

The canonical test for this is to make someone perform a task that will take 8 hours of repetitive work to perform in Excel. The non-programmer will just do the work. But a natural developer will be too lazy to do the work. Instead she will spend 7.5 hours writing a program to automate the task.

And even if the task would only have taken 3 hours, a real developer will still spend 7.5 hours writing an automated version. This transcendental form of laziness - being prepared to expend more effort than necessary simply because you’re too lazy to do the work - is what I’m talking about.

For the most part, it’s a Good Thing: the ability to notice and avoid unnecessary work is a useful trait in an engineer. However, it has its downsides.

When Laziness Goes Bad

While laziness in the name of avoiding repetition is all well and good, a mindless preference for the path of least resistance is not so useful. Take the MessageBox API for example - if you need to get certain kinds of input from the user, MessageBox has its attractions. Particularly when you look at your options this way:

  1. Devise a dialog especially for the task at hand. Prototype it. Run usability tests, focus groups, etc. Employ graphic designers to create a visual design for the dialog. Get developers to implement the dialog and the code behind it. Re-employ graphic designers to explain to the developers exactly how they failed to execute on the exquisitely-crafted design vision. Get developers to re-implement the dialog. Iterate the last couple of steps until it looks right and works, or until nobody cares any more. Ship it!
  2. Call the MessageBox API. Ship it!

To the naively lazy mind, the second option looks much more appealing. The problem is it can result in a pretty crummy user experience. Here’s a particularly egregious but not exactly unusual example:

Ambiguous yes/no dialog

If you don’t see the problem, then I’m guessing you’re a developer. ;-) (Hint: what exactly am I agreeing to if I click Yes at this point?)

Poor wording notwithstanding, this style of interaction is always likely to be sub par. The buttons labels bear no direct relationship to what will happen when you click on them. (I’m guessing that the first panel in this comic from usability site OK/Cancel is poking fun at this widespread poor design practice.)

Enlightened Laziness

Anyone truly committed to laziness will find this unacceptable. Every time such a dialog appears, we are making the user expend some mental effort to map between the generic Yes/No labels and the outcome. If your software gets used a lot, the sheer volume of unnecessary work this generates is unbearable. Oh! The humanity!

Clearly the efficient (i.e. lazy) solution is to provide a UI that doesn’t require the user to translate Yes and No into Save and Discard. We should just make the buttons say what they mean. And as mentioned in the my previous entry (on command links) the Vista style guidelines encourage us to move in this direction.

While in the long run, making life easier for our users will easily balance out the initial effort required at development time, the mere presence of extra effort at any stage will surely set your lazy senses tingling. In an ideal world, we could offer the improved user experience without having to write a dialog from scratch. Wouldn’t that just be heaven?

Lazy Nirvana

Enter Vista’s new Task Dialog.

Just like MessageBox, the Task Dialog saves you from building a custom dialog from scratch. But it gives you the option of building a better dialog than you can with MessageBox.

It still lets you build one exactly like MessageBox if that’s what you want...

Yes/no task dialog

(And yes, thank you film buffs, I know that’s not the line from the film. But the real line wouldn’t have made sense in context, would it now?)

OK, so it’s not exactly the same. It’s a slightly different icon. We’ve lost the redundant disabled close button. Also, notice how the grey section at the bottom has a slightly darker line at the top, which is rounded off at the edges. And more interestingly, we have a main question and a note beneath it. This lets you ask the question succinctly, and then provide a slightly more verbose explanation beneath if necessary.

But that’s not terribly interesting as it still suffers from the same basic problem as the previous dialog: meaningless button labels. That’s what you get if you use the basic TaskDialog API - a slight upgrade on the basic message box.

But with only a little more work we can use TaskDialogIndirect. (If you’re familiar with Win32 dialogs, this name might make you think you need to supply a dialog template. In fact you don’t. You just supply a data structure with some settings and a list of the buttons you’d like.) This API offers all sorts of variations on style, including the ability to use Command Links, the new style of button discussed in my previous entry. Here are the results:

Task dialog

There are a variety of options on offer. You can use normal buttons if you prefer. You can show a progress bar. You can add in a collapsible section to contain more detailed information for users who would like to see it without cluttering things up for everyone else. You can add radio buttons and a checkbox if you really must. And you can embed hyperlinks in any of the text fields. (Although not the text of the buttons, since buttons already do something when you click on them - embedding hyperlinks would just be confusing.)

Obviously you wouldn’t want to switch all of these features on at once. (Except perhaps to see what it looked like. And yes I did. I’d describe the result as: crowded.) Just pick the options that make sense for your scenario. And you’ll never want to use MessageBox again!

Copyright © 2002-2013, Interact Software Ltd. Content by Ian Griffiths. Please direct all Web site inquiries to webmaster@interact-sw.co.uk