{"id":779,"date":"2009-09-18T23:07:52","date_gmt":"2009-09-18T13:07:52","guid":{"rendered":"http:\/\/www.vectorstorm.org\/?p=779"},"modified":"2009-09-21T16:22:17","modified_gmt":"2009-09-21T06:22:17","slug":"reverse-polish-notation-in-interface-design","status":"publish","type":"post","link":"https:\/\/www.vectorstorm.com.au\/2009\/09\/18\/reverse-polish-notation-in-interface-design\/","title":{"rendered":"Reverse polish notation in interface design"},"content":{"rendered":"
Warning: \u00a0long, meandering musing about some basic UI design follows. \u00a0Feel free to ignore this; \u00a0I’m just trying to work some things out in my head.<\/p>\n
When designing a user interface, one of the critical choices that must be made is how the user is going to give commands to the program. \u00a0Traditionally, there are two different ways to do this. \u00a0You can either specify the verb first and then the object, or you can specify the object and then the verb.<\/p>\n
Let’s use a simple calculator as an example. \u00a0Your calculator has an current value, and you first specify an operation (the “verb”), and then a number (the “object” that the verb will operate on), and this results in a new current value on the calculator, and you can repeat. \u00a0So if the current value is 20, and you wish to add 2, you press ‘+’, and then press ‘2’, and then press ‘=’ or ‘enter’, or whatever other button tells the calculator that you’re finished pushing buttons, and the calculator’s current value becomes 22.<\/p>\n
But there’s a second style of calculator which works the other way around, often referred to as reverse polish notation. \u00a0On one of these calculators, you still have a current value as your starting point, but when performing an operation you specify the object before the verb. \u00a0So if the current value is 20, and you wish to add 2, you press ‘2’, and then press ‘+’, and the calculator’s current value becomes 22. \u00a0It’s the same operation, but expressed differently.<\/p>\n
Which is better? \u00a0Well, you could argue that the reverse polish notation version is more efficient; \u00a0you have to push fewer buttons to perform a calculation, as the “verb” button also serves as the “I’m finished typing in the object” button. \u00a0On the other hand, you’d have trouble finding a calculator like this these days, because it’s not the way that most people think about doing math, so it’s kind of inconvenient.<\/p>\n
In most Tycoon games, the User Interface is set up to be verb-object, like common modern calculators. \u00a0And certainly that’s how it worked in MMORPG Tycoon 1. \u00a0You have a toolbox with a bunch of tools in it; \u00a0you first click on the tool you wish to use (the “verb”), and then click on what you want the tool to operate on (the “object”). \u00a0This is how you build and remove buildings, create roads, etc. \u00a0The plus side of this approach is that it makes all the verbs visible right from the start; \u00a0there are no “hidden features” that users might accidentally overlook. \u00a0The down side is that in a UI with a lot of features, it can be overwhelming to provide the user with all these options all at once, and it can easily appear quite cluttered.<\/p>\n
In most other types of game, the User Interface is set up to be object-verb. \u00a0For example, in World of Warcraft, you must first select the enemy you wish to attack (object) before the attack that you wish to use (verb). \u00a0In The Sims, you must select a sim before you can choose what action that sim should take. \u00a0Often, the available verbs don’t even appear on screen until you’ve selected an object, so that the game can only display the applicable verbs. \u00a0(That is, The Sims will present “Call a friend” as an option when you click on a phone, but not when you click on a fish. \u00a0If its input model had gone verb-object instead of object-verb, you would have had to choose “Call a friend” before clicking on the phone, and the game would have had to provide error messages if the user had tried to use the “Call a friend” verb and then clicked on a fish. \u00a0Whereas by only providing the legal verbs for the object clicked on, lots of that type of error simply can’t occur)<\/p>\n
RTS games are particularly interesting, as their base-building orders are typically verb-object (“pick the building type to construct”, then “click where you want it to be built”), whereas their unit orders is typically object-verb (“click the unit, then click a button to tell it what to do”).<\/p>\n
Word processors, image editors, and most other applications are all object-verb as well; \u00a0make a selection, then choose a verb to operate on that selection. \u00a0(Select some text, make it italic. \u00a0Put the cursor somewhere, then type some text to add it there. \u00a0Etc.)<\/p>\n
At the moment, I’m wrestling a bit with the interface on MMORPG Tycoon 2. \u00a0There are certain functions which feel to me like they ought to be expressed as object-verb (for example, removing buildings), and the UI would become much less cluttered and imposing if I could somehow wedge more functionality into context-sensitive menus using that type of approach, instead of having everything be expressed as verb-object, the way it is right now.<\/p>\n
Still thinking about it.<\/p>\n","protected":false},"excerpt":{"rendered":"
Warning: \u00a0long, meandering musing about some basic UI design follows. \u00a0Feel free to ignore this; \u00a0I’m just trying to work some things out in my head. When designing a user interface, one of the critical choices that must be made is how the user is going to give commands to the program. \u00a0Traditionally, there are…<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[24,20,25],"tags":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/po9WK-cz","_links":{"self":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts\/779"}],"collection":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/comments?post=779"}],"version-history":[{"count":0,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts\/779\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/media?parent=779"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/categories?post=779"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/tags?post=779"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}