home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / program / progem / gem8.asc < prev    next >
Encoding:
Text File  |  1987-10-10  |  24.2 KB  |  480 lines

  1.                         *PROFESSIONAL GEM*
  2.                            By Tim Oren
  3.                    Column #8:  USER INTERFACES
  4.                             HOMILY #1
  5.  
  6.      AND NOW FOR SOMETHING COMPLETELY DIFFERENT!  In response to a
  7. number of requests, this installment of ST PRO GEM will be devoted
  8. to examining a few of the principles of computer/human interface
  9. design, or "religion" as some would have it.  I'm going to start
  10. with basic ergonomic laws, and try to draw some conclusions which
  11. are fairly specific to designing for the ST.  If this article
  12. meets with general approval, further "homilies" may appear at
  13. irregular intervals as part of the ST PRO GEM series.
  14.  
  15.      For those who did NOT ask for this topic, it seems fair to
  16. explain why your diet of hard-core technical information has been
  17. interrupted by a sermon!  As a motivater, we might consider why
  18. some programs are said by reviewers to have a "hot" feel (and
  19. hence sell well!) while others are "confusing" or "boring".
  20.  
  21.      Alan Kay has said that "user interface is theatre".  I think
  22. we may be able to take it further, and suggest that a successful
  23. program works a bit of magic, persuading the user to suspend his
  24. disbelief and enter an imaginary world behind the screen, whether
  25. it is the mathematical world of a spreadsheet, or the land of Pacman
  26. pursued by ghosts.
  27.  
  28.      A reader of a novel or science fiction story also suspends
  29. disbelief to participate in the work.  Bad grammar and clumsy plotting
  30. by the author are jarring, and break down the illusion.  Similarly,
  31. a programmer who fails to pay attention to making his interface
  32. fast and consistent will annoy the user, and distract him from
  33. whatever care has been lavished on the functional core of the program.
  34.  
  35.      CREDIT WHERE IT'S DUE.  Before launching into the discussion
  36. of user interface, I should mention that the general treatment and
  37. many of the specific research results are drawn from Card, Newell,
  38. and Moran's landmark book on the topic, which is cited at the end
  39. of the article.  Any errors in interpretation and application to
  40. GEM and the ST are entirely my own, however.
  41.  
  42.      FINGERTIPS.  We'll start right at the user's fingers with the
  43. basic equation governing positioning of the mouse, Fitt's Law,
  44. which is given as
  45.  
  46.      T = I * LOG2( D / S + .5)
  47.  
  48.  where T is the amount of time to move to a target, D is the distance
  49. of the target from the current position, and S is the size of the
  50. target, stated in equivalent units.  LOG2 is the base 2 (binary)
  51. logarithm function, and I is a proportionality constant, about
  52. 100 milliseconds per bit, which corresponds to the human's "clock
  53. rate" for making incremental movements.
  54.  
  55.      We can squeeze an amazing amount of information out of this
  56. formula when attempting to speed up an interface.  Since motion time
  57. goes up with distance, we should arrange the screen with the
  58. usual working area near the center, so the mouse will have to move
  59. a smaller distance on average from a selected object to a menu or
  60. panel.  Likewise, any items which are usually used together should
  61. be placed together.
  62.  
  63.      The most common operations will have the greater impact on
  64. speed, so they should be closest to the working area and perhaps
  65. larger than other icons or menu entries.  If you want to have
  66. all other operations take about the same time, then the targets
  67. farthest from the working area should be larger, and those closer
  68. may be proportionately smaller.
  69.  
  70.      Consider also the implications for dialogs.  Small check boxes
  71. are out.  Large buttons which are easy to hit are in.  There should
  72. be ample space between selectable items to allow for positioning
  73. error.  Dangerous options should be widely separated from common
  74. selections.
  75.  
  76.      MUSCLES.  Anyone who has used the ST Desktop for any period
  77. of time has probably noticed that his fingers now know where to find
  78. the File menu.  This phenomenon is sometimes called "muscle memory",
  79. and its rate of onset is given by the Power Law of Practice:
  80.  
  81.      T(n) = T(1) * n ** (-a)
  82.  
  83. where T(n) is the time on the nth trial, T(1) is the time on the
  84. first trial, and a is approximately 0.4.  (I have appropriated
  85. ** from Fortran as an exponentiation operator, since C lacks one.)
  86.  
  87.      This first thing to note about the Power Law is that it only
  88. works if a target stays in the same place!  This should be a potent
  89. argument against rearranging icons, menus, or dialogs without some
  90. explicit request by the user.  The time to hit a target which moves
  91. around arbitrarily will always be T(1)!
  92.  
  93.      In many cases, the Power Law will also work for sequences of
  94. operations to even greater effect.  If you are a touch typist, you
  95. can observe this effect by comparing how fast you can enter "the"
  96. in comparison to three random letters.  We'll come back shortly
  97. to consider what we can do to encourage this phenomenon.
  98.  
  99.      EYES.  Just as fingers are the way the user sends data to the
  100. computer, so the eyes are his channel from the machine.  The rate
  101. at which information may be passed to the user is determined by
  102. the "cycle time" of his visual processor.  Experimental results
  103. show that this time ranges between 50 and 200 milliseconds.
  104.  
  105.      Events separated by 50 milliseconds or less are always
  106. perceived as a single event.  Those separated by more than 200
  107. milliseconds are always seen as separate.  We can use these
  108. facts in optimizing user of the computer's power when driving the
  109. interface.
  110.  
  111.      Suppose your application's interface contains an icon which
  112. should be inverted when the mouse passes over it.  We now know
  113. that flipping it within one twentieth of a second is necessary
  114. and sufficient.  Therefore, if a "first cut" at the program achieves
  115. this performance, there is no need for further optimization, unless
  116. you want to interleave other operations.  If it falls short, it will
  117. be necessary to do some assembly coding to achieve a smooth feel.
  118.  
  119.      On the other hand, two actions which you want to appear distinct
  120. or convey two different pieces of information must be separated
  121. by an absolute minimum of a fifth of a second, even assuming that
  122. they occur in an identical location on which the user's attention
  123. is already focused.
  124.  
  125.      We are able to influence the visual processing rate within the
  126. 50 to 200 millisecond range by changing the intensity of the stimulus
  127. presented.  This can be done with color, by flashing a target, or
  128. by more subtle enhancements such as bold face type.  For instance,
  129. most people using GEM soon become accustomed to the "paper white"
  130. background of most windows and dialogs.  A dialog which uses a
  131. reverse color scheme, white letters on black, is visually shocking
  132. in its starkness, and will immediately draw the user's eyes.
  133.  
  134.      It should be quickly added that stimulus enhancement will only
  135. work when it unambiguously draws attention to the target.  Three or
  136. four blinking objects scattered around the screen are confusing, and
  137. worse than no enhancement at all!
  138.  
  139.      SHORT-TERM MEMORY.  Both the information gathered by the eyes
  140. and movement commands on their way to the hand pass through short-term
  141. memory (also called working memory).  The amount of information which
  142. can be held in short-term memory at any one time is limited.  You can
  143. demonstrate this limit on yourself by attempting to type a sheet of
  144. random numbers by looking back and forth from the numbers to the
  145. screen.  If you are like most people, you will be able to remember
  146. between five and nine numbers at a time.  So universal is this
  147. finding that it is sometimes called "the magic number seven, plus
  148. or minus two".
  149.  
  150.      This short-term capacity sets a limit on the number of choices
  151. which the user can be expected to grasp at once.  It suggests that
  152. the number of independent choices in a menu, for instance, should
  153. be around seven, and never exceed nine.  If this limit is violated,
  154. then the user will have to take several glances, with pauses to
  155. think, in order to make a choice.
  156.  
  157.      CHUNKING.  The effective capacity of short-term memory can be
  158. increased when several related items are mentally grouped as a "chunk".
  159. Humans automatically adopt this strategy to save themselves time.
  160. For instance, random numbers had to be used instead of text in the
  161. example above, because people do not type their native language as
  162. individual characters.  Instead, they combine the letters into words
  163. and remember these chunks instead.  Put another way, the characters
  164. are no longer considered as individual choices.
  165.  
  166.      A well designed interface should promote the use of chunking
  167. as a strategy by the user.  One easy way is to gather together
  168. related options in a single place.  This is one reason that like
  169. commands are grouped into a single menu which is hidden except for
  170. its title.  If all of the menu options were "in the open", the user
  171. would be overwhelmed with dozens of alternatives at once.  Instead, a
  172. "Show Info" command, for instance, becomes two chunks: pick File
  173. menu, then pick Show.
  174.  
  175.      Sometimes the interface can accomplish the chunking for the user.
  176. Consider the difference between a slider bar in a GEM program, and
  177. a three digit entry field in a text mode application.  Obviously,
  178. the GEM user has fewer decisions to make in order to set the associated
  179. variable.
  180.  
  181.      THINK!  While we are puttering around trying to speed up
  182. the keyboard, the mouse, and the screen, the user is actually
  183. trying to get some work done.  We need to back off now, and
  184. look at the ways of thinking, or cognitive processes, that go into
  185. accomplishing the job.
  186.  
  187.      The user's goal may be to enter and edit a letter, to retrieve
  188. information from a database, or simply draw a picture, but it
  189. probably has very little to do with programming.  In fact, the
  190. Problem Space Principle says that the task can be described as
  191. a set of states of knowledge, a set of operators and associated
  192. constraints for changing the states, and the knowledge to
  193. choose the appropriate operator, which resides in the user's head.
  194.  
  195.      Those with a background in systems theory can consider this
  196. as a somewhat abstract, but straightforward, statement in terms of
  197. state variables and operators.  A programmer might compare the
  198. knowledge states to the values of variables, the operators to
  199. arithmetic and logic operations, the constraints to the rules of
  200. syntax, and the user's knowledge to the algorithm embodied by a
  201. program.
  202.  
  203.      ARE WE NOT MEN?  A rational person will try to attain his
  204. goals (get the job done) by changing the state of his problem space
  205. from its initial state to the goal state.  The initial state,
  206. for instance, might be a blank word processor screen.  The desired
  207. final state is to have a completed business letter on the screen.
  208.  
  209.      The Rationality Principle says that the user's behavior in
  210. typing, mousing, and so on, can be explained by considering the
  211. tasks required to achieve the goal, the operators available to
  212. carry out the tasks, and the limitations on the user's knowledge,
  213. observations, and processing capacity.  This sounds like the
  214. typical user of a computer program must spend a good deal of time
  215. scratching his head and wondering what to do next.  In fact, one
  216. of Card and Moran's key results is that this is NOT what takes place.
  217.  
  218.      What happens, in fact, is that the trained user strikes a sort
  219. of "modus vivendi" with his tool and adopts a set of repetitive,
  220. trained behavior patterns as the best way to get the job done.
  221. He may go so far as to ignore some functions of the program in
  222. order to set up a reliable pattern.  What we are looking for is a
  223. way of measuring and predicting the "quality" of this trained
  224. behavior.  Since using computers is a human endeavor, we should
  225. consider not only the speed with which the task is completed, but
  226. the degree of annoyance or pleasure associated with the process.
  227.  
  228.      Card and Moran constructed a series of behavioral models which
  229. they called GOMS models, for Goals-Operators-Methods-Selection.
  230. These models suggested that in the training process the user
  231. learned to combine the basic operators in sequences (chunks!)
  232. which then became methods for reaching the goals.  Then these
  233. first level methods might be combined again into second level
  234. methods, and so forth, as the learning progressed.
  235.  
  236.      The GOMS models were tested in a lengthy series of trials
  237. at Xerox PARC using a variety of word processing software.  (Among
  238. the subjects of these experiments were the inventors of
  239. the windowing methods used in GEM!)  The results were again
  240. surprising: the level of detail in the models was really unimportant!
  241.  
  242.      It turned out to be sufficient to merely count up the number
  243. of keystrokes, mouse movements, and thought intervals required
  244. by each task.  After summing up all of the tasks, any extra time
  245. for the computer to respond, or the user to move his hands from
  246. keyboard to mouse, or eyes from screen to printed page is added in.
  247. This simplified version is called the Keystroke-Level Model.
  248.  
  249.      As an example of the Keystroke Model, consider the task of
  250. changing a mistyped letter on the screen of a GEM word processor.
  251. This might be broken down as follows: 1) find the letter on the screen;
  252. 2) move hand to mouse; 3) point to letter; 4) click mouse button;
  253. 5) move hand to keyboard; 6) strike "Delete" key; 7) strike key
  254. for new character.
  255.  
  256.      The sufficiency of the Keystroke Model is great news for our
  257. attempt to design faster interfaces.  It says we can concentrate
  258. our efforts on minimizing the number of total actions to be taken,
  259. and making sure that each action is as fast as possible.  We have
  260. already discussed some ways to speed up the mouse and keyboard
  261. actions, so let's now consider how to speed up the thought intervals,
  262. and cut the number of actions.
  263.  
  264.      One way to cut down "think time" is to make sure that the
  265. capacity of short-term memory is not exceeded during the course of
  266. a task.  For example, the fix-a-letter task described above required
  267. the user to remember 1) his place in the overall job of typing the
  268. document; 2) the task he is about to perform; 3) where the bad
  269. character appeared, and 4) what the new character was.  When this
  270. total of items creeps toward seven, the user often loses his place
  271. and commits errors.
  272.  
  273.      You can appreciate the ubiquity of this problem by considering
  274. how many times you have made mistakes nesting parentheses,
  275. or had to go back to count them, because too many things happened
  276. while typing the line to remember the nesting levels. The moral is that
  277. operations with long strings of operands should be avoided when
  278. designing an interface.
  279.  
  280.      The single most important factor in making an interface
  281. comfortable to use is increasing its predictability, and
  282. decreasing the amount of indecision present at each step during
  283. a task.  There is (inevitably) an Uncertainty Principle which
  284. relates the number of choices at each step to the associated
  285. time for thought:
  286.  
  287.      T = I * LOG2 ( N + 1)
  288.  
  289.  where LOG2 is the binary logarithm function, N is the number of
  290. equally probable choices, and I is a constant of approximately
  291. 140 msec/bit.  When the alternates are not equally probable, the
  292. function is more complex:
  293.  
  294.      T = I * SUM-FOR-i-FROM-1-TO-N (P(i) * LOG2( 1 / P(i) + 1) )
  295.  
  296.  where the P(i) are the probabilities of each of the choices (which
  297. must sum to one).  (SUM-FOR-i... is the best I can do for a sigma
  298. operator on-line!)  Those of you with some information theory
  299. background will recognize this formula as the entropy of
  300. the decision; we'll come back to that later.
  301.  
  302.      So what can we learn from this hash?  It turns out, as we might
  303. expect, that we can decrease the decision time by making some
  304. of the user's choices more probable than others.  We do that by
  305. means of feedback cues from the interface.
  306.  
  307.      The important of reliable, continuous meaningful feedback
  308. cannot be emphasized enough.  It helps the beginner learn the system,
  309. and its predictability makes the program comfortable for the expert.
  310. Programs with no feedback, or unreliable cues, produce confusion,
  311. dissonance, and frustration in the user.
  312.  
  313.      This principle is so important that I going to give several
  314. examples from common GEM practice.  The Desktop provides several
  315. instances.  When an object is selected and a menu drops down, only
  316. those choices which are legal for the object are in black.  The
  317. others are dimmed to grey, and are therefore removed from the
  318. decision.  When a pick is made from the menu, the bar entry remains
  319. black until the operation is complete, reassuring the user that
  320. the correct choice was made.  In both the Desktop and the RCS,
  321. items which are double-clicked open up with a "zoom box" from
  322. the object, again showing that the right object was picked.
  323.  
  324.      Other techniques are useful when operator icons are exposed on
  325. the screen.  When an object is picked, the legal operations might
  326. be outlined, or the bad choices might be dimmed.  If the screen
  327. flashing produced by this is objectionable, the legal icons can
  328. be made mouse sensitive, so they will "light up" when the cursor
  329. passes over - again showing the user which choices are legal.
  330.  
  331.      The desire for feedback is so strong that it should be provided
  332. even while the computer is doing an operation on its own.  The hour
  333. glass mouse form is a primitive example of this.  More sophisticated
  334. are "progress indicators" such as animated thermometer bars,
  335. clocks, or text displays of the processing steps.  The ST Desktop
  336. provides examples in the Format and Disk Copy functions.  The purpose
  337. of all of these is to reassure the user that the operation is
  338. progressing normally.  Their lack can lead to amusing spectacles
  339. such as secretaries leaning over to hear if their disk drives are
  340. working!
  341.  
  342.      Another commonly overlooked feature is error prevention and
  343. correction.  Card and Moran's results showed that in order to go
  344. faster, people will tolerate error rates of up to 30% in their
  345. work.  Any program which does not give a fast way to fix mistakes
  346. will be frustrating indeed!
  347.  
  348.      The best way to cope with an error is to "make it didn't happen",
  349. to quote a common child's phrase.  The same feedback methods
  350. discussed above are also effective in preventing the user from
  351. picking inappropriate combinations of objects and operations.
  352. Replacement of numeric type-ins with sliders or other visual
  353. controls eliminates the common "Range Error".  The use of radio
  354. buttons prevents the user from picking incompatible options.
  355. When such techniques are used consistently, the beginner also
  356. gains confidence that he may explore the program without blundering
  357. into errors.
  358.  
  359.      Once an error has occured, the best solution is to have an
  360. "inverse operation" immediately available.  For instance, the way
  361. to fix a bad character is to hit the backspace key.  If a line is
  362. inadvertantly deleted, there should be a way to restore it.
  363.  
  364.      Sometimes the mechanics of providing true inverses are
  365. impractical, or end up cluttering the interface themselves.  In
  366. these cases, a global "Undo" command should be provided to
  367. reverse the effect of the last operation, no matter what it was.
  368.  
  369.      OF MODES AND BANDWIDTH.  Now I am going to depart from
  370. the Card, Newell and Moran thread of discussion to consider
  371. how we can minimize the number of operations in a task by
  372. altering the modes of the interface.  Although "no modes" has
  373. been a watchword of Macintosh developers, the term may need
  374. definition for Atarians.
  375.  
  376.      Simply stated, a mode exists any time you cannot get to
  377. all of the capabilities of the program without taking some
  378. intermediate step.  Familiar examples are old-style "menu-driven"
  379. programs, in which user must make selections from a number of
  380. nested menus in order to perform any operation.  The options
  381. of any one menu are unavailable from the others.
  382.  
  383.      Recall that the user is trying to accomplish work in his
  384. own problem space, by altering its states.  A mode in the
  385. program adds additional states to the problem space, which he is
  386. forced to consider in order to get the job done.  We might call
  387. an interface which is completely modeless "transparent", because it
  388. adds no states between the user and his work.  One of the best
  389. examples of a transparent program is the 15-puzzle in the Macintosh
  390. desk accessory set.  The problem space of rearranging the tiles
  391. is identical between the program and a physical puzzle.
  392.  
  393.      Unfortunately, most programmers find themselves forced to
  394. put modes of some sort into their programs.  These often arise
  395. due to technological limitations, such as memory space, screen
  396. "real estate", or performance limitations of peripherals.  The
  397. question is how the modes can be made least offensive.
  398.  
  399.      I will make the general claim that the frustration which a
  400. mode produces is directly proportional to the amount of the user's
  401. bandwidth which it consumes.  In other words, we need to consider
  402. how many keystrokes, mouse clicks, eye movements, and so on, are
  403. going into manipulating the true problem states, and how many
  404. are being absorbed by the modes of the program.  If the interface
  405. is wasting a large amount of the user's effort, it will be perceived
  406. as slow and annoying.
  407.  
  408.      Here we can consider again the hierarchy of goals and methods
  409. which the user employs.  When the mode is low in the hierarchy,
  410. and close to the user's "fingertips", it is encountered the most
  411. frequently.  For instance, consider how frustrating it would be
  412. to have to hit a function key before typing in each character!
  413.  
  414.      The "menu-driven" style of programs mentioned above are
  415. almost as bad, since usually only one piece of information is
  416. collected at each menu.  Such a program becomes a labyrinth of
  417. states better suited to an adventure game!
  418.  
  419.      The least offensive modes are found at the higher, goal
  420. related levels of the hierarchy.  The better they align with
  421. changes in the state of the original problem, the more they
  422. are tolerated.  For example, a word processing program might
  423. have one screen layout for program editing, another for writing
  424. letters, and yet another while printing the documents.  A
  425. multi-function business package might have one set of menus for
  426. the spreadsheet, another for a graphing module, and a third
  427. for a database.
  428.  
  429.      In some cases the problem solved by the program has convenient
  430. "fracture lines" which can be used to define the modes.  An
  431. example in my own past is the RCS, where the editing of each
  432. type of resource tree forms its own mode, with each of the modes
  433. nested within the overall mode and problem of composing the
  434. entire resource tree.
  435.  
  436.      TO DO IS TO BE!  Any narrative description of user interface
  437. is bound to be lacking.  There is no way text can convey the vibrancy
  438. and tactile pleasure of a good interface, or the sullen boredom
  439. of a bad one.  Therefore, I encourage you to experiment.  Get out
  440. your favorite arcade game and see if you can spot some of the
  441. elements I have described.  Dig into your slush pile for the most
  442. annoying program you have ever seen, run it and see if you can see
  443. mistakes.  How would you fix them?  Then... go do it to your own
  444. program!
  445.  
  446.      AMEN...  This concludes the sermon.  I'd like some Feedback
  447. as to whether you found this Boring Beyond Belief or Really Hot
  448. Stuff.  If enough people are interested, homily number two will
  449. appear a few episodes from now.   The very next installment of ST
  450. PRO GEM will go back to basics to explore VDI drawing primitives.
  451. In the meantime, you might investigate some of the Good Books on
  452. interface design referenced below.
  453.  
  454.      REFERENCES.  Stuart K. Card, Thomas P. Moran, and Allen
  455. Newell, THE PSYCHOLOGY OF HUMAN-COMPUTER INTERACTION, Lawrence
  456. Erlbaum Associates, Hillsdale, New Jersey, 1983.  (Fundamental
  457. and indispensible.  The volume of experimental results make it
  458. weighty.  The Good Parts are at the beginning and end.)
  459.  
  460.      "Macintosh User Interface Guidelines", in INSIDE MACINTOSH,
  461. Apple Computer, Inc., 1984.  (Yes, Atarians, we have something to
  462. learn here.  Though not everything "translates", this is a fine
  463. piece of principled design work.  Read and appreciate.)
  464.  
  465.      James D. Foley, Victor L. Wallace, and Peggy Chan, "The
  466. Human Factors of Computer Graphics Interaction Techniques",
  467. IEEE Computer Graphics (CG & A), November 1984, pp. 13-48.
  468. (A good overview, including higher level topics which I have
  469. postponed to a later article.  Excellent bibliography.)
  470.  
  471.      J. D. Foley and A. Van Dam, FUNDAMENTALS OF INTERACTIVE
  472. COMPUTER GRAPHICS, Addison Wesley, 1984, Chapters 5 and 6.  (If
  473. you can't get the article above, read this.  If you are designing
  474. graphics apps, buy the whole book!  Staggering bibliography.)
  475.  
  476.      Ben Schneidermann, "Direct Manipulation: A Step Beyond
  477. Programming Languages", IEEE Computer, August 1983, pp. 57-69.
  478. (What do Pacman and Visicalc have in common?  Schneidermann's
  479. analysis is vital to creating hot interfaces.)
  480.