<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2.1" -->
<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/"
	>

<channel>
	<title>Essays by Sakuzaku</title>
	<link>http://blog.sakuzaku.com</link>
	<description>Making usable websites, making websites usable.</description>
	<pubDate>Wed, 17 Feb 2010 17:06:09 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>
	<language>en</language>
			<item>
		<title>Considerations Involved in IP-based Geolocation and User Language Detection</title>
		<link>http://blog.sakuzaku.com/considerations-involved-in-ip-based-geolocation-and-user-language-detection/</link>
		<comments>http://blog.sakuzaku.com/considerations-involved-in-ip-based-geolocation-and-user-language-detection/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 17:01:13 +0000</pubDate>
		<dc:creator>Cody Robbins</dc:creator>
		
		<category><![CDATA[Constructive Criticism]]></category>

		<category><![CDATA[Design]]></category>

		<category><![CDATA[Usability]]></category>

		<guid isPermaLink="false">http://blog.wearesakuzaku.com/considerations-involved-in-ip-based-geolocation-and-user-language-detection/</guid>
		<description><![CDATA[I&#8217;m going to revisit the UPS homepage—one more time—that I already discussed in Improving the UPS Homepage by Remembering Fitt&#8217;s Law and It&#8217;s 2010—Use Clickable Labels on Checkboxes. Despite the the sparseness of this particular page, there is a third thing here that I think could improve the user experience significantly and reduce a barrier [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m going to revisit the UPS homepage—one more time—that I already discussed in <a href="http://blog.wearesakuzaku.com/improving-the-ups-homepage-by-remembering-fitt’s-law">Improving the UPS Homepage by Remembering Fitt&#8217;s Law<a/> and <a href="http://blog.wearesakuzaku.com/it's-2010-use-clickable-labels-on-checkboxes">It&#8217;s 2010—Use Clickable Labels on Checkboxes</a>. Despite the the sparseness of this particular page, there is a third thing here that I think could improve the user experience significantly and reduce a barrier to entry to the site (and concomitantly, potential premature user abandonment).</p>
<p style="text-align: center;"><a href="http://blog.wearesakuzaku.com/wp-content/uploads/2010/01/ups_homepage.png"><img src="http://blog.wearesakuzaku.com/wp-content/uploads/2010/01/ups_homepage_thumbnail.png" /></a></p>
<p>I think it would be very useful to pre-populate the dropdown based on the user&#8217;s IP-based geolocation and browser language settings (the <code>Accept-Language</code> header). Why pre-populate instead of automatically redirecting? <a href="http://zakwilson.posterous.com/lay-off-the-geolocation-already">Zak Wilson</a> and <a href="http://www.ordecon.com/2007/06/11/why-geolocation-by-ip-sucks/">Ivan Stojic</a> have argued that IP-based geolocation should not be used in web apps because it causes more problems than it solves. I don&#8217;t fully agree—those users are in the long tail and for the majority of users I would be willing to bet geolocation gets it right. The annoyance caused to the few users who travel extensively or are behind corporate firewalls isn&#8217;t really enough to outweigh the benefit conferred to the average non-English speaker who goes to <a href="http://google.com/">google.com</a> and yet sees the site in what&#8217;s probably their language.</p>
<p>All the same, Zak and Ivan are correct that the <code>Accept-Language</code> header is a better piece of information to use first. Given the potential for even that to be incorrectly set, and the fact that UPS has already decided to deploy an interstitial, I think it makes sense to at least pre-populate the dropdown with a best guess.</p>
<p>However, it&#8217;s quite possible that UPS has considered this feature and determined that visitor satisfaction counterintuitively goes <em>down</em> as a result. Why? Because given that the site can obviously figure out the correct setting for most users, they may be annoyed that they were presented with an interstitial page in the first place. The average user probably isn&#8217;t aware that their language settings can be automatically determined, and so presenting them with an uninitialized dropdown hides this fact.</p>
<p>Again, this possibility only underscores the necessity of A/B testing. Much like other complex dynamic systems with many inputs and outputs—weather, nonlinear electric circuits, molecular biology—it is difficult to predict the ultimate outcome of seemingly innocuous or superficially beneficial changes when users are involved. It would be great if someone from UPS could comment on this page and discuss the considerations involved while designing it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sakuzaku.com/considerations-involved-in-ip-based-geolocation-and-user-language-detection/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using CSS Selectors Instead of XPath As the Default Locator Strategy in Selenium</title>
		<link>http://blog.sakuzaku.com/using-css-selectors-instead-of-xpath-as-the-default-locator-strategy-in-selenium/</link>
		<comments>http://blog.sakuzaku.com/using-css-selectors-instead-of-xpath-as-the-default-locator-strategy-in-selenium/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 06:02:53 +0000</pubDate>
		<dc:creator>Cody Robbins</dc:creator>
		
		<category><![CDATA[Rails]]></category>

		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://blog.wearesakuzaku.com/using-css-selectors-instead-of-xpath-as-the-default-locator-strategy-in-selenium/</guid>
		<description><![CDATA[Using CSS locators in Selenium tests is faster and less verbose than using XPath. Unfortunately you can't set them as the default locating strategy. This patch will change that.]]></description>
			<content:encoded><![CDATA[<p>We use <a href="http://seleniumhq.org/">Selenium</a> to run in-browser acceptance tests in all our Rails apps via the <a href="http://seleniumhq.org/projects/on-rails/">Selenium on Rails plugin</a>. With early versions of Selenium you had to use verbose and clunky XPath locators to reference DOM elements in the tests, such as:</p>
<div class="code">
<pre>
//div[@class='content']/div[@class='sidebar']/a
</pre>
</div>
<p>For a while now, though, the <a href="http://dean.edwards.name/my/cssQuery/">cssQuery</a> library has been integrated into Selenium Core, allowing you to use CSS selectors instead. For example, the above XPath locator could be written with CSS selectors as:</p>
<div class="code">
<pre>
css=.content .sidebar a
</pre>
</div>
<p>In addition to being shorter, the Selenium documentation itself <a href="http://seleniumhq.org/docs/04_selenese_commands.html#locating-elements">points out</a> that most experienced users recommend CSS locators because they&#8217;re faster for the Javascript engine to parse, which means faster tests.</p>
<h3>Making CSS Locators the Default</h3>
<p>While the CSS locators themselves are great, it&#8217;s a minor annoyance of mine that they&#8217;re not the default locating strategy. As a result, every locator has to be prepended with <code>css=</code>. If you want to change this, apply the following patch to <code>selenium-core/scripts/selenium-browserbot.js</code>:</p>
<div class="code">
<pre>
@@ -1107,7 +1107,7 @@
         if (locator.startsWith('document.')) {
             return this.locateElementByDomTraversal(locator, inDocument, inWindow);
         }
-        return this.locateElementByIdentifier(locator, inDocument, inWindow);
+        return this.locateElementByCss(locator, inDocument);
     };
 }
</pre>
</div>
<div class="file_download"><a href="http://wearesakuzaku.com/blog/wp-content/uploads/2010/01/change_selenium_default_locator.patch"><img alt="Patch file icon" src="http://static.wearesakuzaku.com/20100116113816/images/file_patch.gif" />
<p class="filename">change_selenium_default_locator.patch</p>
<p class="size">4 Kilobytes</p>
<p></a>
</div>
<div class="clear"></div>
<h3>Minor Annoyances With CSS Locators</h3>
<p>The only thing that I don&#8217;t like with CSS locators is that indexing specific sibling elements is more verbose—it must be done with <code>nth-child()</code>:</p>
<div class="code">
<pre>
.content .sidebar:nth-child(1) a
</pre>
</div>
<p>With XPath you can use a simple pair of brackets:</p>
<div class="code">
<pre>
//div[@class='content']/div[@class='sidebar'][1]/a
</pre>
</div>
<p>It would be really nice if CSS selectors had the same bracket-style indexing syntax as XPath. (Of course, this is a limitation of CSS itself, not Selenium.)</p>
<p>In addition, <code>nth-child()</code> is a little more brittle in that it isn&#8217;t constrained to the current selection scope. For example, assume you have markup like so:</p>
<div class="code">
<pre>
&lt;div class="content"&gt;
  &lt;div class="something_else"&gt;…&lt;/div&gt;
  &lt;div class="sidebar"&gt;…&lt;/div&gt;
&lt;/div&gt;
</pre>
</div>
<p>There is now a non-sidebar sibling <code>&lt;div&gt;</code> appearing before the sidebar <code>&lt;div&gt;</code>. In this case, there will be no element that matches <code>.sidebar:nth-child(1)</code>—the sidebar is matched by <code>.sidebar:nth-child(2)</code>. This means that adding additional unrelated markup to your page can break your tests if you&#8217;re using CSS locators. If you were using the XPath locators in this case, the indexing of the element in question would remain constant because the index doesn&#8217;t refer to children, but to elements matching that specific XPath. (If you added additional sidebar <code>&lt;div&gt;</code>&#8217;s the XPath would break as well, but all the same it&#8217;s still less brittle.)</p>
<p>One final point to note is that there&#8217;s also a bug in the cssQuery library that prevents <code>nth-child()</code> from working correctly—it&#8217;s <a href="http://jira.openqa.org/browse/SEL-698">Selenium bug #698</a>. Unfortunately, the patch posted on the bug does not fix the problem for me. Instead, you have to resort to suffixing any <code>nth-child()</code> selector with a <a href="http://www.w3.org/TR/css3-selectors/#child-combinators">child or sibling combinator</a> like so:</p>
<div class="code">
<pre>
.content .sidebar:nth-child(1) > a
</pre>
</div>
<p>Despite these minor wrinkles, I find that the CSS locators used with Selenium are less verbose in general and lead to faster running tests.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sakuzaku.com/using-css-selectors-instead-of-xpath-as-the-default-locator-strategy-in-selenium/feed/</wfw:commentRss>
		</item>
		<item>
		<title>It’s 2010—Use Clickable Labels on Checkboxes</title>
		<link>http://blog.sakuzaku.com/it%e2%80%99s-2010%e2%80%94use-clickable-labels-on-checkboxes/</link>
		<comments>http://blog.sakuzaku.com/it%e2%80%99s-2010%e2%80%94use-clickable-labels-on-checkboxes/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 07:24:01 +0000</pubDate>
		<dc:creator>Cody Robbins</dc:creator>
		
		<category><![CDATA[Constructive Criticism]]></category>

		<category><![CDATA[Design]]></category>

		<category><![CDATA[Usability]]></category>

		<guid isPermaLink="false">http://blog.wearesakuzaku.com/it%e2%80%99s-2010%e2%80%94use-clickable-labels-on-checkboxes/</guid>
		<description><![CDATA[UPS’s homepage doesn’t make use of a clickable label on its checkbox, frustrating users and potentially decreasing satisfaction with the site. By remembering Fitt’s law we make suggestions to improve the user experience.]]></description>
			<content:encoded><![CDATA[<p>Returning to the UPS homepage I discussed in last week&#8217;s post <a href="http://blog.wearesakuzaku.com/improving-the-ups-homepage-by-remembering-fitt’s-law">Improving the UPS Homepage by Remembering Fitt’s Law<a/>, another problem concerns the checkbox. I’m really dismayed that it’s 2010 now and we therefore live in the future, but we&#8217;re still seeing sites not using <code>&lt;label&gt;</code> elements with checkboxes. And indeed, that is the case here—the &#8216;Remember this location&#8217; label associated with the checkbox on this page is not clickable. This was also pointed out by <a href="http://twitter.com/Patrick_Mc">Patrick McElhaney</a> in a comment on the previous post.</p>
<p style="text-align: center;"><a href="http://blog.wearesakuzaku.com/wp-content/uploads/2010/01/ups_homepage.png"><img src="http://blog.wearesakuzaku.com/wp-content/uploads/2010/01/ups_homepage_thumbnail.png" /></a></p>
<p>This is another instance of where Fitt&#8217;s law applies—the tiny checkbox is a small target area for clicking, and so it makes sense to enlarge it by making the label clickable as a proxy for the checkbox itself. In desktop software on all major platforms (OS X, Linux, and Windows) the label of a checkbox behaves in just that way, and is always clickable.</p>
<p>I should note that, of course, on such a large site as UPS&#8217;s the changes I&#8217;ve been suggesting would have to be backed up by some A/B testing to ensure they achieve the desired effect and do not have any unintended consequences. Of course, too, UPS may be so big and critical to its customers that they would not abandon the site no matter the magnitude of its interface shortcomings. I would be willing to bet, though, that the changes would improve visitor satisfaction if not reduce abandonment, and any site can stand to increase the satisfaction of its users.</p>
<p>Stay tuned for one more critique of this page in an upcoming post!</p>
<div class="rounded_rectangle notification">
<div class="wrapper">
<p>Followup:</p>
<p><a href="http://blog.wearesakuzaku.com/considerations-involved-in-ip-based-geolocation-and-user-language-detection">Considerations Involved in IP-based Geolocation and User Language Detection</a></p>
</p></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.sakuzaku.com/it%e2%80%99s-2010%e2%80%94use-clickable-labels-on-checkboxes/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Improving the UPS Homepage by Remembering Fitt’s Law</title>
		<link>http://blog.sakuzaku.com/improving-the-ups-homepage-by-remembering-fitt%e2%80%99s-law/</link>
		<comments>http://blog.sakuzaku.com/improving-the-ups-homepage-by-remembering-fitt%e2%80%99s-law/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 21:01:11 +0000</pubDate>
		<dc:creator>Cody Robbins</dc:creator>
		
		<category><![CDATA[Constructive Criticism]]></category>

		<category><![CDATA[Design]]></category>

		<category><![CDATA[Usability]]></category>

		<guid isPermaLink="false">http://blog.wearesakuzaku.com/fitt%e2%80%99s-law-and-the-ups-homepage/</guid>
		<description><![CDATA[UPS’s homepage contains a tiny button that’s hard to click, thus presenting a barrier to continuing on to the main site. By remembering Fitt’s law we make suggestions to improve the user experience by enlarging the button.]]></description>
			<content:encoded><![CDATA[<p>Upon navigating to the <a href="http://ups.com/">UPS</a> homepage for the first time, you as the visitor are presented with an interstitial page asking you to choose your country and language so that you can be redirected to a localized version of the site. These interstitial pages are quite common for companies which have global operations and customers in many countries.</p>
<p style="text-align: center;"><a href="http://blog.wearesakuzaku.com/wp-content/uploads/2010/01/ups_homepage.png"><img src="http://blog.wearesakuzaku.com/wp-content/uploads/2010/01/ups_homepage_thumbnail.png" /></a></p>
<p>In the case of UPS this page is generally very understated and well-designed. One way in which it could be improved, though, is by increasing the size of the button. <a href="http://en.wikipedia.org/wiki/Fitts's_law">Fitt&#8217;s law</a> states that the clickability of a target is a function of the target&#8217;s size. The button here is 17×18 pixels—an area of 306 pixels. That’s only 0.0236% of the screen on my 1440×900 display—two ten-thousandths of the available pixels. There’s not much else on this page taking up any space, so there’s plenty of real estate to make this change.</p>
<p>Critically, pages like these are barriers that potentially keep visitors from continuing further into your site. They are simply one more hurdle the user must jump over before doing what they want to do on your site. Presenting visitors with a very small (and therefore difficult to click) button is one additional thing that could lead to premature abandonment. It could be the straw that breaks the camel’s back. There’s a tradeoff between making buttons microscopically small and comically large, and I think this button could definitely be enlarged to minimize the effect of the hurdle of an interstitial page.</p>
<p>What do <em>you</em> think? What else could be improved here? Stay tuned for a couple more posts about this page.</p>
<div class="rounded_rectangle notification">
<div class="wrapper">
<p>Followups:</p>
<p><a href="http://blog.wearesakuzaku.com/it’s-2010—use-clickable-labels-on-checkboxes">It&#8217;s 2010—Use Clickable Labels on Checkboxes</a><br />
    <a href="http://blog.wearesakuzaku.com/considerations-involved-in-ip-based-geolocation-and-user-language-detection">Considerations Involved in IP-based Geolocation and User Language Detection</a></p>
</p></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.sakuzaku.com/improving-the-ups-homepage-by-remembering-fitt%e2%80%99s-law/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Getting on Your Users&#8217; Side</title>
		<link>http://blog.sakuzaku.com/getting-on-your-users-side/</link>
		<comments>http://blog.sakuzaku.com/getting-on-your-users-side/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 09:32:23 +0000</pubDate>
		<dc:creator>Cody Robbins</dc:creator>
		
		<category><![CDATA[Information Design]]></category>

		<category><![CDATA[Nice Touch]]></category>

		<category><![CDATA[Usability]]></category>

		<guid isPermaLink="false">http://blog.wearesakuzaku.com/getting-on-your-users-side/</guid>
		<description><![CDATA[The first thing I looked for when I went to Hulu's page for The Soup was the list of full episodes. Scrolling down the page, though, I found only clips. Rather than leaving me annoyed, clever copywriting on the page made me like Hulu even more.]]></description>
			<content:encoded><![CDATA[<p>The first thing I looked for when I went to Hulu&#8217;s page for <a href="http://www.hulu.com/the-soup">The Soup</a> was the list of full episodes—someone had told me about a particular episode and I wanted to check it out. Scrolling down the page, though, I found only clips. My immediate reaction to discovering this fact was childish but came directly from my gut: I was pissed off. I wanted to see an episode of The Soup, I wanted to see it now, and now Hulu was standing in my way instead of making it easy for me like watching television online should be. Annoyed, I began to click away elsewhere while silently saying to myself, &#8216;I don&#8217;t care about their licensing predicaments and the intricacies of television broadcast rights—why can&#8217;t Hulu just get its act together and get this show so I can watch it?&#8217;</p>
<p>But then I noticed the little notice under the show banner.</p>
<p style="text-align: center;"><a href="/wp-content/uploads/2009/12/hulu_the_soup.png"><img src="/wp-content/uploads/2009/12/hulu_the_soup_thumbnail.png" alt="Screenshot of the Hulu homepage for &lsquo;The Soup&rsquo;" /></a></p>
<p>It says, &#8216;<strong>Full episodes of The Soup are not available for online streaming at this time. We&#8217;ll continue to request them on our users&#8217; behalf.</strong>&#8216; With those two little sentences, Hulu completely reversed the snap negative judgment I had hefted on the site. To the user, those sentences make it clear that not only is Hulu aware that this show is missing full episodes, but that they seem just as dissatisfied with the situation as I do. And what&#8217;s more, they&#8217;re working hard to change the situation.</p>
<p>The wording &#8216;on our user&#8217;s behalf&#8217; is absolutely perfect for the intended effect. It made me feel like Hulu was on my side.</p>
<p>Users are unforgiving, and they&#8217;ll blame everything connected to your site on you even when those things are out of your control. <strong>So when something is out of your control, show the user you&#8217;re on their side.</strong> When you can&#8217;t give your users everything they want, commiserating goes a long way towards making them happy anyways.</p>
<hr />
<p>Hulu goes a lot further than simply dumping boilerplate into this notice box. Many shows have descriptions of how many episodes are available for streaming at once, and when new episodes of the show will return if the show is on a hiatus.</p>
<p style="text-align: center;"><a href="/wp-content/uploads/2009/12/hulu_dollhouse.png"><img src="/wp-content/uploads/2009/12/hulu_dollhouse_thumbnail.png" alt="Screenshot of the Hulu homepage for &lsquo;Dollhouse&rsquo;" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sakuzaku.com/getting-on-your-users-side/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Fixing Maximize Bookmarklets in Safari 4</title>
		<link>http://blog.sakuzaku.com/fixing-maximize-bookmarklets-in-safari-4/</link>
		<comments>http://blog.sakuzaku.com/fixing-maximize-bookmarklets-in-safari-4/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 00:24:09 +0000</pubDate>
		<dc:creator>Cody Robbins</dc:creator>
		
		<category><![CDATA[OS X]]></category>

		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://blog.wearesakuzaku.com/fixing-maximize-bookmarklets-in-safari-4/</guid>
		<description><![CDATA[When Apple released the Safari 4 public beta at the end of February, I discovered an annoying bug: the little Javascript bookmarklet that I use to maximize the browser window didn't work anymore. I traced the bug in the WebKit source and discovered it's a problem with Safari rather than WebKit.]]></description>
			<content:encoded><![CDATA[<p>When Apple released the Safari 4 public beta at the end of February, I discovered an annoying bug: the little Javascript bookmarklet that I use to maximize the browser window didn&#8217;t work anymore. I find the behavior of Safari&#8217;s green zoom button extremely annoying. It doesn&#8217;t expand the browser window to fill the screen, but instead only resizes it to fit the content of the current page. This is typically some weird height and width that causes every subsequent page you view scroll vertically and horizontally.</p>
<p>Of course, Apple&#8217;s Human Interface Guidelines for <a href="http://developer.apple.com/documentation/UserExperience/Conceptual/AppleHIGuidelines/XHIGWindows/XHIGWindows.html#//apple_ref/doc/uid/20000961-BACEDHFG">Resizing and Zooming Windows</a> explain that the zoom button isn&#8217;t actually supposed to expand the window to fill the screen, but toggle the window between a standard application-defined size and a user-defined size. Regardless of what the human interface guidelines say, though, I still don&#8217;t like what it does, and I&#8217;m apparently not the only person. There are <a href="http://www.google.com/search?q=safari+maximize">hundreds of pages</a> asking how to fix it.</p>
<p>In case you&#8217;re wondering, the bookmarklet is:</p>
<div class="code">
javascript:self.moveTo(0,0);self.resizeTo(screen.availWidth,screen.availHeight);
</div>
<p>I simply put the bookmarklet first in my bookmark bar, which lets me maximize Safari by hitting ⌘1. I didn&#8217;t write this little snippet of Javascript, but I can&#8217;t remember where I found it and there are versions of it all over the Web.</p>
<p>So, back to the real story. Upon further investigation, I determined that the bookmarklet only works when the Safari window contains a single tab. If the window has more than one tab, the bookmarklet doesn&#8217;t work. I wasn&#8217;t the only one who noticed this bug, as I found the post <a href="http://www.thisisthegreenroom.com/2009/safari-4-breaks-bookmarklets/">Safari 4 breaks bookmarklets?</a> on <a href="http://thisisthegreenroom.com/">This Is the Green Room</a>.</p>
<p>I figured the problem would be fixed when the final version of Safari 4 was released, but when that happened this past week, the problem remained. Googling a bit, I found <a href="https://bugs.webkit.org/show_bug.cgi?id=24218">WebKit bug 24218</a>, which notes that the Javascript <code>window.moveTo</code> and <code>resizeTo</code> methods do not work in Safari windows with more than one tab.</p>
<p>Since the bug was marked unconfirmed and didn&#8217;t have any activity on it for months, I decided to download the WebKit source and try to track down the cause of the problem. I checked out the WebKit code and built it according to <a href="http://webkit.org/building/checkout.html">the instructions</a>. After digging a bit and setting some breakpoints, I figured out that the following method in <code>WebCore/page/DOMWindow.cpp</code> implements <code>window.moveTo</code> in the Javascript engine:</p>
<div class="code">
void DOMWindow::moveTo(float x, float y) const<br />
{<br />
    if (!m_frame)<br />
        return;</p>
<p>    Page* page = m_frame->page();<br />
    if (!page)<br />
        return;</p>
<p>    if (m_frame != page->mainFrame())<br />
        return;</p>
<p>    FloatRect fr = page->chrome()->windowRect();<br />
    FloatRect sr = screenAvailableRect(page->mainFrame()->view());<br />
    fr.setLocation(sr.location());<br />
    FloatRect update = fr;<br />
    update.move(x, y);<br />
    // Security check (the spec talks about UniversalBrowserWrite to disable this check&#8230;)<br />
    adjustWindowRect(sr, fr, update);<br />
    page->chrome()->setWindowRect(fr);<br />
}
</p></div>
<p>This method basically does some adjustments with the screen and window rectangles, and then finally invokes <code>Chrome::setWindowRect</code> to perform the actual move of the window. Stepping through the method when clicking the bookmarklet with one and two tabs showed that all the rectangle calculations were resulting in the same values regardless of the number of tabs. The invocation of <code>setWindowRect</code> simply wasn&#8217;t moving the window when there was more than one tab.</p>
<p>After a bit of indirection through some other classes, <code>Chrome::setWindowRect</code> calls <code>WebChromeClient::setWindowRect</code> in <code>mac/WebCoreSupport/WebChromeClient.mm</code>:</p>
<div class="code">
void WebChromeClient::setWindowRect(const FloatRect&#038; rect)<br />
{<br />
    NSRect windowRect = toDeviceSpace(rect, [m_webView window]);<br />
    [[m_webView _UIDelegateForwarder] webView:m_webView setFrame:windowRect];<br />
}
</div>
<p>This method basically translates the rectangle coordinates between the scale used by the window and the WebView itself, and then sends <a href="http://developer.apple.com/documentation/Cocoa/Reference/WebKit/Protocols/WebUIDelegate_Protocol/Reference/Reference.html#//apple_ref/doc/uid/20001915-CHDCCBAE"><code>setFrame:windowRect:</code></a> to <code>WebUIDelegate</code>. This delegate is the bridge between WebKit&#8217;s Javascript engine and the actual Cocoa browser window (I think), and WebKit is passing it the correct coordinates to move the window. <code>WebUIDelegate</code>, though, simply doesn&#8217;t move the window as it should when there is more than one tab, which leads me to believe the bug is in Safari itself, not WebKit.</p>
<p>I updated the WebKit bug and filed a new bug for Safari on Radar. I thought for a moment that this behavior might actually be intentional, to prevent pages from resizing the browser window via Javascript when there are other open tabs that would be affected. But since the bookmarklet works in Safari 3, I tend to doubt this new behavior is by design as it would break a lot of existing Javascript. Scripts embedded in an actual page are similarly unable to move or resize the window when there&#8217;s more than one tab open, so the problem doesn&#8217;t have anything to do with the Javascript being in a bookmarklet.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sakuzaku.com/fixing-maximize-bookmarklets-in-safari-4/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Know Your Limits</title>
		<link>http://blog.sakuzaku.com/know-your-limits/</link>
		<comments>http://blog.sakuzaku.com/know-your-limits/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 21:19:57 +0000</pubDate>
		<dc:creator>Matt McVickar</dc:creator>
		
		<category><![CDATA[Applications]]></category>

		<guid isPermaLink="false">http://blog.wearesakuzaku.com/know-your-limits/</guid>
		<description><![CDATA[Limitations. It&#8217;s one of the central tenets of the modern web application design and development aesthetic: less is more; niche-level focus is the path to success; feature creep spells doom and confusion. Limitations keep things on track. Building only what is necessary benefits both developer and user.
But, as with all principles, careful application is key, [...]]]></description>
			<content:encoded><![CDATA[<p>Limitations. It&#8217;s one of the central tenets of the modern web application design and development aesthetic: less is more; niche-level focus is the path to success; feature creep spells doom and confusion. Limitations keep things on track. Building only what is necessary benefits both developer and user.</p>
<p>But, as with all principles, careful application is key, and limits are a sticky subject. Are your limits unexpected? Are they advertised, explained, or easily understood when discovered? <a href="http://blog.wearesakuzaku.com/ive-reached-my-limit-approaches-to-character-number-cutoffs/">What happens when a limit is hit?</a> Is the limit purely a technical one? How much work is saved by placing a limit on something, and do you run the risk of raising user ire by enforcing it? What will you tell your users is the reason for the limitation if they ask? Are you trying to follow a trend of behavior, or set one?</p>
<h3>Twitter</h3>
<p>Twitter limits posts to 140 characters, and largely because of that limitation the platform is the biggest thing since sliced Facebook. Brevity is the cornerstone of Twitter; as a result, <a href="http://blog.wearesakuzaku.com/surly_shortened_urls_from_multiple_browsers_and_services/">URL-shortening services</a> have become a necessity to pack as much into a tweet as possible. You can <a href="http://www.techcrunch.com/2008/08/12/twitters-2000-follow-limit-raises-a-ruckus-but-how-many-people-can-you-seriously-keep-track-of-anyway/">only follow 2000 people</a> on the service, which helps the servers that run Twitter and is a number that no user would be able to realistically keep track of anyway. And, for some reason, <a href="http://www.readwriteweb.com/archives/lifestreambackup_keeping_a_copy.php">only only  162 pages of archived tweets are available</a> — likely another technical limitation designed to reduce load on the historically unreliable Twitter architecture.</p>
<p>Twitter is a great example of an idea successfully based on limits, and the limits it enforces are not conspicuous enough to be annoying. On the other hand, Twitter&#8217;s limits on API usage have irked some deveopers, and when features sometimes disappear in the name of keeping the site live under heavy stress, users are understandably surprised, confused, even angry. As Twitter is iterated upon, these issues should become less and less prevalent, and the expectations of its limits will be fulfilled more consistently.</p>
<h3>Muxtape</h3>
<p>The late great <a href="http://muxtape.com">Muxtape</a> was all about limitations. Each user was limited to a single mix, and each mix was limited to no more than twelve tracks. This kept things from getting indulgent, and doubtlessly saved disk space. On the flip side, users were also limited to only twelve &#8216;favorite&#8217; mixes to save on their profiles. As a frequent Muxtape user, I found this limitation made it difficult to keep track of more than that number of mixes, which presented a problem — I wanted to maintain a list of both friends&#8217; mixes and mixes I wanted to save for later listening. It never kept me from using the site, and it may have been changed in the future, but it was a little annoying.</p>
<h3>Take It to the Limit!</h3>
<p><strong>The key is to make sure your limitations never restrict exploration and excitement, but instead focus on creating those emotions in your users.</strong> For new users, exploring a site&#8217;s purpose can be intimidating and, potentially, a waste of time. If you can condense the message and narrow the feature set, your product will be much easier to understand, and thus easier to participate in. Once a user is in, however, don&#8217;t let them stop at accumulating reasons to revisit the site, or telling friends. Keep things as sticky as possible.</p>
<h4>Helpful Limits</h4>
<ul>
<li>Your site doesn&#8217;t need all of the features it could have. If a problem has already been solved, don&#8217;t replicate — incorporate or eliminate.</li>
<li>Would your site&#8217;s content (user-generated or otherwise) be more compelling if limits were applied to it? What if you only had a sentence to explain each page? What if users&#8217; bios could only be six words long? Restrictions can often provide the frameworks in which participation and creativity truly thrive. Read Peter Bregman&#8217;s <a href="http://blogs.harvardbusiness.org/cs/2009/02/for_fullscale_returns_do_thing.html">Why Doing Things Half Right Gives You the Best Results</a> for an idea of what can happen when users are presented with too many choices.</li>
</ul>
<h4>Hopefully Limitless</h4>
<ul>
<li>Users should be able to have as many friends, favorites, and other &#8220;collectibles&#8221; as they need. If all that data storage is costing you too much to keep it free, make people pay to up their limits. It works for Flickr, and there are a lot of people who would pay for Twitter too.</li>
<li>Explain your limitations upfront, and <a href="http://blog.wearesakuzaku.com/ive-reached-my-limit-approaches-to-character-number-cutoffs/">go easy on users</a> that reach or try to break them.</li>
<li>Limits should look like limits, not like errors or something unfinished.</li>
</ul>
<h3>So?</h3>
<p>Limits and their potential consequences are a helpful structure in which to evaluate the features of your site and every facet of its design — both the system and the interface. Keep limits in mind as you&#8217;re building, and you may end up launching ahead of schedule, saving yourself time and your users the time of figuring out the ins and outs of your site&#8217;s feature-set.</p>
<p>I&#8217;ll leave you with some questions. Which of your favorite services employ limits, and how does it make things easier or more difficult? Is limiting favorites is a mistake? Is there something positive to be said for a limitation that users won&#8217;t like?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sakuzaku.com/know-your-limits/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Wikipedia&#8217;s Babel Userbox</title>
		<link>http://blog.sakuzaku.com/wikipedias-babel-userbox/</link>
		<comments>http://blog.sakuzaku.com/wikipedias-babel-userbox/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 01:59:21 +0000</pubDate>
		<dc:creator>Matt McVickar</dc:creator>
		
		<category><![CDATA[Applications]]></category>

		<guid isPermaLink="false">http://blog.wearesakuzaku.com/designers-needed-part-1-wikipedias-babel-userbox/</guid>
		<description><![CDATA[There are few who would deny that Wikipedia is an incredible resource for information and a testament to the power of an intelligent global human community given basic interconnectivity and the tools to share knowledge. But it&#8217;s not perfect. From a design and usability standpoint, in fact, there&#8217;s a lot wrong. A number of sections [...]]]></description>
			<content:encoded><![CDATA[<p>There are few who would deny that Wikipedia is an incredible resource for information and a testament to the power of an intelligent global human community given basic interconnectivity and the tools to share knowledge. But it&#8217;s not perfect. From a design and usability standpoint, in fact, there&#8217;s a lot wrong. A number of sections and features on the site are downright baffling to use, and poor design is more than prevalent. I could go on for hours, but I&#8217;ll stick to one thing for the moment: something I noticed when I went to update my user-page this morning.</p>
<p>I am a contributor to Wikipedia, and I speak Japanese. To indicate that fact to people that visit my user page, there&#8217;s a box that lists the languages I speak and just how well. (This box, technically called a &#8216;userbox&#8217;, sometimes abbreviated &#8216;UBX&#8217;, is part of the Babel project, and was the first userbox template on Wikipedia. Since its inception, badges for every conceivable attribute have emerged.)</p>
<p><img src="http://blog.wearesakuzaku.com/wp-content/uploads/2009/01/wikipedia_babel_userbox.png" alt="Wikipedia’s Babel userbox for a contributor who speaks native English and level-2 Japanese." class="screenshot" /></p>
<p>I don&#8217;t understand this box. What&#8217;s going on here?</p>
<h3>The numbers don&#8217;t mean anything</h3>
<p>The numbers are somehow meant to signify your proficiency at each particular language, but they are basically meaningless. The questions immediately raised are:</p>
<ul>
<li>Is 2 is a high number or low number?</li>
<li>The range into which a number falls is unclear. Two out of what? Of five? Of ten? Of six hundred quadro-billion?</li>
<li>There&#8217;s no way to tell the particular language skills actually signified by each number. What&#8217;s the difference between a <strong>ja-2</strong> and a <strong>ja-3</strong>? Is it a difference in vocabulary size, conversational ability, etc.?</li>
</ul>
<p>Furthermore, the scale isn&#8217;t limited to just numbers — there&#8217;s a <strong>ja-N</strong> for native speakers. Even more confusingly, I speak English natively, but the template Babel box posted for native English speakers uses only <strong>en</strong>, not <strong>en-N</strong>. (Incidentally, there&#8217;s also an <a href="http://en.wikipedia.org/wiki/Category:User_en-N"><strong>en-N</strong> category</a>). The system is totally inconsistent.</p>
<p><a href="http://en.wikipedia.org/wiki/Wikipedia:Babel">If you read the fine print</a>, it turns out a lower number indicates a lower level of proficiency. There are many different metrics one could use for language proficiency (or any sort of skill, for that matter), and among them both high or low numbers could be used to indicate expertise or accumulated experience. You can be a first-class pilot (a low number) or a Level 64 Gaming-Warlock (a high number). Incidentally, the Babel box numbers are roughly based on the <a href="http://en.wikipedia.org/wiki/ILR_scale">ILR scale</a>, in which a lower number indicates lower proficiency. Contrast this with the <a href="http://en.wikipedia.org/wiki/Japanese_Language_Proficiency_Test">Japanese Language Proficiency Test</a>, where a lower number indicates higher proficiency.</p>
<p>The point is, the nature of the metric being used here needs to be made obvious by showing the bounds of the metric and the significance of each bound.</p>
<h3>The explanatory text is unhelpful</h3>
<p>The Japanese sentence next to the <strong>ja-2</strong> box explains that I&#8217;m a medium-level speaker, but only people who read Japanese can understand that. (And what does speaking have anything to do with it, anyways? This is a website concerned with reading and writing.)</p>
<h3>The design of the box is lacking</h3>
<ul>
<li>Why is it titled &#8216;Wikipedia:Babel&#8217;?</li>
<li>Is there any rhyme or reason to the color scheme?</li>
<li>What does it mean to &#8216;Search user languages&#8217;?</li>
<li>It&#8217;s aesthetically boring at best, ugly at worst.</li>
<li>The syntax for creating userboxes is <a href="http://en.wikipedia.org/wiki/Wikipedia:UBX#Constructing_a_userbox">needlessly confusing</a>.</li>
</ul>
<p>It turns out that investigating the <a href="http://en.wikipedia.org/wiki/Category:User_ja-2">&#8216;medium-level&#8217; link</a> hidden in the explanatory Japanese sentence in my Babel userbox reveals yet another badge:</p>
<p><img src="http://blog.wearesakuzaku.com/wp-content/uploads/2009/01/wikipedia_babel_userbox_ja2.png" alt="Wikipedia’s Babel userbox for Japanese level-2 speakers." class="screenshot" /></p>
<p>Confoundingly, this badge is a different color and is more explanatory, but it&#8217;s hidden away in the Babel userbox documentation pages. It doesn&#8217;t really even make sense as a badge in that context. I give up.</p>
<h3>Why is it such a mess?</h3>
<p>Clearly, the Babel userbox needs work. I chose to focus on this tiny little aspect of the site, but it&#8217;s indicative of a much wider swathe of design and usability flaws on the site in general. But why is this the case? Some insight into Wikipedia&#8217;s defects may be found in two places: Google and open-source software.</p>
<p>Those who find success in Google&#8217;s infamously minimal &#8220;non-design&#8221; point to its ability to sink into the background and make way for the important stuff — search results, emails, etc. Likewise, Wikipedia is about articles. Only the power-user needs to worry about things like revisions, categories, templates, and profile customizations such as the Babel userbox. The article (and editing it) are the strong idea, and Wikipedia has the momentum of quality, quantity, and notoriety, which, like Google&#8217;s search engine and email service, are enough to get beyond what&#8217;s lacking in the interface.</p>
<p><a href="http://web.archive.org/web/20051125183807/http://mpt.phrasewise.com/discuss/msgReader$173">Open source software is plagued by poor usability.</a> As an open-source software project, MediaWiki suffers from many usability problems. This is compounded by the fact that Wikipedia, the encyclopedia built upon it, is itself open to anyone. And those anyones are often experts, but not in the field of design or information architecture. Thus, amateur and suboptimal design is the standard.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sakuzaku.com/wikipedias-babel-userbox/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Anatomy of a Stylesheet Rule</title>
		<link>http://blog.sakuzaku.com/anatomy-of-a-stylesheet-rule/</link>
		<comments>http://blog.sakuzaku.com/anatomy-of-a-stylesheet-rule/#comments</comments>
		<pubDate>Fri, 26 Sep 2008 06:24:59 +0000</pubDate>
		<dc:creator>Matt McVickar</dc:creator>
		
		<category><![CDATA[Information Design]]></category>

		<category><![CDATA[Design]]></category>

		<guid isPermaLink="false">http://blog.wearesakuzaku.com/anatomy-of-a-stylesheet-rule/</guid>
		<description><![CDATA[Is it a rule? A block? Brackets? Braces?]]></description>
			<content:encoded><![CDATA[<p>We were putting together a CSS style guide for a client and created this image as a quick guide to the anatomy of a stylesheet rule. It&#8217;s helpful to have a common vocabulary of terms when talking about something you&#8217;re working on, and even more helpful to know they&#8217;re the right ones.</p>
<p><img src="http://blog.wearesakuzaku.com/wp-content/uploads/2008/09/stylesheet_rule_anatomy.gif" alt="Anatomy of a stylesheet rule" class="screenshot" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sakuzaku.com/anatomy-of-a-stylesheet-rule/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Novelty and Innovation</title>
		<link>http://blog.sakuzaku.com/novelty-and-innovation/</link>
		<comments>http://blog.sakuzaku.com/novelty-and-innovation/#comments</comments>
		<pubDate>Sun, 15 Jun 2008 19:20:58 +0000</pubDate>
		<dc:creator>Matt McVickar</dc:creator>
		
		<category><![CDATA[Design]]></category>

		<category><![CDATA[Commentary]]></category>

		<category><![CDATA[Usability]]></category>

		<guid isPermaLink="false">http://blog.wearesakuzaku.com/novelty-and-innovation/</guid>
		<description><![CDATA[New and different do not innovation make. In fact, the difference is pretty substantial.]]></description>
			<content:encoded><![CDATA[<p>Simply new and different do not innovation make. In fact, the difference is pretty substantial. According to the <a href="http://www.oed.com/">OED</a>:</p>
<blockquote><p>
<em>innovative</em>: featuring new methods; advanced and original.<br />
<em>novel</em>: new or unusual in an interesting way.
</p></blockquote>
<p>I was spurred to write this commentary after seeing a Tumbl&rsquo;d photo of a creative bathroom arrangement by serial entrepreneur and innovator <a href="http://jakoblodwick.com">Jakob Lodwick</a>. Here&rsquo;s the photo, for reference:</p>
<p><img src="http://media.tumblr.com/v6rsP0Lfo76cazv0kpTCbIad_500.jpg" class="photo" /></p>
<div class="caption">An &lsquo;innovative&rsquo; bathroom arrangement.</div>
<p>While I find the arrangement of the toilet paper dispenser interesting, and love that there are people like Jakob out there willing to publish this sort of thing when they discover it, I take issue with it being called &ldquo;innovation.&rdquo; The bathroom <em>does</em> feature &ldquo;new methods&rdquo; (or at least one), and, hey, it&rsquo;s plenty original, but does it fulfill the third requirement? Is it sufficiently advanced?</p>
<p>I call foul. It&rsquo;s interesting that the toilet paper dispenser is screwed into the chair, but at the same time it&rsquo;s a waste of a chair, arguably one of the most functionally perfect inventions in human history. There would perhaps be merit to this if it were posited as an art piece with some message behind the configuration, but that doesn&#8217;t seem to be the case here. I think it would make much more sense to put the basket on the floor, keep the roll in its usual place &mdash; at arm&rsquo;s length on the wall &mdash; and then have an extra chair to use. From a functional design standpoint, it seems more like a misstep than innovation to me. As it stands, the chair is impaired for other uses and the toilet paper dispenser can now be accidentally removed from the bathroom.</p>
<p>I don&#8217;t mean in any way to single out Jakob or indict his creativity. In fact, I&#8217;m not so certain the post wasn&#8217;t entirely tongue-in-cheek. Rather, his photo-and-single-big-word post prompted me to write something I&#8217;d been meaning to articulate for a while. I think in the <a href="http://www.techcrunch.com/2008/02/03/microsoft-responds-to-google-missive-that-was-quick/">slightly feverish atmosphere surrounding the software and web development community</a> nowadays, there is a tendency to get a little too excited about things before they&rsquo;ve either been properly examined or vetted by history.</p>
<p>Novelty is a good thing, and I&rsquo;d hate to live in a world without it. In fact, a lot of innovation &mdash; I&rsquo;d even wager the vast majority of innovation &mdash; comes from experimenting with novel ideas. But novelty is not innovation on its own, no more than simply experimenting with food, machinery, or art (regardless of your credentials) is innovative on its own. The same goes for software. It&rsquo;s the reason things that momentarily enthrall us eventually fade: many of them are just novel. The things that stick, on the other hand &#8212; the wheel, the chair, rock music, Craigslist, the MP3, and the Post-It (literally) &#8212; those are innovative.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sakuzaku.com/novelty-and-innovation/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
