desres.txt 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. January 2003(This article is derived from a keynote talk at the fall 2002 meeting
  2. of NEPLS.)Visitors to this country are often surprised to find that
  3. Americans like to begin a conversation by asking "what do you do?"
  4. I've never liked this question. I've rarely had a
  5. neat answer to it. But I think I have finally solved the problem.
  6. Now, when someone asks me what I do, I look them straight
  7. in the eye and say "I'm designing a
  8. new dialect of Lisp."
  9. I recommend this answer to anyone who doesn't like being asked what
  10. they do. The conversation will turn immediately to other topics.I don't consider myself to be doing research on programming languages.
  11. I'm just designing one, in the same way that someone might design
  12. a building or a chair or a new typeface.
  13. I'm not trying to discover anything new. I just want
  14. to make a language that will be good to program in. In some ways,
  15. this assumption makes life a lot easier.The difference between design and research seems to be a question
  16. of new versus good. Design doesn't have to be new, but it has to
  17. be good. Research doesn't have to be good, but it has to be new.
  18. I think these two paths converge at the top: the best design
  19. surpasses its predecessors by using new ideas, and the best research
  20. solves problems that are not only new, but actually worth solving.
  21. So ultimately we're aiming for the same destination, just approaching
  22. it from different directions.What I'm going to talk about today is what your target looks like
  23. from the back. What do you do differently when you treat
  24. programming languages as a design problem instead of a research topic?The biggest difference is that you focus more on the user.
  25. Design begins by asking, who is this
  26. for and what do they need from it? A good architect,
  27. for example, does not begin by creating a design that he then
  28. imposes on the users, but by studying the intended users and figuring
  29. out what they need.Notice I said "what they need," not "what they want." I don't mean
  30. to give the impression that working as a designer means working as
  31. a sort of short-order cook, making whatever the client tells you
  32. to. This varies from field to field in the arts, but
  33. I don't think there is any field in which the best work is done by
  34. the people who just make exactly what the customers tell them to.The customer is always right in
  35. the sense that the measure of good design is how well it works
  36. for the user. If you make a novel that bores everyone, or a chair
  37. that's horribly uncomfortable to sit in, then you've done a bad
  38. job, period. It's no defense to say that the novel or the chair
  39. is designed according to the most advanced theoretical principles.And yet, making what works for the user doesn't mean simply making
  40. what the user tells you to. Users don't know what all the choices
  41. are, and are often mistaken about what they really want.The answer to the paradox, I think, is that you have to design
  42. for the user, but you have to design what the user needs, not simply
  43. what he says he wants.
  44. It's much like being a doctor. You can't just treat a patient's
  45. symptoms. When a patient tells you his symptoms, you have to figure
  46. out what's actually wrong with him, and treat that.This focus on the user is a kind of axiom from which most of the
  47. practice of good design can be derived, and around which most design
  48. issues center.If good design must do what the user needs, who is the user? When
  49. I say that design must be for users, I don't mean to imply that good
  50. design aims at some kind of
  51. lowest common denominator. You can pick any group of users you
  52. want. If you're designing a tool, for example, you can design it
  53. for anyone from beginners to experts, and what's good design
  54. for one group might be bad for another. The point
  55. is, you have to pick some group of users. I don't think you can
  56. even talk about good or bad design except with
  57. reference to some intended user.You're most likely to get good design if the intended users include
  58. the designer himself. When you design something
  59. for a group that doesn't include you, it tends to be for people
  60. you consider to be less sophisticated than you, not more sophisticated.That's a problem, because looking down on the user, however benevolently,
  61. seems inevitably to corrupt the designer.
  62. I suspect that very few housing
  63. projects in the US were designed by architects who expected to live
  64. in them. You can see the same thing
  65. in programming languages. C, Lisp, and Smalltalk were created for
  66. their own designers to use. Cobol, Ada, and Java, were created
  67. for other people to use.If you think you're designing something for idiots, the odds are
  68. that you're not designing something good, even for idiots.
  69. Even if you're designing something for the most sophisticated
  70. users, though, you're still designing for humans. It's different
  71. in research. In math you
  72. don't choose abstractions because they're
  73. easy for humans to understand; you choose whichever make the
  74. proof shorter. I think this is true for the sciences generally.
  75. Scientific ideas are not meant to be ergonomic.Over in the arts, things are very different. Design is
  76. all about people. The human body is a strange
  77. thing, but when you're designing a chair,
  78. that's what you're designing for, and there's no way around it.
  79. All the arts have to pander to the interests and limitations
  80. of humans. In painting, for example, all other things being
  81. equal a painting with people in it will be more interesting than
  82. one without. It is not merely an accident of history that
  83. the great paintings of the Renaissance are all full of people.
  84. If they hadn't been, painting as a medium wouldn't have the prestige
  85. that it does.Like it or not, programming languages are also for people,
  86. and I suspect the human brain is just as lumpy and idiosyncratic
  87. as the human body. Some ideas are easy for people to grasp
  88. and some aren't. For example, we seem to have a very limited
  89. capacity for dealing with detail. It's this fact that makes
  90. programing languages a good idea in the first place; if we
  91. could handle the detail, we could just program in machine
  92. language.Remember, too, that languages are not
  93. primarily a form for finished programs, but something that
  94. programs have to be developed in. Anyone in the arts could
  95. tell you that you might want different mediums for the
  96. two situations. Marble, for example, is a nice, durable
  97. medium for finished ideas, but a hopelessly inflexible one
  98. for developing new ideas.A program, like a proof,
  99. is a pruned version of a tree that in the past has had
  100. false starts branching off all over it. So the test of
  101. a language is not simply how clean the finished program looks
  102. in it, but how clean the path to the finished program was.
  103. A design choice that gives you elegant finished programs
  104. may not give you an elegant design process. For example,
  105. I've written a few macro-defining macros full of nested
  106. backquotes that look now like little gems, but writing them
  107. took hours of the ugliest trial and error, and frankly, I'm still
  108. not entirely sure they're correct.We often act as if the test of a language were how good
  109. finished programs look in it.
  110. It seems so convincing when you see the same program
  111. written in two languages, and one version is much shorter.
  112. When you approach the problem from the direction of the
  113. arts, you're less likely to depend on this sort of
  114. test. You don't want to end up with a programming
  115. language like marble.For example, it is a huge win in developing software to
  116. have an interactive toplevel, what in Lisp is called a
  117. read-eval-print loop. And when you have one this has
  118. real effects on the design of the language. It would not
  119. work well for a language where you have to declare
  120. variables before using them, for example. When you're
  121. just typing expressions into the toplevel, you want to be
  122. able to set x to some value and then start doing things
  123. to x. You don't want to have to declare the type of x
  124. first. You may dispute either of the premises, but if
  125. a language has to have a toplevel to be convenient, and
  126. mandatory type declarations are incompatible with a
  127. toplevel, then no language that makes type declarations
  128. mandatory could be convenient to program in.In practice, to get good design you have to get close, and stay
  129. close, to your users. You have to calibrate your ideas on actual
  130. users constantly, especially in the beginning. One of the reasons
  131. Jane Austen's novels are so good is that she read them out loud to
  132. her family. That's why she never sinks into self-indulgently arty
  133. descriptions of landscapes,
  134. or pretentious philosophizing. (The philosophy's there, but it's
  135. woven into the story instead of being pasted onto it like a label.)
  136. If you open an average "literary" novel and imagine reading it out loud
  137. to your friends as something you'd written, you'll feel all too
  138. keenly what an imposition that kind of thing is upon the reader.In the software world, this idea is known as Worse is Better.
  139. Actually, there are several ideas mixed together in the concept of
  140. Worse is Better, which is why people are still arguing about
  141. whether worse
  142. is actually better or not. But one of the main ideas in that
  143. mix is that if you're building something new, you should get a
  144. prototype in front of users as soon as possible.The alternative approach might be called the Hail Mary strategy.
  145. Instead of getting a prototype out quickly and gradually refining
  146. it, you try to create the complete, finished, product in one long
  147. touchdown pass. As far as I know, this is a
  148. recipe for disaster. Countless startups destroyed themselves this
  149. way during the Internet bubble. I've never heard of a case
  150. where it worked.What people outside the software world may not realize is that
  151. Worse is Better is found throughout the arts.
  152. In drawing, for example, the idea was discovered during the
  153. Renaissance. Now almost every drawing teacher will tell you that
  154. the right way to get an accurate drawing is not to
  155. work your way slowly around the contour of an object, because errors will
  156. accumulate and you'll find at the end that the lines don't meet.
  157. Instead you should draw a few quick lines in roughly the right place,
  158. and then gradually refine this initial sketch.In most fields, prototypes
  159. have traditionally been made out of different materials.
  160. Typefaces to be cut in metal were initially designed
  161. with a brush on paper. Statues to be cast in bronze
  162. were modelled in wax. Patterns to be embroidered on tapestries
  163. were drawn on paper with ink wash. Buildings to be
  164. constructed from stone were tested on a smaller scale in wood.What made oil paint so exciting, when it
  165. first became popular in the fifteenth century, was that you
  166. could actually make the finished work from the prototype.
  167. You could make a preliminary drawing if you wanted to, but you
  168. weren't held to it; you could work out all the details, and
  169. even make major changes, as you finished the painting.You can do this in software too. A prototype doesn't have to
  170. be just a model; you can refine it into the finished product.
  171. I think you should always do this when you can. It lets you
  172. take advantage of new insights you have along the way. But
  173. perhaps even more important, it's good for morale.Morale is key in design. I'm surprised people
  174. don't talk more about it. One of my first
  175. drawing teachers told me: if you're bored when you're
  176. drawing something, the drawing will look boring.
  177. For example, suppose you have to draw a building, and you
  178. decide to draw each brick individually. You can do this
  179. if you want, but if you get bored halfway through and start
  180. making the bricks mechanically instead of observing each one,
  181. the drawing will look worse than if you had merely suggested
  182. the bricks.Building something by gradually refining a prototype is good
  183. for morale because it keeps you engaged. In software, my
  184. rule is: always have working code. If you're writing
  185. something that you'll be able to test in an hour, then you
  186. have the prospect of an immediate reward to motivate you.
  187. The same is true in the arts, and particularly in oil painting.
  188. Most painters start with a blurry sketch and gradually
  189. refine it.
  190. If you work this way, then in principle
  191. you never have to end the day with something that actually
  192. looks unfinished. Indeed, there is even a saying among
  193. painters: "A painting is never finished, you just stop
  194. working on it." This idea will be familiar to anyone who
  195. has worked on software.Morale is another reason that it's hard to design something
  196. for an unsophisticated user. It's hard to stay interested in
  197. something you don't like yourself. To make something
  198. good, you have to be thinking, "wow, this is really great,"
  199. not "what a piece of shit; those fools will love it."Design means making things for humans. But it's not just the
  200. user who's human. The designer is human too.Notice all this time I've been talking about "the designer."
  201. Design usually has to be under the control of a single person to
  202. be any good. And yet it seems to be possible for several people
  203. to collaborate on a research project. This seems to
  204. me one of the most interesting differences between research and
  205. design.There have been famous instances of collaboration in the arts,
  206. but most of them seem to have been cases of molecular bonding rather
  207. than nuclear fusion. In an opera it's common for one person to
  208. write the libretto and another to write the music. And during the Renaissance,
  209. journeymen from northern
  210. Europe were often employed to do the landscapes in the
  211. backgrounds of Italian paintings. But these aren't true collaborations.
  212. They're more like examples of Robert Frost's
  213. "good fences make good neighbors." You can stick instances
  214. of good design together, but within each individual project,
  215. one person has to be in control.I'm not saying that good design requires that one person think
  216. of everything. There's nothing more valuable than the advice
  217. of someone whose judgement you trust. But after the talking is
  218. done, the decision about what to do has to rest with one person.Why is it that research can be done by collaborators and
  219. design can't? This is an interesting question. I don't
  220. know the answer. Perhaps,
  221. if design and research converge, the best research is also
  222. good design, and in fact can't be done by collaborators.
  223. A lot of the most famous scientists seem to have worked alone.
  224. But I don't know enough to say whether there
  225. is a pattern here. It could be simply that many famous scientists
  226. worked when collaboration was less common.Whatever the story is in the sciences, true collaboration
  227. seems to be vanishingly rare in the arts. Design by committee is a
  228. synonym for bad design. Why is that so? Is there some way to
  229. beat this limitation?I'm inclined to think there isn't-- that good design requires
  230. a dictator. One reason is that good design has to
  231. be all of a piece. Design is not just for humans, but
  232. for individual humans. If a design represents an idea that
  233. fits in one person's head, then the idea will fit in the user's
  234. head too.Related: