{"id":18026,"date":"2012-12-12T11:39:21","date_gmt":"2012-12-12T16:39:21","guid":{"rendered":"http:\/\/www.shamusyoung.com\/twentysidedtale\/?p=18026"},"modified":"2012-12-12T11:39:21","modified_gmt":"2012-12-12T16:39:21","slug":"ok-cancel","status":"publish","type":"post","link":"https:\/\/www.shamusyoung.com\/twentysidedtale\/?p=18026","title":{"rendered":"Ok Cancel"},"content":{"rendered":"<p><table   class=\"\" cellpadding='0' cellspacing='0' border='0' align='center'><tr><td><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/splash_keyboard.jpg' class='insetimage'   alt='splash_keyboard.jpg' title='splash_keyboard.jpg'\/><\/td><\/tr><\/table><\/p>\n<p>Microsoft&#8217;s operating system has many advantages, but &#8220;beauty and grace&#8221; are not among them. Gates figured out early that compatibility and ubiquity trumped looks, grace, security, stability and efficiency, which made him a billionaire. I complain about it, but he&#8217;s a billionaire and I&#8217;m using Windows, so&#8230; hm.<\/p>\n<p>I understand that Microsoft does not have a company culture that fosters a lot of ease-of-use minded development. And that&#8217;s fine, I guess. I don&#8217;t expect high class at Wal-Mart, I don&#8217;t expect heartfelt and bittersweet indie Gen-Y character studies from Lucasfilm, and I don&#8217;t demand photorealistic graphics from Telltale Games. Companies all have their strengths and weaknesses, and they usually do well to stick with what they know rather than mimicking what their differently-designed competitors might be doing.<\/p>\n<p><!--more-->But sometimes the ugliness of Microsoft seems almost willful. Many years ago &#8211; back in the 90&#8217;s, actually &#8211; I ran into an article that revealed Apple&#8217;s approach to dialog boxes: If you&#8217;re going to throw a show-stopping question in the user&#8217;s face, then there are a whole bunch of rules and guidelines for what sort of information should be available and how it should be presented. The most important guideline was that buttons should contain verbs, or actions.<\/p>\n<p>The classic Microsoft dialog is a popup window that says, &#8220;The files you are installing are older than the ones already installed. Do you want to keep these files?&#8221; This box would have Yes \/ No buttons, and maybe a Cancel button if the programmer was feeling really generous. <\/p>\n<p>The user reads the box and still has no idea what &#8220;keep THESE files&#8221; means. Keep the old ones? The new ones? You can read the whole dialog twice and still not be 100% certain what will happen if you hit &#8220;yes&#8221;. Even if it was worded less stupidly, there&#8217;s still a chance that the user might read &#8220;Do you want to keep the newer files?&#8221; as &#8220;Do you want to REPLACE the newer files?&#8221;, thus inverting the question. Yes, it&#8217;s their fault for skimming, but part of designing a good UI is minimizing and mitigating destructive user mistakes.<\/p>\n<p>According to the Apple document I read, a better design would be to replace Yes\/No with &#8220;Install Older Files&#8221; and &#8220;Keep existing Files&#8221;, or something along those lines. Even if the user misunderstands the description, the buttons make it clear what will happen when pressed. <\/p>\n<p>(Another pet peeve: <strong>Popups should always identify themselves<\/strong>. A foolish programmer is likely to title the dialog something like, &#8220;Installer&#8221;, not realizing that this can lead to chaos when someone has the installer running in the background, or run automatically, or is auto-run when putting in a disk. The user will see this dialog pop up and have no idea which program is asking this question or why. Is this drivers? Windows? An update for a game I installed eighteen months ago and haven&#8217;t played since?)<\/p>\n<p>To be fair, I don&#8217;t use Apple products and I have no idea how faithfully they follow the ideas I read. I tend to admire Apple from a distance. <\/p>\n<p>I&#8217;ve always wanted to follow this advice myself, but even after all these years, Microsoft is still mired in the interface design the 1980&#8217;s. That is not an exaggeration. They are stuck in the stone ages. They keep mucking about glossy semitransparent window titles with drop shadows, but they haven&#8217;t even lurched into this century when it comes to interacting with the user. (Nitpick shield: I&#8217;m talking about desktops. I don&#8217;t have any experience with their mobile offerings.)<\/p>\n<p>The reason for this rant is that I wanted to create a little three option popup:<\/p>\n<p>&#8220;Hey, you&#8217;re trying to delete this collection of objects. Do you also want to delete all the children objects?&#8221; <\/p>\n<p>The buttons would be something along the lines of &#8220;Delete just this one&#8221;, &#8220;Delete this &#038; all children&#8221;, and &#8220;Oops. Don&#8217;t delete anything.&#8221;  Or whatever. You get the idea. The point is, the buttons should describe the actions being taken.  But when I read <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/ms645505(v=vs.85).aspx\" title=\"MessageBox function (Windows)\">the Microsoft docs<\/a> I see they haven&#8217;t changed how popups work. You can create popups with fixed combinations of buttons. &#8220;Ok, Cancel&#8221;. &#8220;Abort, Retry, Cancel&#8221;. Or just plain-Jane &#8220;Ok&#8221;. But as far as I can tell, if you want to break from this behavior you have to go all the way to the foundation. You have to create your own window, buttons, text field, and arrange all the elements manually. We&#8217;re talking about <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/ms644996(v=vs.85).aspx#template_in_memory\" title=\"Using Dialog Boxes (Windows)\">a hundred or so of lines of code<\/a>. <\/p>\n<p>Rather than sink a bunch of time into that, I just stuck with the built-in &#8220;Yes, No, Cancel&#8221; dialog. Sure, it&#8217;s stupid and it sucks, but it&#8217;s one line of code and if I wanted to spend all day coding interface features that ought to be built into the OS then I&#8217;d send Microsoft my resume. <\/p>\n<p>And thus the problem is perpetuated. <\/p>\n<p>This always induces a certain degree of coding paranoia. Back in 1984 or so, some young pup of a coder was throwing code together, trying to get the <a href=\"http:\/\/en.wikipedia.org\/wiki\/Windows_1.0\" title=\"Windows 1.0\">Windows 1.0 project<\/a> off the ground. The young man couldn&#8217;t see that the interface paradigm decisions he was making would still be shaping the way people used computers over a quarter century later. Of course, his decisions <em>could<\/em> have been modified or overruled later, but they never were. The interface design lingered into the age of 32-bit computing, into the internet age, into the age of Web 2.0, and now into the age of smartphones. The whole world is changed, and yet we&#8217;ve still got <tt>int WINAPI MessageBox()<\/tt> sitting there under the hood, shaping our software.<\/p>\n<p>We coders never know just how long our code will last. I&#8217;ve had projects where I spent more time coding an application than was spent using it. I&#8217;ve had other situations where a quick two-hour utility would end up lingering for years. <\/p>\n<p>Writing code is a dangerous act. If you&#8217;re not careful, the stuff you write might end up making a difference, for good or for ill.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Microsoft&#8217;s operating system has many advantages, but &#8220;beauty and grace&#8221; are not among them. Gates figured out early that compatibility and ubiquity trumped looks, grace, security, stability and efficiency, which made him a billionaire. I complain about it, but he&#8217;s a billionaire and I&#8217;m using Windows, so&#8230; hm. I understand that Microsoft does not have [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[66],"tags":[],"class_list":["post-18026","post","type-post","status-publish","format-standard","hentry","category-programming"],"_links":{"self":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/18026","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=18026"}],"version-history":[{"count":0,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/18026\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=18026"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=18026"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=18026"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}