<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>unitstep.net &#187; user interface</title>
	<atom:link href="http://unitstep.net/blog/category/user-interface/feed/" rel="self" type="application/rss+xml" />
	<link>http://unitstep.net</link>
	<description>the home of peter chng</description>
	<lastBuildDate>Mon, 01 Mar 2010 02:28:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Separating UI from implementation</title>
		<link>http://unitstep.net/blog/2009/07/05/separating-ui-from-implementation/</link>
		<comments>http://unitstep.net/blog/2009/07/05/separating-ui-from-implementation/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 02:21:10 +0000</pubDate>
		<dc:creator>Peter Chng</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[user interface]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[ui]]></category>

		<guid isPermaLink="false">http://unitstep.net/?p=960</guid>
		<description><![CDATA[I saw this comic about usability (linked from this question at Stack Overflow) and couldn&#8217;t help but let out a distressed laugh.  How often have you seen this happen at your workplace, or in an application you&#8217;ve had the &#8220;pleasure&#8221; of using? For every elegantly designed UI that exists, there seems to be a [...]]]></description>
			<content:encoded><![CDATA[<p>I saw <a href="http://stuffthathappens.com/blog/2008/03/05/simplicity/">this comic about usability</a> (linked from <a href="http://stackoverflow.com/questions/84556/whats-your-favorite-programmer-cartoon">this question at Stack Overflow</a>) and couldn&#8217;t help but let out a distressed laugh.  How often have you seen this happen at your workplace, or in an application you&#8217;ve had the &#8220;pleasure&#8221; of using? For every elegantly designed UI that exists, there seems to be a plethora of poorly designed ones that do their best to confuse users.</p>
<p>To me, a lot of this UI complexity stems directly from a lack of separation between the UI and business logic layers.</p>
<h2>Proper separation</h2>
<p>As developers, we&#8217;re accustomed to the best practices of modularity and separating the implementation from the interface.  This has lead to such patterns as MVC and Interface Oriented Design.  However, when it comes to <strong>designing</strong> the UI layer, these rules sometimes aren&#8217;t followed.  This is why we end up with overly complex &#8220;Search&#8221; pages, offering every option under the Sun, and configuration dialogs/screens with a <a href="http://developers.slashdot.org/comments.pl?sid=102620&#038;cid=8744744">one-to-one relationship</a> to settings files or some other underlying implementation detail under the guise of &#8220;letting the user decide what they want&#8221;.</p>
<p>Without clear UI planning, this one-to-one relationship tends to rear its ugly head more often.  Take our first example of a &#8220;Search&#8221; page.  In most applications, the search functionality is interacting with some sort of a database backend, most likely a SQL RDBMS.  The lazy approach is to design the search form based on the format of the SQL query itself.  This is how we get search forms with multiple fields, drop-down boxes and so forth &#8211; <strong>because this format translates almost directly into a SQL query; </strong> i.e. of the form <code>WHERE col1 LIKE... AND col2 LIKE...</code></p>
<p>Just because this is easier for the developer, doesn&#8217;t mean it&#8217;s the best solution for the end user.  In fact, it&#8217;s often the case that this is the exact opposite.  </p>
<h2>Thinking like a user</h2>
<p>In general, users don&#8217;t care about the implementation of your application or how it stores data.  They shouldn&#8217;t have to know about the columns of the table where the data is stored, so why make a search form that exposes this? Instead, you need to understand what your users want and how they&#8217;re most likely to use your application.  This isn&#8217;t an easy task, as <a href="http://mpt.net.nz/archive/2004/05/23/design">many have pointed out</a>.</p>
<p>This is where I think most UI problems come from &#8211; a misunderstanding of what users want.  This isn&#8217;t to say that these developers are dumb or careless; but just that when it comes to empathizing with their users, they often are unable to because they know their own software and have such an intimate view of it from a coder&#8217;s perspective. </p>
<p>Take the example of <a href="http://qttabbar.wikidot.com/">QTTabBar</a>, a Windows Explorer extension written in .NET that adds many useful features such as tabs, etc. to the interface.  It is an excellent extension and does things very well, but the options page is a complete nightmare.</p>
<p class="image">
<a href="http://unitstep.net/wordpress/wp-content/uploads/2009/07/ui-implementation-1.jpg"><img src="http://unitstep.net/wordpress/wp-content/uploads/2009/07/ui-implementation-1-250x300.jpg" alt="ui-implementation-1" title="ui-implementation-1" width="250" height="300" class="alignnone size-medium wp-image-972" /></a>
</p>
<p>There are just too many options on this one page; what do they all mean? Furthermore, there are nine more tabs, each with roughly the same number of additional options! This is far too complicated, and I&#8217;m guessing most people will never have a use for all of these options.</p>
<p>Of course, it&#8217;s completely unfair of me to pick on <a href="http://qttabbar.wikidot.com">QTTabBar</a> in this manner, considering it&#8217;s written by one guy who has chosen to give it away for free.  And, as I mentioned before, it&#8217;s a very useful utility that I can wholeheartedly recommend.</p>
<h2>A simple story</h2>
<p>Take a simply example, where we want to search a set of <em>items</em>, each of which have four separate properties &#8211; <em>name, description, <acronym class="uttInitialism" title="Uniform Resource Locator">URL</acronym></em> and <em>tags</em>.  The items are displayed on screen with all of the four properties shown.  The naive way would be to provide a search form that had fields for each property and allow users to search that way.</p>
<p>But with this simple (albeit contrived) example, there is an obviously simpler solution.  Since all of the four pieces of information about an item are shown onscreen, it would be much better just to provide a single search field whose input would be used to search all four properties, returning all items that had a match in any of the properties.  From a user&#8217;s point of view, this makes sense, since they are searching through what they know they can see and interact with. </p>
<p>If an advanced search was needed, it could be added later, but I would only do this if I knew it was absolutely needed by users, since the simple case is likely good for >90% of your users.</p>
<hr/>Copyright &copy; 2010 <strong><a href="http://unitstep.net">unitstep.net</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact <strong><a href="mailto:webmaster@unitstep.net">webmaster@unitstep.net</a></strong> for more information.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">Plugin</a> by <a href="http://www.taragana.com/">Taragana</a></span>]]></content:encoded>
			<wfw:commentRss>http://unitstep.net/blog/2009/07/05/separating-ui-from-implementation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lowering the barrier to entry to attract users</title>
		<link>http://unitstep.net/blog/2009/04/11/lowering-the-barrier-to-entry-to-attract-users/</link>
		<comments>http://unitstep.net/blog/2009/04/11/lowering-the-barrier-to-entry-to-attract-users/#comments</comments>
		<pubDate>Sun, 12 Apr 2009 03:04:06 +0000</pubDate>
		<dc:creator>Peter Chng</dc:creator>
				<category><![CDATA[browsers]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[user interface]]></category>
		<category><![CDATA[registration]]></category>
		<category><![CDATA[users]]></category>

		<guid isPermaLink="false">http://unitstep.net/?p=829</guid>
		<description><![CDATA[
Flickr photo by greensambaman
There&#8217;s an interesting article out that points to the fact that every day there are 10,000 canceled installations for Firefox; this meaning that each day 10,000 people download the Firefox installer, &#8220;fire up&#8221; the *.exe and then click &#8220;Cancel&#8221;.  (A further 40,000 apparently downloaded the setup file, but didn&#8217;t even make [...]]]></description>
			<content:encoded><![CDATA[<p class="image align-right note less"><a href="http://www.flickr.com/photos/8509160@N02/1260589897/" title="Flickr photo by greensambaman"><img src="http://unitstep.net/wordpress/wp-content/uploads/2009/04/barrier-stop.jpg" alt="Flickr photo by greensambaman" title="Flickr photo by greensambaman" width="200" height="133" class="size-full wp-image-830" /></a><br />
Flickr photo by greensambaman</p>
<p>There&#8217;s an interesting article out that points to the fact that every day there are <a href="http://blog.mozilla.com/metrics/2009/03/31/why-people-dont-install-firefox-part-i/">10,000 canceled installations for Firefox</a>; this meaning that each day 10,000 people download the Firefox installer, &#8220;fire up&#8221; the *.exe and then click &#8220;Cancel&#8221;.  (A further 40,000 apparently downloaded the setup file, but didn&#8217;t even make it far enough to start and then subsequently cancel the installation)</p>
<p>Even more interesting were the <a href="http://blog.mozilla.com/metrics/2009/04/06/why-people-dont-install-firefox-part-iii/">reasons why the 10,000 canceled their install</a>.  A large part of the respondents were &#8220;confused&#8221; with some part of the install process (nearly half) while most of the other half identified that they did not have the proper permissions to complete the install.</p>
<h2>Not simple enough?</h2>
<p>The results seem to indicate that the installation process is not as easy as it could be.  However, it&#8217;s dismiss the results by saying that Firefox is already <em>easy enough to install</em>, because after all, how hard can it be to just click &#8220;Next&#8221; a few times? But this ignores the central problem, that is, assuming everyone is technically proficient enough to find such things routine.</p>
<p>For example, to a mechanic an oil change would likely be an easy five-minute operation.  For someone like me, who&#8217;s rarely popped open the hood of a car, much less done anything underneath it, such a task would likely entail reading a manual (or just Googling for the answer), then carefully following the steps one-by-one; I&#8217;d be lucky to get the whole thing done within 30 minutes.</p>
<p>The same can be said for software installation.  Something that seems routine for most developers or power users may only seem routine because we&#8217;ve dealt with it countless times, or because we&#8217;ve dealt with more daunting situations that required manual workarounds and hacks in order to get things working.  One person&#8217;s routine can be another person&#8217;s out-of-this-world experience.</p>
<h2>The value of feedback</h2>
<p>This is why Mozilla is actively taking steps to improve the process by <a href="http://blog.mozilla.com/metrics/2009/04/02/why-people-dont-install-firefox-part-ii/">collecting feedback from users who canceled the installation</a>.</p>
<p>Users who canceled could optionally provide the reason why they canceled, how the installation made them &#8220;feel&#8221; as well as any suggestions or comments they had.  This formed the basis for the feedback results Mozilla compiled:</p>
<p class="image"><a href="https://wiki.mozilla.org/images/7/74/Kampyle_dash_full.png"><img src="http://unitstep.net/wordpress/wp-content/uploads/2009/04/mozilla-firefox-cancel-feedback.jpg" alt="mozilla-firefox-cancel-feedback" title="mozilla-firefox-cancel-feedback" width="400" height="427" class="alignnone size-full wp-image-835" /></a></p>
<p>The fact that a significant percentage of the respondents were &#8220;confused&#8221; shows that they are some issues that the installer could make easier.  The vast majority of this confusion stemmed from the fact that installer could not close an existing/running Firefox process, a step required for the installation/upgrade to proceed.  This is a legitimate technical issue that can hopefully be solved.</p>
<h2>Installation rights</h2>
<p>The other significant factor, based on user feedback, was the lack of permissions required to install Firefox.  Normally, Firefox requires administrative privileges on the machine in order to install it.  This wasn&#8217;t a problem during the days of Windows XP, when users by default had these rights, but with the advent of Windows Vista this is no longer the case.  Instead, users will typically be hit with a UAC prompt when trying to install software, which may deter them from completing the installation if they are unsure or unaware of what it means, something that is exacerbated by a user&#8217;s inexperience.</p>
<p><a href="http://www.tgdaily.com/html_tmp/content-view-41972-140.html">This article by TG Daily</a> shows how some other browsers have simplified the installation process.  Apple has started to <a href="http://www.tgdaily.com/content/view/37801/118/">bundle Safari as an &#8220;update&#8221;</a> in an aggressive attempt to gain market share, while Google&#8217;s Chrome uses a lightweight online installer to speed up the installation process.  </p>
<h2>Easy or flexible?</h2>
<p>Chrome&#8217;s installation approach is particularly remarkable in how it works.  It requires less user intervention and furthermore, installs itself in the current user&#8217;s <code>Application Data</code> folder, which does not trigger a UAC prompt.  (This also means that it must be installed for <em>each user</em> on a system, rather than being installed on a system-wide basis)  Google also installs its updater, which runs in the background to keep any Google software up to date on the target system.  Such a system is highly convenient for non-technical users, who don&#8217;t want to be bothered with manually keeping things up to date, but has <a href="http://blog.wired.com/business/2009/02/why-googles-sof.html">drawn complaints from those more technically-oriented</a>.</p>
<p>This highlights the differences a developer faces when creating an installation procedure.  Typically, developers will lean towards providing the end user with as many options as possible because it&#8217;s the easiest way to solve a design decision.  Can&#8217;t decide between X and Y?  Let the user choose!  This also goes along with the philosophy of power users, (a group that developers are pretty much a subset of), who like to know <strong>exactly</strong> what&#8217;s being installed on their system and what&#8217;s being done to it.</p>
<p>This contrasts with the needs of the typical user, who just wants the software to install as seamlessly as possible.  I&#8217;ll have to admit, the Chrome installation procedure irked me a little, as I was more comfortable with the &#8220;normal&#8221; Firefox installation procedure, which gave you the option of where you wanted to install the software, etc.  But ultimately, the Chrome installation process likely worked for 95+% of the users, so in the end that way wins out.</p>
<h2>Lowering the barrier</h2>
<p>Much can be learned from these results if you&#8217;re trying to get users to sign up for a service.  In many ways, the process for signing up a user is like the process of getting the user to install software.  Both require the user to entrust their resources to your service, and both require them to go through a series of steps.  If the user <strong>really</strong> wants your service, they&#8217;re likely to put up with more of a hassle, but in general your aim is just to get them to try out what you&#8217;re offering, so you have to make things as simple as possible.</p>
<p>This is what I&#8217;ve tried (not sure if I&#8217;ve accomplished) with the <a href="http://runtrackr.com/users/register">RunTrackr registration</a> process.  Obviously, there are changes/improvements to be made.  If the service were to get more popular, I&#8217;d have to implement more anti-spam/anti-bot measures, some of which might impede usability.  But in general, I like the one-step registration process.</p>
<p>One of the things I decided from the get-go was to allow users to <a href="http://runtrackr.com/routes/add">create routes</a> <em>without registering</em>; this lowers the barrier required for them to create content and allows them to try out the service before committing to registration.  However this has resulted in a lot of &#8220;unowned&#8221; routes created as an initial use.  Following this, even if the user registers, they are unable to &#8220;claim ownership&#8221; of the route.  One improvement I&#8217;d like to make is to tie in a &#8220;quick registration&#8221; option after the unregistered user has created their first route, allowing them to register and claim ownership of that route.  I haven&#8217;t figured out the best way to do this, though.</p>
<p>However, I&#8217;ve been looking at <a href="http://www.kijiji.com/">Kijiji</a> as an example of how this might be done. Kijiji is a localized online classified ads site, owned by eBay, and it allows users to post wanted/for-sale ads without registration.  (The user must enter an email address to provide confirmation, as an anti-spam measure)  However, after posting an ad, Kijiji makes it easy for that user to quickly register in one step and claim ownership of the ad they&#8217;ve just created.  I suppose this is easy, since they already have the user&#8217;s e-mail address, but I would still like to implement something similar to improve the user experience.</p>
<hr/>Copyright &copy; 2010 <strong><a href="http://unitstep.net">unitstep.net</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact <strong><a href="mailto:webmaster@unitstep.net">webmaster@unitstep.net</a></strong> for more information.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">Plugin</a> by <a href="http://www.taragana.com/">Taragana</a></span>]]></content:encoded>
			<wfw:commentRss>http://unitstep.net/blog/2009/04/11/lowering-the-barrier-to-entry-to-attract-users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript Event Delegation</title>
		<link>http://unitstep.net/blog/2009/02/19/javascript-event-delegation/</link>
		<comments>http://unitstep.net/blog/2009/02/19/javascript-event-delegation/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 03:47:44 +0000</pubDate>
		<dc:creator>Peter Chng</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[XHTML]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[user interface]]></category>
		<category><![CDATA[event delegation]]></category>

		<guid isPermaLink="false">http://unitstep.net/?p=720</guid>
		<description><![CDATA[JavaScript Event Delegation is a technique you may have heard of.  It&#8217;s a different way of using event handlers that offers clear benefits and is becoming more popular amongst web developers.  I&#8217;ll give a brief overview of event delegation in JavaScript, along with why you should consider it.  Note that this tutorial [...]]]></description>
			<content:encoded><![CDATA[<p>JavaScript Event Delegation is a technique you may have <a href="http://www.danwebb.net/2008/2/8/event-delegation-made-easy-in-jquery">heard of</a>.  It&#8217;s a different way of using event handlers that offers clear benefits and is becoming more popular amongst web developers.  I&#8217;ll give a brief overview of event delegation in JavaScript, along with why you should consider it.  Note that this tutorial will use the great <a href="http://jquery.com">jQuery</a> library (v. 1.3.1) for most examples.</p>
<h3>Delegation</h3>
<p><a href="http://en.wikipedia.org/wiki/Delegation_pattern">Delegation</a> is a fairly well-known design pattern.  In short, it is a way for a method to produce its result simply by calling a method on another object, thus <em>delegating</em> responsibility to that object to provide the functionality needed by the method.  For example, a <code>Cashier</code> object could store a delegate object called <code>Calculator</code>.  Calling <code>Cashier.addToTotal(value)</code> would simply delegate to the contained object, calling <code>Calculator.addToTotal(value)</code>.  </p>
<p>How is delegation different than <em>inheritance</em>?  With inheritance, the subclass inherits all of the functionality/behaviour of the parent class.  You may not want or need this; in the preceding example, it would not make sense to have <code>Cashier</code> extend from <code>Calculator</code> simply because we wanted the <code>addToTotal()</code> behaviour/functionality.  Delegation allows the behaviour advertised by a certain object/class to be provided by another.</p>
<h3>Traditional Event Handling</h3>
<p>In order to understand event delegation in JavaScript, we should first look briefly at how events are handled traditionally.  When I talk of <em>traditional event handling</em>, I am referring to the model that most will know.  In this model, functions are <strong>individually</strong> bound to events of certain elements.  For example, to make all links turn bold upon clicking them (and prevent them from being followed), we could use some JavaScript like this:</p>
<pre><code>window.onload = function()
{
  links = document.getElementsByTagName('a');
  for (var i = 0; i &lt; links.length; ++i)
  {
    links[i].onclick = makeBold;
  }

}

function makeBold()
{
  this.style.fontWeight = 'bold';
  return false;
}</code></pre>
<p>The key point with this example is that the function <code>makeBold()</code>, our <em>event handler</em>, is <strong>bound to each and every</strong> <code>a</code> element.  From a resource point of view, this is may be a bad thing because the more event handlers that are attached, the more memory that is used, in general.</p>
<p>Of course, I promised I&#8217;d be using jQuery, and doing so cleans up the above code substantially, as well as making it cross-browser compatible: (Besides adding a ton of other abilities and making life easier)</p>
<pre><code>jQuery(function()
{
  jQuery('a').click(makeBold);
});

function makeBold(e)
{
  e.preventDefault();
  jQuery(this).css('font-weight', 'bold');
}</code></pre>
<p>While this code is cleaner, it still does basically the same thing as above, that is, the event handler function <code>makeBold()</code> is bound to <strong>each</strong> matched element, that is, each <code>a</code> element.</p>
<p>As a final note, don&#8217;t confuse my use of the term <em>traditional</em> with <a href="http://www.quirksmode.org/">Peter-Paul Koch&#8217;s</a> excellent guide to JavaScript event registration, where he uses the term <a href="http://www.quirksmode.org/js/events_tradmod.html"><em>traditional</em> to refer to one <em>method</em> of event registration</a>, distinct from inline registration and the later <a href="http://www.w3.org/" class="ubernym uttInitialism"><acronym class="uttInitialism" title="World Wide Web Consortium">W3C</acronym></a> and Microsoft &#8220;Advanced&#8221; event registration models.</p>
<h3>Event handling using delegation</h3>
<p>By contrast, <strong>event delegation</strong> uses a single (or comparatively few) event handlers to implement the behaviour required.  This takes advantage of two key features of JavaScript events, namely <strong><a href="http://www.quirksmode.org/js/events_order.html#link3">event bubbling</a></strong> and the <strong><a href="http://docs.jquery.com/Events/jQuery.Event#event.target">target event</a></strong>.</p>
<p><strong>Event bubbling</strong> is a model for how events take place on the page.  It grew out of a need to resolve the order in which events were triggered on ancestor and descendant elements.  For example, assume that I have two event handlers, one attached to the &#8220;click&#8221; event of a <code>div</code> and another attached to the &#8220;click&#8221; event of an <code>a</code> element <strong>within</strong> that <code>div</code>.  If I click the <code>a</code> element, which event fires first?  Event bubbling is one way to solve that question: It states that the event on the <strong>inner</strong> element happens <em>first</em>, and then the event &#8220;bubbles&#8221; upwards to trigger events on ancestor or container elements.  There is another opposing model that works in the opposite way, but bubbling seems to be better supported and is more relevant for this article.</p>
<p>Here&#8217;s a crude diagram of event bubbling, using a pseudo-<a href="http://www.w3.org/TR/CSS21/box.html"><acronym class="uttInitialism" title="Cascading Style Sheets">CSS</acronym> box model</a> of sorts:</p>
<p class="image">
<img src="http://unitstep.net/wordpress/wp-content/uploads/2009/02/javascript-event-delegation.png" alt="Event Bubbling Diagram" title="Event Bubbling Diagram" width="302" height="228" class="size-full wp-image-747" /><br />
Event bubbling diagram
</p>
<p>The <strong>event target</strong> is the DOM element that issued the event, or the originating element.  This is why I believe it&#8217;s a confusing term, since it would make more sense to called it the <em>event source</em>.  But I digress.  The <a href="https://developer.mozilla.org/En/DOM/Event">event object</a>, passed to an event handler as an argument (or available via <code>window.event</code>, though jQuery normalizes this) contains a property, <code>event.target</code>, that allows you to get the reference to the &#8220;target&#8221; element that the event started bubbling up from.</p>
<h3>How it&#8217;s implemented</h3>
<p>All of this is typically accomplished by registering a single event handler to a &#8220;container&#8221; element that holds all of the elements we wish to react to events for.  When an event is triggered on one of the inner elements, it &#8220;bubbles up&#8221; to the container element, where it triggers the event handler function.  From there, we can inspect the source of the event (confusingly called the <em>event target</em>) and then react accordingly.</p>
<p>This is where the delegation aspect comes into play.  Since the container element may hold many inner elements, it is unlikely that we would want the same behaviour for each element when an event was triggered on it.  For example, we might want certain <code>a</code> elements to trigger one action when clicked, while wanting another set of <code>a</code> elements to trigger another action.  We&#8217;d typically differentiate these links by using separate class names or by context and then attaching event handlers as appropriate.</p>
<p>Using event delegation, process is similar, but instead of attaching multiple event handlers we have one on the overall parent element.  When this event handler is triggered, we determine which element triggered the event and then based on this, delegate the remainder of the processing to another function.  An example would be helpful now, as our previous examples with making some text bold weren&#8217;t too useful.  Here&#8217;s the <a href="http://www.w3.org/MarkUp/" class="ubernym uttInitialism"><acronym class="uttInitialism" title="eXtensible HyperText Markup Language - HTML reformulated as XML">XHTML</acronym></a> fragment for the container and elements.</p>
<pre><code >&lt;div class="container"&gt;
&lt;ul class="top"&gt;
  &lt;li&gt;
    &lt;a href="#" class="expandList"&gt;Item A - Click to toggle&lt;/a&gt;
    &lt;ul class="hide"&gt;
      &lt;li&gt;Sub-item 1&lt;/li&gt;
      &lt;li&gt;Sub-item 2&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;a href="#" class="expandList"&gt;Item B - Click to toggle&lt;/a&gt;
    &lt;ul class="hide"&gt;
      &lt;li&gt;Sub-item 1&lt;/li&gt;
      &lt;li&gt;Sub-item 2&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href="#" class="remove"&gt;Item C - Click to remove&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#" class="remove"&gt;Item D - Click to remove&lt;/a&gt;&lt;/li&gt;
&lt;/div&gt;</code></pre>
<p>And here&#8217;s the JavaScript:</p>
<pre><code>jQuery(function()
{
  jQuery('div.container').click(handleEvent);
});

function handleEvent(e)
{
  // Obtain the source element through event.target.
  var target = jQuery(e.target);

  // Now decide what to do with it.
  if (target.is('a.expandList'))
  {
    // We use Function.call() to set the context for the `this` keyword.
    return expandList.call(target, e);
  }
  else if (target.is('a.remove'))
  {
    return remove.call(target, e);
  }
  else
  {
    // Otherwise, allow the default action to take place.
    return true;
  }
}

function expandList(e)
{
  e.preventDefault();

  // The `this` keyword now references the jQuery object representing the
  // target, since that is what we set the context to.
  jQuery(this).parent('li').find('ul.hide').slideToggle('fast');
}

function remove(e)
{
  e.preventDefault();
  jQuery(this).parent('li').fadeOut('normal', function(){jQuery(this).remove()});
}</code></pre>
<p>With this example, the steps are clearly outlined.  First, we attach the overall event handler to the container element; events that take place on its inner or children element will bubble up to it.  When an event is received, we inspect <code>event.target</code> to determine the origin and based on that, &#8220;hand off&#8221; to another function to carry out the proper behaviour. </p>
<p>With some standardization of the <acronym class="uttInitialism" title="Cascading Style Sheets">CSS</acronym> class names you use and the associated event handler function names, you can clean up this code to reduce duplication and turn it into a design pattern of sorts.  In fact, that&#8217;s <a href="http://www.danwebb.net/2008/2/8/event-delegation-made-easy-in-jquery">exactly what Dan Webb has done</a>.</p>
<h3>More advantages of event delegation</h3>
<p>Besides potentially using less resources by having less event handlers bound, event delegation brings one other significant advantage: <strong>The ability to have event handlers &#8220;auto bind&#8221; to new DOM elements</strong>.  For example, let&#8217;s say we were to dynamically update the DOM and add more list items to our previous example; this sort of action happens frequently during Ajax operations where you want to present new content to the user.  </p>
<p>In the &#8220;traditional&#8221; event handling model, the new elements <strong>would not automatically respond to events</strong> as you would like.  This is because the events were individually bound to each element.  This is <a href="http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_AJAX_request.3F">a well known problem</a>.  However, in event delegation, since there&#8217;s only one event handler bound to the <strong>container or ancestor element</strong>, the newly-created elements will respond to the event properly! This is because an event on them &#8220;bubbles&#8221; up to the container element just as for the original elements.</p>
<h3><a href="/projects/javascript-event-delegation/javascript-event-delegation.html">Demo of Event Delegation</a></h3>
<p>Perhaps <a href="/projects/javascript-event-delegation/javascript-event-delegation.html">a little demo</a> is needed.  With this demo, you can see both the implementation of event delegation as well as the effect of adding new elements.</p>
<h3>Drawbacks of event delegation</h3>
<p>I&#8217;ve already talked about some of the benefits (fewer bound event handlers, so less resources used and the ability to adapt with DOM changes), but it&#8217;s worthwhile to iterate over some of the drawbacks.  </p>
<ol>
<li>Firstly, not all elements &#8220;bubble up&#8221; in the way described.  The <code>blur</code>, <code>focus</code>, <code>change</code> and <code>submit</code> are notable exceptions so you will not be able to use event delegation with these events in the manner described in this article.</li>
<li>Furthermore, the code developed to maintain event delegation can be more complicated to understand than with just using the traditional model.  Indeed, there is an initial investment time everyone must make to get going.  This should obviously be considered since code maintenance is always important.</li>
<li>Because there&#8217;s one event handler being called for all events on inner/descendant elements, there can be some performance implications.  If you&#8217;re calling expensive functions within this event handler, the event processing could slow down significantly.  Careful optimization may be required.</li>
</ol>
<p>However, some of these drawbacks can be mitigated by using solutions developed by the jQuery community.  Even though event delegation is somewhat new, there are already plugins available that take a lot of the grunt-work out of event delegation, abstracting away the details and making things easier for you.  Even jQuery itself also supports event delegation through a built-in function as of v1.3.  Here are some options for pre-built solutions:</p>
<ul>
<li><a href="http://www.danwebb.net/2008/2/8/event-delegation-made-easy-in-jquery">Dan Webb&#8217;s Delegate Plugin</a><br />
This is a fairly straightforward way to implement delegation and it&#8217;s easy to setup and understand.</li>
<li><a href="http://docs.jquery.com/Events/live#typefn">jQuery&#8217;s built in <code>live()</code> function</a><br />
This supports a subset of events but is good enough for most uses.</li>
<li><a href="http://plugins.jquery.com/project/livequery">The Live Query plugin</a><br />
This is your best bet if you need the most functionality, though I haven&#8217;t personally tried it out yet.</li>
</ul>
<h3>Conclusion</h3>
<p>Delegation nicely solves the problem of having to rebind events after adding new elements to the DOM.  For that reason alone, I&#8217;ve started to use in my work more often.  At its heart, it&#8217;s a useful design pattern, but should be only with full understanding of the pros and cons.  I hope you enjoyed reading this article!</p>
<h3>References</h3>
<ol class="note less">
<li><a href="http://www.danwebb.net/2008/2/8/event-delegation-made-easy-in-jquery">Event Delegation Made Easy</a></li>
<li><a href="http://usabletype.com/weblog/event-delegation-without-javascript-library/">Event delegation without a JavaScript library</a></li>
<li><a href="http://www.sitepoint.com/blogs/2008/07/23/javascript-event-delegation-is-easier-than-you-think/">JavaScript Event Delegation is Easier than You Think</a></li>
<li><a href="http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_AJAX_request.3F">Why do my events stop working after an <acronym class="uttAcronym" title="Asynchronous Javascript And XML">AJAX</acronym> request?</a></li>
</ol>
<h4>Revisions</h4>
<ul class="note less">
<li>2009-02-20: Added a crude diagram of event bubbling</li>
</ul>
<hr/>Copyright &copy; 2010 <strong><a href="http://unitstep.net">unitstep.net</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact <strong><a href="mailto:webmaster@unitstep.net">webmaster@unitstep.net</a></strong> for more information.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">Plugin</a> by <a href="http://www.taragana.com/">Taragana</a></span>]]></content:encoded>
			<wfw:commentRss>http://unitstep.net/blog/2009/02/19/javascript-event-delegation/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Getting Feedback with UserVoice</title>
		<link>http://unitstep.net/blog/2008/11/30/getting-feedback-with-uservoice/</link>
		<comments>http://unitstep.net/blog/2008/11/30/getting-feedback-with-uservoice/#comments</comments>
		<pubDate>Sun, 30 Nov 2008 23:12:11 +0000</pubDate>
		<dc:creator>Peter Chng</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[feedback]]></category>
		<category><![CDATA[social]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[user interface]]></category>
		<category><![CDATA[web2.0]]></category>
		<category><![CDATA[customers]]></category>
		<category><![CDATA[users]]></category>
		<category><![CDATA[uservoice]]></category>

		<guid isPermaLink="false">http://unitstep.net/?p=580</guid>
		<description><![CDATA[
When developing any application, getting proper user feedback during the early stages is essential if you want to have the application suit your customers&#8217; needs.  Often this is done with staged tests, but with web applications you can have the benefit of using an online method of retrieving your users&#8217; opinions. 
However, doing so [...]]]></description>
			<content:encoded><![CDATA[<p class="image align-right"><img src="http://unitstep.net/wordpress/wp-content/uploads/2008/11/uservoice.jpg" alt="" title="uservoice" width="180" height="48" class="alignnone size-full wp-image-582" /></p>
<p>When developing any application, getting proper user feedback during the early stages is essential if you want to have the application suit your customers&#8217; needs.  Often this is done with staged tests, but with web applications you can have the benefit of using an online method of retrieving your users&#8217; opinions. </p>
<p>However, doing so can be tricky.  If you want to get feedback, you can implement your own system for soliciting it, however, this takes up extra time that could be used to further develop your core web application.  Alternatively, there are some existing online services that can provide survey-like questionnaires to users, but honestly, these present more trouble to the user than they&#8217;re worth.</p>
<p>When I first started using <a href="/blog/2008/11/15/stack-overflow-is-a-great-community-and-resource/">Stack Overflow</a>, I noticed that the feedback service they had been using, <a href="http://uservoice.com/">UserVoice</a>, was an elegant and functional solution to this problem.</p>
<p>UserVoice takes care of the problem for you, by providing you with an easy-to-use comment and feedback forum.  (It can also be a place where users can submit bug reports, as well) However, it&#8217;s more than just a forum: By allowing users to &#8220;vote&#8221; on particular topics, it allows clustering of the most popular ideas/requests, thus bringing them to your attention the most.  It also helps prevent duplicate topics from being submitted, and is a great &#8220;Digg-style&#8221; way of using the &#8220;wisdom of the crowds&#8221;, as they say.</p>
<p>There are some drawbacks, of course.  If you&#8217;re using it to allow users to submit bugs, I wouldn&#8217;t rely on it as your sole bug tracker.  Instead, I&#8217;d use it to receive the reports, then parse through and verify them before adding them to a proper bug tracker (like <a href="http://trac.edgewall.org/">Trac</a>) where they can be better integrated into your development work-flow.  Furthermore, if you have a popular site, the feedback forums can still become deluged in too many requests/ideas, but that is a problem no matter what type of system you&#8217;re using for feedback.  And, as mentioned before, the voting system helps to bring to your attention the most popular ones so that you can further make a value judgment.</p>
<p>I&#8217;ve since <a href="http://runtrackr.uservoice.com/">launched a feedback forum</a> for <a href="http://runtrackr.com">RunTrackr</a>, my side project for the past little while.   I encourage you to give UserVoice a try, since it&#8217;s so easy to get started &#8211; you&#8217;re literally up and running inside of two minutes.  At a minimum, give their home page a visit &#8211; it does a great job of explaining the process in a simple and easy-to-understand manner.</p>
<hr/>Copyright &copy; 2010 <strong><a href="http://unitstep.net">unitstep.net</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact <strong><a href="mailto:webmaster@unitstep.net">webmaster@unitstep.net</a></strong> for more information.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">Plugin</a> by <a href="http://www.taragana.com/">Taragana</a></span>]]></content:encoded>
			<wfw:commentRss>http://unitstep.net/blog/2008/11/30/getting-feedback-with-uservoice/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google changes iGoogle, making gadget development more profitable</title>
		<link>http://unitstep.net/blog/2008/10/20/google-changes-igoogle-making-gadget-development-more-profitable/</link>
		<comments>http://unitstep.net/blog/2008/10/20/google-changes-igoogle-making-gadget-development-more-profitable/#comments</comments>
		<pubDate>Tue, 21 Oct 2008 02:48:45 +0000</pubDate>
		<dc:creator>Peter Chng</dc:creator>
				<category><![CDATA[advertising]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[user interface]]></category>
		<category><![CDATA[apps]]></category>
		<category><![CDATA[gadgets]]></category>
		<category><![CDATA[igoogle]]></category>

		<guid isPermaLink="false">http://unitstep.net/?p=475</guid>
		<description><![CDATA[
On Thursday, Google rolled out an update to its personalized home page service, iGoogle.  Among other UI updates, the major new features were increased flexibility in what &#8220;gadgets&#8221;, the personalized &#8220;chunks&#8221; that make up an iGoogle start page, can do.  This, in turn, allows developers much more freedom with what they can provide [...]]]></description>
			<content:encoded><![CDATA[<p class="image align-right"><img src="http://unitstep.net/wordpress/wp-content/uploads/2008/10/igoogle.jpg" alt="" title="igoogle" width="167" height="55" class="alignnone size-full wp-image-481" /></p>
<p>On Thursday, Google <a href="http://googleblog.blogspot.com/2008/10/whats-new-with-igoogle.html">rolled out an update</a> to its personalized home page service, <a href="http://www.google.com/ig">iGoogle</a>.  Among other UI updates, the major new features were increased flexibility in what &#8220;gadgets&#8221;, the personalized &#8220;chunks&#8221; that make up an iGoogle start page, can do.  This, in turn, allows developers much more freedom with what they can provide to the user through an iGoogle gadget.</p>
<p>Previously, gadgets could only occupy a small box that took up only a third of the screen.  While this was okay for reading headlines or perhaps glancing at stock prices, it limited the usefulness of gadgets and the information that could be provided.  For more detail, users would often have to click a link in the gadget that would take them away from iGoogle.  While this is perhaps the proper use of a &#8220;start page&#8221;, Google may now see things differently.</p>
<h3>Life is a great big canvas</h3>
<p>Gadgets now offer a near full-size &#8220;canvas&#8221; mode, where the gadget is expanded to take up most of the screen.  This allows more information to be displayed and makes the iGoogle page less of a start page and more of an aggregator &#8211; like an <acronym class="uttInitialism" title="Really Simple Syndication">RSS</acronym> reader, but with much more.</p>
<p>Speaking of <acronym class="uttInitialism" title="Really Simple Syndication">RSS</acronym> readers, any <acronym class="uttInitialism" title="Really Simple Syndication">RSS</acronym> feeds on iGoogle can now be expanded into a full-feed view, using a layout/interface not unlike that of Google Reader, their specialized <acronym class="uttInitialism" title="Really Simple Syndication">RSS</acronym> reader product.  All of these enhancements are designed to help you get the information you want, <strong>without</strong> having to leave iGoogle.  </p>
<p>Some good examples of gadgets taking full advantage of the new functionality offered by the new iGoogle include the <a href="http://www.gasbuddy.com/">GasBuddy</a> gadget, which display a small labeled map of local gas prices in the &#8220;mini&#8221; mode, which expands to a fully-searchable map complete with a clickable legend in the full-screen canvas mode.</p>
<p>Google&#8217;s own products, such as the Gmail and Google Calendar gadgets, have also been updated to nicely take advantage of the new abilities.  In canvas mode, each gadget expands to fill the screen with pretty much the same UI as their respective web applications.  This makes accessing your various Google Account services easier and decreases load times.</p>
<h3>Content and Money</h3>
<p>Others include the Wall Street Journal&#8217;s gadget, which in canvas mode looks similar to a start page of its own.  Interestingly, ads are shown in this mode, presumably from the WSJ itself.  This highlights another important aspect of gadget development: Income.  </p>
<p>This is really the crux of the iGoogle update, in my opinion.  By allowing <a href="http://igoogledeveloper.blogspot.com/2008/10/big-canvas-big-opportunity.html">giving more power to developers</a> and allowing more content to be shown on iGoogle, developers can have more flexibility with their creations.  In return, Google is apparently willing to allow them to show ads so they can make money off of their creations, which clearly add value to iGoogle.</p>
<p>It&#8217;s hardly an original idea.  Facebook has had their own <a href="/blog/2007/06/03/facebooks-platform-adds-integration-to-applications/">applications platform</a> for well over a year, with much of the same ideas.  Facebook Apps are made by third party developers, and mostly run &#8220;within&#8221; the confines of the main Facebook site, keeping users on the site.  In return, developers can also choose to run ads in their application to generate revenue.  It&#8217;s a very similar model.  (Facebook recently <a href="http://www.readwriteweb.com/archives/facebook_fbfund_awards_25_new.php">awarded some of the best apps</a> through their fbFund initiative, with the promise of more money to come &#8211; perhaps Google will do the same? They&#8217;ve already done something similar with Android in order to spurn development)</p>
<h3>Not so fast</h3>
<p>Unfortunately, the changes were not all good.  For one thing, the vast majority of existing gadgets haven&#8217;t been rewritten to take advantage of the full canvas mode.  In all likelihood, many will not, since third party developers may do as they like.  Gadgets that haven&#8217;t been updated will merely be displayed besides a huge &#8220;You might also like&#8230;&#8221; list of recommended/related gadgets when displayed in full-screen canvas mode.</p>
<p>Furthermore, some users have complained about the UI updates.  In particular, the mandatory left sidebar now in place has caused some to lament the loss in screen real-estate.  Previously, tabs were only shown on top if you had defined more than one; now the list of tabs, along with the iGoogle gadgets in each one, are shown in the sidebar no matter what.</p>
<p>Indeed, such a display might be superfluous if there&#8217;s only one tab.  At the very least, Google should have allowed the sidebar to be collapsed or tucked away.  (I won&#8217;t be surprised if they implement this change in the next few days, or already have it planned)</p>
<p>Also surprising is how Google rolled out the new version so suddenly, effectively forcing all users to adopt it.  A better approach would have been to roll out a &#8220;beta&#8221; version (we all know how much Google is <a href="http://royal.pingdom.com/2008/09/24/why-is-almost-half-of-google-in-beta/">in love with beta</a>) and allow users to preview it and optionally switch.  This would allow them to get more feedback before switching everyone over, like Facebook did with their new redesign, which effectively took months to take effect.</p>
<p>However, given that iGoogle&#8217;s user base is likely a very small percentage of all the users who have Google as their start page (with most just preferring the stripped-down original search page as their starting point), perhaps Google believed that rolling out the updated site would affect so few that a beta period wasn&#8217;t really needed.  In any event, the changes are not so ground breaking to warrant serious concern.</p>
<hr/>Copyright &copy; 2010 <strong><a href="http://unitstep.net">unitstep.net</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact <strong><a href="mailto:webmaster@unitstep.net">webmaster@unitstep.net</a></strong> for more information.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">Plugin</a> by <a href="http://www.taragana.com/">Taragana</a></span>]]></content:encoded>
			<wfw:commentRss>http://unitstep.net/blog/2008/10/20/google-changes-igoogle-making-gadget-development-more-profitable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The worse purchase form ever</title>
		<link>http://unitstep.net/blog/2008/01/23/the-worse-purchase-form-ever/</link>
		<comments>http://unitstep.net/blog/2008/01/23/the-worse-purchase-form-ever/#comments</comments>
		<pubDate>Thu, 24 Jan 2008 00:44:24 +0000</pubDate>
		<dc:creator>Peter Chng</dc:creator>
				<category><![CDATA[ieee]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[user interface]]></category>

		<guid isPermaLink="false">http://unitstep.net/blog/2008/01/23/the-worse-purchase-form-ever/</guid>
		<description><![CDATA[
Okay, so maybe I&#8217;m being a bit melodramatic or maybe I&#8217;m just a bit stressed out.  I had previously talked about how website purchase forms that require you to enter a credit card number in a specific format (e.g., no spaces) were poorly designed since most people don&#8217;t deal with large groups of numbers [...]]]></description>
			<content:encoded><![CDATA[<p class="image align-right"><a rel="lightbox" href='http://unitstep.net/wordpress/wp-content/uploads/2008/01/angry_baby_head.jpg' title='Anger!'><img src='http://unitstep.net/wordpress/wp-content/uploads/2008/01/angry_baby_head.thumbnail.jpg' alt='Anger!' /></a></p>
<p>Okay, so maybe I&#8217;m being a bit melodramatic or maybe I&#8217;m just a bit stressed out.  I had previously <a href="/blog/2007/07/11/security-and-usability/">talked about</a> how website purchase forms that require you to enter a credit card number in a specific format (e.g., no spaces) were poorly designed since <a href="http://www.usability.uk.com/resources_spoon13.htm">most people don&#8217;t deal with</a> large groups of numbers very well.  Furthermore, it&#8217;s trivial to format the number server-side, so why require the user to?  Well, today, I ran into a form that not only required you to enter all of the numbers without spaces, but also <em>punished you</em> if you did not.  </p>
<h3>A bit of background</h3>
<p>I am a member of the <a href="http://www.ieee.org/"><abbr title="Institute of Electrical and Electronics Engineers">IEEE</abbr></a>.  They&#8217;re a great organization, and I find some of their publications such as <cite>IEEE Spectrum</cite> to be fairly interesting.  You also sort of need to be a member if you want to publish anything in the field (I did two summers of research while in university), and since I&#8217;m an <a href="/blog/2007/05/31/graduated/">Electrical Engineer</a>, I feel that I need to be part of the largest organization dealing with the field. </p>
<p>So, when a renewal notice arrived in my mail recently, I didn&#8217;t hesitate to pay my dues to remain a member.  (Well, actually, it sat on my desk for a week before I did anything, but my procrastination is another topic)  I thought that renewal would be painless process; it started out great, because as soon as I logged into the site, there was a big button/link for renewing.  Clicking it added a &#8220;Renewal&#8221; item to my cart.</p>
<h3>Checkout, or, things take a turn for the worse</h3>
<p>Clicking &#8220;Checkout&#8221;, I thought I&#8217;d just have to enter my CC number and a few details, and things would be done.  After all, I&#8217;ve ordered a ton of stuff online and have never really had a problem.  That was, until I encountered the payment form from hell.  Just how bad was it? Well&#8230;</p>
<p>I enter my CC number in my usual fashion &#8211; groups of four digits, separated by spaces.  I like to do this just so it&#8217;s easier to double check that I entered the correct numbers.  I don&#8217;t really care if the server &#8220;requires&#8221; you to enter without spaces, since I usually just remove them myself before submitting.  However, as soon as the credit card number field lost focus, after I tabbed to the next field, the form submitted!</p>
<p>After the page had reloaded, there was a warning in red text, &#8220;INCORRECT NUMBER OF DIGITS&#8221;, or something to that effect, pointing to the CC field.  And, the field was <strong>empty</strong>.  That&#8217;s right, it just <strong>blanked out the field</strong> without even giving me the faintest hint that it would.  All my hard work of entering in a 16-digit number was gone, and I&#8217;d have to do it again.  I didn&#8217;t even remember seeing an initial warning telling me that I couldn&#8217;t use spaces!</p>
<p>What really happened, of course, is that the form did not really submit.  They had some messed up event handler tied to the <code>blur</code> event of the field which sent the value server-side, validated it by their stringent rules, and then loaded the page again if the entered number did not conform to their rules or if the planets did not perfectly align or something like that.  That is just whack.</p>
<p>If you actually enter the number the way they want you to, no spaces, it still sends the value server-side, and the page still reloads &#8211; but now the credit card field displays not your full number, but just the &#8220;XXXX&#8230;&#8221; and the last four digits, typical of how most statements display it.  Your CC number is then stored server-side in a session, I presume.  Weird.  Furthermore, the submit button of the form wasn&#8217;t actually a submit button, (of course&#8230;), but was instead a hyperlink with the <code>href</code> attribute set to <code>javascript:someMethod()</code>.</p>
<h3>Why this is bad</h3>
<p>I shouldn&#8217;t have to explain this, but I will just because I feel like it.  Firstly, as I mentioned before, it&#8217;s insane to require users to conform to the &#8220;no spaces in credit card numbers&#8221; rule when you can just process the number server-side to remove any spaces.  But the IEEE form takes it a step further by not only requiring this format, but actively removing any data <em>NOT</em> entered in this manner.  It should be a given that you <strong>never</strong> clear any fields in a form unless the user is given prior warning and confirms it.  (This is also why &#8220;Reset&#8221; buttons should have some sort of confirmation against accidental clicks)</p>
<p>But to carry out all of this action right when the field loses focus is completely beyond me and probably where I lost it.  This goes against everything &#8220;normal&#8221; in UI design.  It disrupts your workflow, it changes the state without notification or warning and it pisses off users.  A purchase form is probably the <strong>worst</strong> place to do this in, since you&#8217;re trying to facilitate payment from a potential customer. </p>
<p>But the idea that the user <strong>has</strong> to enter the data in one, very-specific way is just what peeved me off.  Most people aren&#8217;t perfectionists, so why would you assume that they are when it comes to data-entry and then <em>punish</em> them when they fail to achieve that expectation? </p>
<p>Having strict data format standards for machine-to-machine transmissions is one thing.  In human-computer interaction, it&#8217;s a whole different ball game, and one that whoever designed the form from hell, evidently doesn&#8217;t understand.  I&#8217;m no usability expert, but I know junk when I see it. </p>
<h3>Final words</h3>
<p>Okay, so maybe I&#8217;m overreacting a bit, or a lot.  Though this only wasted maybe five minutes of my time, I was bothered by it enough to write about it for a further ten minutes.  You may think me stupid for that, but that&#8217;s just how I felt.</p>
<hr/>Copyright &copy; 2010 <strong><a href="http://unitstep.net">unitstep.net</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact <strong><a href="mailto:webmaster@unitstep.net">webmaster@unitstep.net</a></strong> for more information.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">Plugin</a> by <a href="http://www.taragana.com/">Taragana</a></span>]]></content:encoded>
			<wfw:commentRss>http://unitstep.net/blog/2008/01/23/the-worse-purchase-form-ever/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Launchy to improve productivity with a graphical command line</title>
		<link>http://unitstep.net/blog/2007/07/08/using-launchy-to-improve-productivity-with-a-graphical-command-line/</link>
		<comments>http://unitstep.net/blog/2007/07/08/using-launchy-to-improve-productivity-with-a-graphical-command-line/#comments</comments>
		<pubDate>Sun, 08 Jul 2007 19:21:03 +0000</pubDate>
		<dc:creator>Peter Chng</dc:creator>
				<category><![CDATA[cli]]></category>
		<category><![CDATA[gui]]></category>
		<category><![CDATA[launchy]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[user interface]]></category>

		<guid isPermaLink="false">http://unitstep.net/blog/2007/07/08/using-launchy-to-improve-productivity-with-a-graphical-command-line/</guid>
		<description><![CDATA[I recently ran across a Digg news item about an article over at the Mozilla Labs where UI designer Alex Faaborg discussed hypothetical &#8220;Graphical Keyboard User Interfaces&#8221; in Firefox, and how they might be implemented.  Interfaces like this, such as Quicksilver (for Mac), offer a hybrid of features found in CLIs (Command Line Interfaces) [...]]]></description>
			<content:encoded><![CDATA[<p>I recently ran across a <a href="http://digg.com/software/Firefox_with_Quicksilver_Inside">Digg news item</a> about an article over at the Mozilla Labs where UI designer Alex Faaborg discussed <a href="http://labs.mozilla.com/2007/07/the-graphical-keyboard-user-interface/">hypothetical &#8220;Graphical Keyboard User Interfaces&#8221; in Firefox</a>, and how they might be implemented.  Interfaces like this, such as <a href="http://quicksilver.blacktree.com/">Quicksilver (for Mac)</a>, offer a hybrid of features found in CLIs (Command Line Interfaces) and GUIs (Graphical User Interfaces), and thus can have the best of both worlds.  </p>
<p class="image"><img src='/wordpress/wp-content/uploads/2007/07/launchy.jpg' alt='Launchy' /></p>
<p>Basically, a graphical command line is a command line that pops up on screen when you activate a keyboard shortcut/combo.  This command line allows you to easily launch any program, file or action by easily typing its name.  This offers you the advantage that good CLIs offer &#8211; such as auto-complete and speed-of-use, while retaining the advantages of the GUI.  I recently learned of a <a href="http://launchy.net/">Launchy</a>, a nice program for Windows that offers these features.  (Sort of like Quicksilver for Windows)</p>
<h3>More than just a command line</h3>
<p>Besides its fairly mundane appearance (though Launchy can be customized with <a href="http://www.launchyskins.com/">skins</a>), the Launchy interface can actually be one of the most powerful aspects of using your computer.  When Launchy is first installed and running, you won&#8217;t notice a difference &#8211; in fact, you won&#8217;t even notice a space-stealing system tray icon.  The command line window is brought up by pressing a user-defined hot-key.  (By default it is <code>alt-space</code>, but I changed mine to <code>ctrl-space</code>, since the <code>alt-space</code> is already mapped to bring up a context menu for the current window, allowing you to minimize/maximize it fairly fast.)</p>
<p>Then, you simply start typing the name of what program you&#8217;d like to launch, and Launchy will look for matches.  The list of matches pops up in an auto-complete list, and furthermore, Launchy seems to remember your usage habits somewhat, so next time you start typing, it&#8217;ll bring up the matches first that were previously used.  Launchy is automatically configured to scan for all programs/links in your start menu, and also can be set up to scan other directories of your choosing.  It automatically rebuilds the index after a user-defined period of time, so things are kept up to date. </p>
<p>The advantage of such a system might be lost on traditional GUI users, but anyone who dives into the command line will realize its benefit.  Typically, input through a keyboard to accomplish actions is far more efficient that using a mouse.  Take the Start Menu, for example.  A typical computer will have dozens of programs available for launch, and finding the one you want in a menu can be a time-consuming and tedious task.  By using Launchy, you can simply type a few letters of the program&#8217;s name, and it&#8217;ll pop up as an option.  Launching a program takes far less time.</p>
<p>There are also a bunch of included plugins that allow for <a href="http://lifehacker.com/software/application-launcher/download-of-the-day-launchy-10-windows-232678.php">additional functionality</a>.  You can, for example, easily access all of your Firefox bookmarks, and also browse through directories/files from the command line of Launchy, further making it an indispensable application.  However, perhaps the best part of Launchy is the fact that it&#8217;s open-source &#8211; that&#8217;s right, it costs nothing.  So <a href="http://launchy.net/">grab a copy of Launchy</a> today!</p>
<p>An alternative to Launchy, which I have not tried, is <a href="http://colibri.leetspeak.org/whatsnew/">Colibri</a>.  Give it a try, and let me know what you think. </p>
<h3>More on why it&#8217;s better</h3>
<p>As <a href="http://labs.mozilla.com/2007/07/the-graphical-keyboard-user-interface/">this article best describes it</a>, a combination of the command line and GUIs is truly a best of both worlds solution.  CLIs offer a &#8220;high bandwidth&#8221; input interface, meaning the choice of applications you can launch with just a few keystrokes is huge; this translates into a quick launch time because you can easily find what you want.  GUIs offer a &#8220;high bandwidth&#8221; output interface, meaning they can convey a lot of information back to the user with graphics such as icons, drop-down menus, and the like.  Combining the two gives a nice interface like that of Launchy&#8217;s.  </p>
<p>In particular, I liked Launchy because I&#8217;ve been looking for ways to improve my productivity on the computer.  Besides putting my most-used programs in the <a href="http://diveintomark.org/archives/2002/10/07/my_good_easy">main level of my Start Menu</a> (thus allowing them to be launched with two keystrokes), I was at a bit of a loss at what to do with other programs that I use less frequently.  Launchy has solved those problems, essentially allowing me to launch most any program fairly fast.  Windows Vista offers a similar feature in its new Start Menu (finding a program by typing), but I&#8217;m still running Windows XP and have <a href="http://enthusiast.hardocp.com/article.html?art=MTMzNCw2LCxoZW50aHVzaWFzdA==">no desire to upgrade</a> to Vista anytime soon.  </p>
<p>Perhaps the only problem with Launchy, has nothing really to do with Launchy at all.  It is in fact the <a href="http://www.winterspeak.com/columns/paradox.html">Paradox of the Active User</a>, something that I&#8217;ve written about before in relation to <a href="/blog/2007/06/20/cbcca-redesigns-again/">design</a>.  Basically, the paradox can be summed up with the phrase, &#8220;Old Habits Die Hard&#8221;.  Once most users have learned how to accomplish a particular task, they won&#8217;t be keen to learn a new way, even if that way is faster and more efficient &#8211; basically, they don&#8217;t like to take the time to learn a better way, even if in the long run it pays off.</p>
<p>I&#8217;ve been somewhat like this, having only recently <a href="http://mail.google.com/support/bin/answer.py?ctx=%67mail&#038;hl=en&#038;answer=6594">enabled/started using keyboard shortcuts</a> in Gmail and <a href="http://www.google.com/help/reader/faq.html">Google Reader</a>.  However, I&#8217;m trying to break these habits and by using Launchy more, I hope to transition to using the keyboard more to perform tasks, rather than just relying on the familiar but slow mouse.</p>
<hr/>Copyright &copy; 2010 <strong><a href="http://unitstep.net">unitstep.net</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact <strong><a href="mailto:webmaster@unitstep.net">webmaster@unitstep.net</a></strong> for more information.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">Plugin</a> by <a href="http://www.taragana.com/">Taragana</a></span>]]></content:encoded>
			<wfw:commentRss>http://unitstep.net/blog/2007/07/08/using-launchy-to-improve-productivity-with-a-graphical-command-line/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Facebook updates its interface (sort of)</title>
		<link>http://unitstep.net/blog/2006/09/05/facebook-updates-its-interface-sort-of/</link>
		<comments>http://unitstep.net/blog/2006/09/05/facebook-updates-its-interface-sort-of/#comments</comments>
		<pubDate>Tue, 05 Sep 2006 16:49:30 +0000</pubDate>
		<dc:creator>Peter Chng</dc:creator>
				<category><![CDATA[facebook]]></category>
		<category><![CDATA[privacy]]></category>
		<category><![CDATA[social networking]]></category>
		<category><![CDATA[user interface]]></category>

		<guid isPermaLink="false">http://unitstep.net/blog/2006/09/05/facebook-updates-its-interface-sort-of/</guid>
		<description><![CDATA[Logged into Facebook today (who doesn&#8217;t?), and was surprised to see the new interface, added just in time for the new school year and thus just before increased usage of the service will start.  Added were two features &#8211; firstly, a &#8220;News Feed&#8221; that displays when you first login, instead of the old notification [...]]]></description>
			<content:encoded><![CDATA[<p>Logged into Facebook today (who doesn&#8217;t?), and was surprised to see the <a href="http://blog.facebook.com/blog.php?post=2207967130">new interface</a>, added just in time for the new school year and thus just before increased usage of the service will start.  Added were two features &#8211; firstly, a &#8220;News Feed&#8221; that displays when you first login, instead of the old notification page that most people just clicked through.  Besides displaying the usual notifications (new friend confirmations, upcoming birthdays), which have been relocated to a sidebar, it displays an <acronym class="uttInitialism" title="Really Simple Syndication">RSS</acronym>-style feed of all things that have changed or been updated with your friends. </p>
<p>Things like friends&#8217; status updates, new friends of your friends, new photos of your friends, and groups that you friends have joined/left are listed, along with when these actions occurred.  Basically, most of things that people would browse around for about their friends have been nicely aggregated into one page for easier viewing, making the service easier to use and more relevant.  However, it&#8217;s almost information overload &#8211; I don&#8217;t really need to see every status update on what groups my friends have joined or left, do I? </p>
<p>Additionally, it makes it easier to snoop in on what your friends are doing on Facebook and when they&#8217;re online &#8211; though it should be noted that all the information posted in the News Feed was always publically available; this just makes it dead simple to find all of it.</p>
<p>The second feature that was added was what they called a &#8220;Mini News Feed&#8221;, which is displayed on every personal user&#8217;s profile.  It&#8217;s basically the same as your News Feed, except it displays only the updates for that user/friend &#8211; again making it easier to keep track of your friends and what they&#8217;ve been doing, which only serves to further improve Facebook&#8217;s social networking ability. </p>
<p>I agree with <a href="http://www.techcrunch.com/2006/09/05/new-facebook-redesign-more-than-just-aesthetics/trackback/">TechCrunch&#8217;s assessment</a> that Facebook &#8220;gets it right&#8221; when it comes to social networking &#8211; it&#8217;s more about making the end user experience better than just about increasing pageviews, and often the two are conflict.  Other sites just can&#8217;t compare, in my opinion.  My only suggestion for improvement would be to have some sort of settings page for the News Feed so what&#8217;s displayed can be customized. </p>
<h3>Nothing&#8217;s changed with privacy?</h3>
<p>However, I disagree with Facebook&#8217;s assertion that these changes &#8220;<i class="quote">do not give out any information that wasn&#8217;t already visible</i>&#8220;, at least in principle.  While it&#8217;s true that before you could have constantly scanned each and every one of your friend&#8217;s profiles in order to figure out when they had joined certain groups, posted wall messages or otherwise updated their profile, this would have been very tedious and time-consuming, and only the most dedicated stalkers would be able to keep up.  The new features make this pseudo-voyeurism all too easy. (You could have also written a scraper before, but this would probably have been against the TOS)</p>
<p>If there&#8217;s anything good about these changes, it&#8217;s that it&#8217;ll make people think twice about posting <a href="http://arstechnica.com/news.ars/post/20060119-6016.html">incriminating</a> or otherwise <a href="http://yro.slashdot.org/article.pl?sid=06/07/11/183219&#038;from=rss">personal information</a> that they would normally want to remain private. It may also force users to reconsider who they really want to add as a &#8220;friend&#8221;, and how they want their privacy to be set. </p>
<h3>I&#8217;ll still be using it</h3>
<p>Of course, I&#8217;m not going to stop using Facebook.  But, maybe the way I use it will change &#8211; and most likely this will be true with many other users, if the newest Facebook group, entitled &#8220;<cite>The New Facebook is Freaky as Sh*t</cite>&#8220;, is in any indication of this.  How did I learn of this group? By noting that a friend of mine had just joined it, as of 11:17 PM EST tonight.</p>
<hr/>Copyright &copy; 2010 <strong><a href="http://unitstep.net">unitstep.net</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact <strong><a href="mailto:webmaster@unitstep.net">webmaster@unitstep.net</a></strong> for more information.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">Plugin</a> by <a href="http://www.taragana.com/">Taragana</a></span>]]></content:encoded>
			<wfw:commentRss>http://unitstep.net/blog/2006/09/05/facebook-updates-its-interface-sort-of/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Apple Dock in Windows</title>
		<link>http://unitstep.net/blog/2006/09/01/the-apple-dock-in-windows/</link>
		<comments>http://unitstep.net/blog/2006/09/01/the-apple-dock-in-windows/#comments</comments>
		<pubDate>Sat, 02 Sep 2006 00:21:44 +0000</pubDate>
		<dc:creator>Peter Chng</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[application launcher]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[user interface]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://unitstep.net/blog/2006/09/01/the-apple-dock-in-windows/</guid>
		<description><![CDATA[After setting up a PC with Ubuntu for my Mom to use, I decided to add a few things to the Windows XP system that&#8217;s also occasionally used by Mom and Dad.  Since I was aiming to make things easier to use, in order to encourage my Mom to use the computer more, I [...]]]></description>
			<content:encoded><![CDATA[<p>After <a href="http://unitstep.net/blog/2006/08/30/mysterious-memory-controller-problems/">setting up a PC with Ubuntu</a> for my Mom to use, I decided to add a few things to the Windows XP system that&#8217;s also occasionally used by Mom and Dad.  Since I was aiming to make things easier to use, in order to encourage my Mom to use the computer more, I took a cue from <a href="http://www.apple.com">Apple</a>, and started looking for a program that would emulate the Apple &#8220;Dock&#8221; that&#8217;s so often showcased at their stores.  I had previously seen <a href="http://grid_master.livejournal.com/">Glen</a> using a program like this, so I knew they existed &#8211; while I didn&#8217;t have a need for it at the time, I&#8217;ve begun to <a href="http://unitstep.net/blog/2006/08/30/website-usability-and-the-double-click/">think different</a> (excuse the blatant Apple slogan rip off) when it comes to usability &#8211; not everyone is like me.</p>
<p class="image">
<a href="http://unitstep.net/wordpress/wp-content/uploads/2006/09/rocketdock-example.jpg" rel="lightbox" title="RocketDock in action - like the Apple Dock"><img src="http://unitstep.net/wordpress/wp-content/uploads/2006/09/rocketdock-example-small.jpg" alt="RocketDock in action - like the Apple Dock" /></a>
</p>
<h3>Wait a minute!</h3>
<p>Now, some of you will know that I&#8217;m no fan of <a href="http://unitstep.net/blog/2006/07/27/apple-releases-bluetooth-mighty-mouse-fanboys-rejoice/">Apple fanboys</a>, (or fanboys in general), but Apple does get it right when it comes to usability &#8211; people generally find Macs easier to use, and more intuitive.  While their current line of commercials (&#8220;Hello, I&#8217;m a Mac&#8230;&#8221;) may be annoying, they are in general correct for the majority of users who just want to &#8220;get things done&#8221;.  This can be further seen in the success of the iPod &#8211; its control interface is second to none.</p>
<h3>What&#8217;s wrong with the UI in Windows?</h3>
<p>There&#8217;s nothing wrong with the UI in Windows &#8211; it works just fine for me, and I don&#8217;t find that it gets in the way when I&#8217;m trying to get things done.  But, for some people, such things aren&#8217;t so intuitive, perhaps because they don&#8217;t live and breath computers like I do. </p>
<p>The quick launch bar that comes with Windows is okay, and so is the Start Menu &#8211; but an application Dock is bigger, more visible and thus is quicker to use for the average user, such as my Mom. (Though <a href="http://www.asktog.com/columns/044top10docksucks.html">some would disagree</a>)</p>
<h3>The choices</h3>
<p>It turns out there&#8217;s a lot of other people who also want a Dock like Apple&#8217;s in Windows, since there are a plethora of programs out there that accomplish this.  The top three I found were <a href="http://www.download.com/3000-2341-10247255.html">MobyDock</a>, <a href="http://www.punksoftware.com/rocketdock">RocketDock</a> and <a href="http://oxyx.oxygen-inc.com/">Y&#8217;z Dock</a>.  I only had time to try out the first two, and there were many more that I didn&#8217;t bother to look at, but I was impressed.</p>
<p>Both programs support easy drag and drop operations, so you can add programs to the dock simply by dragging an existing shortcut onto it; removing the icons from the dock is just as easy.  They can also be positioned virtually anywhere on the screen, with offsets from top/bottom/left/right being allowed.  They also feature the nice &#8220;zoom&#8221; animations as featured on Apple&#8217;s version, and have a small memory footprint.</p>
<p>They&#8217;re also devoid of any confusing jumble of messy configuration dialogs &#8211; the settings pages are very simple and straightforward, and the apps &#8220;just work&#8221;, so you probably won&#8217;t need to even touch the configuration pages.  This is the way software should work, at least software intended to be used by the masses.  Too often, software <a href="http://unitstep.net/blog/2006/05/20/thunderbird-15-not-polished-but-usable/">comes with too many options pages</a>, making configuration both confusing and tedious.  Usability testing should be done to find out what&#8217;s intuitive, instead of making a bunch of cryptic settings.</p>
<p>Out of the two, MobyDock probably offered more features than RocketDock, offering built-in widgets for Weather, Screenshots and a Clock.  However, it also seemed to be a bit buggy, as it crashed a few times, so I&#8217;ll be using RocketDock since it&#8217;s for the parents&#8217; computer, and they don&#8217;t need to deal with that.  MobyDock also seems to have stalled in development, with the latest version being put out way back on November 18th, 2003 &#8211; by contrast RocketDock still appears to be continually updated.</p>
<p>Kudos to the developers of these programs for not only making a useful piece of software, but also for making them freely availabe. </p>
<hr/>Copyright &copy; 2010 <strong><a href="http://unitstep.net">unitstep.net</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact <strong><a href="mailto:webmaster@unitstep.net">webmaster@unitstep.net</a></strong> for more information.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">Plugin</a> by <a href="http://www.taragana.com/">Taragana</a></span>]]></content:encoded>
			<wfw:commentRss>http://unitstep.net/blog/2006/09/01/the-apple-dock-in-windows/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Website usability and the double-click</title>
		<link>http://unitstep.net/blog/2006/08/30/website-usability-and-the-double-click/</link>
		<comments>http://unitstep.net/blog/2006/08/30/website-usability-and-the-double-click/#comments</comments>
		<pubDate>Wed, 30 Aug 2006 15:27:41 +0000</pubDate>
		<dc:creator>Peter Chng</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[mice]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[user interface]]></category>

		<guid isPermaLink="false">http://unitstep.net/blog/2006/08/30/website-usability-and-the-double-click/</guid>
		<description><![CDATA[For most of us who are accustomed to using computers and their interfaces, the use of the mouse (or other pointing device; for the sake of brevity I&#8217;ll call them all &#8220;mice&#8221; for this entry) is nothing short of second nature.  Indeed, for many actions required in a modern user interface (UI), a mouse [...]]]></description>
			<content:encoded><![CDATA[<p>For most of us who are accustomed to using computers and their interfaces, the use of the mouse (or other pointing device; for the sake of brevity I&#8217;ll call them all &#8220;mice&#8221; for this entry) is nothing short of second nature.  Indeed, for many actions required in a modern user interface (UI), a mouse is required, or at the very least, it makes performing the task much quicker.  For the most part, the mouse is quite intuitive to learn and use; move it in a direction, and the on-screen pointer moves similarly.  The concept of the single-click vs. the double click may also <em>seem</em> simple as well, but for newcomers, things can often be confusing; this gets even more complicated when websites change how the double-click functions on their site, and can even confuse experienced users. </p>
<h3>Complicated!?! How?</h3>
<p>Now, I know what some of you may be thinking &#8211; just how can using a mouse be <em>complicated?</em>.  Well, it&#8217;s not that it&#8217;s compliated <i class="latin">per se</i>, but rather that the patterns of usage associated with the mouse take time to learn before they become instinctive.  I can&#8217;t really remember the first time I used a mouse, (it was many years ago, and I have since filled and emptied my brain many times), but I suspect that I didn&#8217;t &#8220;get it&#8221; right away.</p>
<p>Take the example of the single-click vs. the double-click when performing actions in an operating system, such as Windows XP, for example.  Even if you don&#8217;t have problems with fine-motor-skill and control, you still have to learn when to use what &#8211; and by learn, I mean to have the distinction ingrained in your mind so that you don&#8217;t have to <em>consciously</em> think about it when you want to perform some action that requires a single or double-click. </p>
<h3>Will that be a single or a double?</h3>
<p>The distinction between a single and double-click for actions may seem arbitrary, and, sometimes it is, and sometimes they can even perform a similar action, in different contexts.  If you stop to think about it, there really are quite a <a href="http://en.wikipedia.org/wiki/Double-click_%28computing%29">few rules about clicking</a> that can only really be learnt through time spent using a computer.</p>
<p>Usually, the double-click is used for <em>opening</em> things that are represented by icons, at least when they&#8217;re on your desktop or in a folder.  This is to distinguish between the single-click action on these items, which <em>selects</em> them.  This is a pretty easy difference to understand.  For menus, the double-click usually has no meaning &#8211; a single-click opens the item.  In this case, there&#8217;s no need to select anything, usually, so there&#8217;s no need for a separate double-click action to separate selecting from opening.</p>
<p>For text, a single click places the cursor at the location, while a double click can serve to select the entire word.  Notice that here a <em>double-click</em> is the action that performs the selection function, and though this is the logical way of setting things up, it&#8217;s all part of a set of subtle nuances of mouse use that take time to learn.</p>
<h3>Context</h3>
<p>But, where things get complicated is on a medium such as the web, where the context is a blend of the two basic situations described above.  As mentioned before, with icons, a <em>double-click</em> performs the open or &#8220;browse to this folder&#8221; action.  However, on the web, almost all actions are performed with the <em>single-click</em>. To follow a hyperlink, the link is single-clicked, not double-clicked, following the guidelines of a text document rather than those of a icon-environment or context.  (This also makes selecting hyperlinked text more difficult)</p>
<p>At first, this makes sense, since most of the documents on the web consist mainly of text.  But, what happens now if the link consists not of text but an image, rather like an icon? The action remains the same, but the look has changed, almost to that of an icon &#8211; thankfully, most web-browsers change the look of the pointer when it&#8217;s over a link to remind the user that it&#8217;s a link, and hopefully, they will be adjusted enough to use a single click for all links and not be confused.</p>
<p>But where things get really tricky and confusing is in modern &#8220;web applications&#8221;, which are just websites heavily enhanced with JavaScript (or other client-side technologies) so that the experience of using the website is closer to that of a desktop application than a regular website.  Some of these applications have really tried to emulate not only the functionality, but also the <em>look and feel</em> of desktop applications, resulting in some usability issues with clicking.</p>
<p>Take <a href="http://www.techcrunch.com/2006/08/17/yahoo-photos-to-leave-beta-today-api-finally-coming/#comment-142396">this comment</a> by about the new Yahoo! Photos site; the user laments about the interface requiring a double-click to open a full-size image rather than just a traditional single-click as on most other websites.  (The double-click detection is done via JavaScript)</p>
<p>I&#8217;ll admit that while I was first confused by this action, I thought little of that user&#8217;s comment &#8211; I mean, how hard can it be to learn a simple action like that?  But, after some more thinking, I&#8217;ve come to agree with the comment &#8211; breaking the pattern of how a user navigates on a website is not a good idea, even if it&#8217;s done to try to make your website feel more like a desktop application.</p>
<h3>Change is not always good</h3>
<p>As long as the user realizes they&#8217;re on a website, they&#8217;ll continue to use it like one, with single-clicks performing actions.  If you&#8217;re designing a web-application, you need to realize this, and shouldn&#8217;t break this functionality to try to &#8220;trick&#8221; your user into believing they&#8217;re using a desktop application.  Even if you provide many warnings and notices, they&#8217;ll still be slowed down by this change if they don&#8217;t continually use your site &#8211; and you always want to keep the learning curve as flat as possible.  And, let&#8217;s face it &#8211; while making interactive web applications is cool and I&#8217;m all for it, most people (e.g., mainstream) don&#8217;t really care and just want something that&#8217;s easy to use.</p>
<hr/>Copyright &copy; 2010 <strong><a href="http://unitstep.net">unitstep.net</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact <strong><a href="mailto:webmaster@unitstep.net">webmaster@unitstep.net</a></strong> for more information.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">Plugin</a> by <a href="http://www.taragana.com/">Taragana</a></span>]]></content:encoded>
			<wfw:commentRss>http://unitstep.net/blog/2006/08/30/website-usability-and-the-double-click/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
