(本文改编自作者在 2002 年秋季 NEPLS 会议上的主题演讲。)

(This article is derived from a keynote talk at the fall 2002 meeting of NEPLS.)

来美国旅游的人常常会感到惊讶,因为美国人聊天时总喜欢以“你是做什么的?”来开场。我一直不喜欢这个问题,也几乎从未给出一个体面的回答。不过,我想我终于把这个问题解决了。现在,当有人问我是做什么的时候,我会直视他们的眼睛说:“我正在设计一种新的 Lisp 方言。”我把这个答案推荐给所有不喜欢被问及职业的人。谈话会立刻转到其他话题上。

Visitors to this country are often surprised to find that Americans like to begin a conversation by asking "what do you do?" I've never liked this question. I've rarely had a neat answer to it. But I think I have finally solved the problem. Now, when someone asks me what I do, I look them straight in the eye and say "I'm designing a new dialect of Lisp." I recommend this answer to anyone who doesn't like being asked what they do. The conversation will turn immediately to other topics.

我并不认为自己是在对编程语言进行学术研究。我只是在设计一门语言,就像有人设计一栋建筑、一把椅子或一款新字体一样。我并不试图去发现什么新真理。我只想做一门好用的编程语言。在某些方面,这种预设让事情变得简单得多。

I don't consider myself to be doing research on programming languages. I'm just designing one, in the same way that someone might design a building or a chair or a new typeface. I'm not trying to discover anything new. I just want to make a language that will be good to program in. In some ways, this assumption makes life a lot easier.

设计与学术研究的区别,似乎在于“好”与“新”的权衡。设计不一定要是创新的,但必须是优秀的。学术研究不一定要是优秀的,但必须是创新的。我认为这两条道路在顶峰相会:最优秀的设计通过引入新思想来超越前人,而最优秀的研究则解决了不仅新颖、而且真正值得解决的问题。所以归根结底,我们的终极目标是一致的,只是从不同的方向汇聚而来。

The difference between design and research seems to be a question of new versus good. Design doesn't have to be new, but it has to be good. Research doesn't have to be good, but it has to be new. I think these two paths converge at the top: the best design surpasses its predecessors by using new ideas, and the best research solves problems that are not only new, but actually worth solving. So ultimately we're aiming for the same destination, just approaching it from different directions.

我今天想谈的是,如果从背面看,你们的目标长什么样。当你把编程语言视作一个设计问题,而不是一个学术研究课题时,你的做法会有什么不同?

What I'm going to talk about today is what your target looks like from the back. What do you do differently when you treat programming languages as a design problem instead of a research topic?

最大的不同在于,你会更关注用户。设计始于提问:这是给谁用的?他们需要什么?例如,一个优秀的建筑师不会一上来就搞出一个设计强加给用户,而是先去研究目标用户,弄清楚他们需要什么。

The biggest difference is that you focus more on the user. Design begins by asking, who is this for and what do they need from it? A good architect, for example, does not begin by creating a design that he then imposes on the users, but by studying the intended users and figuring out what they need.

请注意,我说的是“他们需要什么”,而不是“他们想要什么”。我不想让人觉得做设计师就像做快餐店厨师,客户要什么你就做什么。这在艺术的各个领域情况不尽相同,但我认为在任何领域,最优秀的作品绝不是由那些只会对客户言听计从的人做出来的。

Notice I said "what they need," not "what they want." I don't mean to give the impression that working as a designer means working as a sort of short-order cook, making whatever the client tells you to. This varies from field to field in the arts, but I don't think there is any field in which the best work is done by the people who just make exactly what the customers tell them to.

“顾客永远是对的”这句话确实没错,因为衡量设计好坏的标准就是它对用户来说有多好用。如果你写了一部让所有人都觉得沉闷的小说,或者做了一把坐起来极不舒服的椅子,那么你就是把事情搞砸了,仅此而已。这时候,就算你辩解说这部小说或这把椅子是根据最先进的理论原则设计的,也毫无意义。

The customer is always right in the sense that the measure of good design is how well it works for the user. If you make a novel that bores everyone, or a chair that's horribly uncomfortable to sit in, then you've done a bad job, period. It's no defense to say that the novel or the chair is designed according to the most advanced theoretical principles.

然而,做出对用户有用的东西,并不等同于简单地照搬用户的要求。用户并不知道所有的选项是什么,而且常常会误判自己真正想要的东西。

And yet, making what works for the user doesn't mean simply making what the user tells you to. Users don't know what all the choices are, and are often mistaken about what they really want.

我认为这个悖论的答案在于,你必须为用户而设计,但你必须设计他们“需要”的东西,而不仅仅是他们口头上说“想要”的东西。这很像当医生。你不能只针对患者的症状进行治疗。当病人向你陈述症状时,你必须找出真正的病因,并针对病因进行治疗。

The answer to the paradox, I think, is that you have to design for the user, but you have to design what the user needs, not simply what he says he wants. It's much like being a doctor. You can't just treat a patient's symptoms. When a patient tells you his symptoms, you have to figure 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 practice of good design can be derived, and around which most design issues center.

如果优秀的设计必须满足用户的需求,那么谁是用户?当我说明设计必须针对用户时,我并不是说优秀的设计应该去迎合某种“最低共同标准”。你可以选择任何你想要的用户群。例如,如果你在设计一个工具,你可以为从新手到专家的任何人设计,而对一个群体来说是优秀的设计,对另一个群体可能就是糟糕的设计。关键在于,你必须选择某个特定的用户群。我认为,脱离了特定的目标用户,根本无从谈论设计的好坏。

If good design must do what the user needs, who is the user? When I say that design must be for users, I don't mean to imply that good design aims at some kind of lowest common denominator. You can pick any group of users you want. If you're designing a tool, for example, you can design it for anyone from beginners to experts, and what's good design for one group might be bad for another. The point is, you have to pick some group of users. I don't think you can even talk about good or bad design except with reference to some intended user.

如果目标用户中包含设计师本人,你最有可能做出优秀的设计。当你为不包含你自己在内的群体设计东西时,你往往会把他们当成不如你成熟的人,而不是比你更成熟的人。

You're most likely to get good design if the intended users include the designer himself. When you design something for a group that doesn't include you, it tends to be for people you consider to be less sophisticated than you, not more sophisticated.

这是一个问题,因为居高临下地看待用户——无论出于多么善意的意图——似乎不可避免地会腐蚀设计师。我怀疑美国极少有保障性住房是由那些指望自己住进去的建筑师设计的。在编程语言中也能看到同样的情况。C、Lisp 和 Smalltalk 是为了供它们自己的设计师使用而创建的。而 Cobol、Ada 和 Java 则是为了给别人使用而创建的。

That's a problem, because looking down on the user, however benevolently, seems inevitably to corrupt the designer. I suspect that very few housing projects in the US were designed by architects who expected to live in them. You can see the same thing in programming languages. C, Lisp, and Smalltalk were created for their own designers to use. Cobol, Ada, and Java, were created for other people to use.

如果你觉得自己是在为傻瓜设计东西,那么你很可能做不出好东西,哪怕对傻瓜来说也是如此。

If you think you're designing something for idiots, the odds are that you're not designing something good, even for idiots.

不过,即使你是为最成熟的用户设计东西,你依然是在为人类设计。学术研究则不同。在数学中,你选择某种抽象概念不是因为它们容易被人类理解,而是因为它们能让证明过程更简短。我认为科学界大抵如此。科学思想并不是为了符合人体工程学而设计的。

Even if you're designing something for the most sophisticated users, though, you're still designing for humans. It's different in research. In math you don't choose abstractions because they're easy for humans to understand; you choose whichever make the proof shorter. I think this is true for the sciences generally. Scientific ideas are not meant to be ergonomic.

但在艺术领域,情况完全不同。设计完全是关乎人的。人体是一个奇怪的构造,但当你设计一把椅子时,你就是在为这个构造而设计,没有任何妥协的余地。所有的艺术都必须迎合人类的兴趣和局限。例如在绘画中,在其他条件相同的情况下,一幅有人物的画总会比一幅没有人物的画更有趣。文艺复兴时期的名画中都挤满了人,这绝非历史的偶然。如果不是这样,绘画作为一种媒介就不会拥有今天这样的地位。

Over in the arts, things are very different. Design is all about people. The human body is a strange thing, but when you're designing a chair, that's what you're designing for, and there's no way around it. All the arts have to pander to the interests and limitations of humans. In painting, for example, all other things being equal a painting with people in it will be more interesting than one without. It is not merely an accident of history that the great paintings of the Renaissance are all full of people. If they hadn't been, painting as a medium wouldn't have the prestige that it does.

不管你喜不喜欢,编程语言也是给人类使用的,我怀疑人类的大脑就像人类的身体一样,充满了各种凹凸不平的怪癖。有些概念对人来说很容易掌握,有些则不然。例如,我们处理细节的能力似乎非常有限。正是这一事实,才使得编程语言的存在成为一个好主意;如果我们能够处理海量的细节,我们直接用机器语言编程就好了。

Like it or not, programming languages are also for people, and I suspect the human brain is just as lumpy and idiosyncratic as the human body. Some ideas are easy for people to grasp and some aren't. For example, we seem to have a very limited capacity for dealing with detail. It's this fact that makes programing languages a good idea in the first place; if we could handle the detail, we could just program in machine language.

同样要记住的是,语言主要不是用来展示写好的成品程序的,而是用来开发程序的。任何艺术行业的人都能告诉你,在这两种不同的阶段,你可能需要不同的媒介。例如,大理石是一种极好、极耐用的媒介,适合呈现最终的创意,但对于开发新创意来说,它又极其死板、毫无弹性。

Remember, too, that languages are not primarily a form for finished programs, but something that programs have to be developed in. Anyone in the arts could tell you that you might want different mediums for the two situations. Marble, for example, is a nice, durable medium for finished ideas, but a hopelessly inflexible one for developing new ideas.

一个程序就像一个证明,是一棵树经过修剪后的版本,而这棵树在过去曾向四面八方延伸出无数错误的尝试。因此,衡量一门语言的标准,不仅在于最终写出来的程序看起来有多整洁,更在于通往最终程序的道路有多整洁。一个能让你写出优雅成品程序的设计选择,不一定能给你带来优雅的设计过程。例如,我写过一些宏定义宏,里面塞满了嵌套的反引号,现在看起来像一件件小艺术品,但写它们花了我好几个小时进行最丑陋的反复试错,坦率地说,我现在依然不敢完全确定它们是正确的。

A program, like a proof, is a pruned version of a tree that in the past has had false starts branching off all over it. So the test of a language is not simply how clean the finished program looks in it, but how clean the path to the finished program was. A design choice that gives you elegant finished programs may not give you an elegant design process. For example, I've written a few macro-defining macros full of nested backquotes that look now like little gems, but writing them took hours of the ugliest trial and error, and frankly, I'm still not entirely sure they're correct.

我们常常表现得好像衡量一门语言的标准就是成品程序在其中的美观程度。当你看到同一个程序用两种语言写出来,其中一个版本要短得多时,这看起来确实很有说服力。但当你从艺术的角度来审视这个问题时,你就不太会依赖这种测试了。你可不想最终得到一门像大理石一样的编程语言。

We often act as if the test of a language were how good finished programs look in it. It seems so convincing when you see the same program written in two languages, and one version is much shorter. When you approach the problem from the direction of the arts, you're less likely to depend on this sort of test. You don't want to end up with a programming language like marble.

例如,在软件开发中,拥有一个交互式顶层(Lisp 中称为“读取-求值-打印循环”,即 REPL)是一个巨大的优势。而当你拥有这个东西时,会对语言的设计产生实质性的影响。例如,对于一门要求在使用变量前必须先声明的语言,交互式顶层就不好用。当你只是在顶层输入表达式时,你希望能够直接把 x 设为某个值,然后开始对 x 进行操作。你不想先去声明 x 的类型。你可能会反驳这两个前提中的任何一个,但如果一门语言必须有顶层才方便,而强制类型声明又与顶层不兼容,那么任何强制类型声明的语言用起来都不可能方便。

For example, it is a huge win in developing software to have an interactive toplevel, what in Lisp is called a read-eval-print loop. And when you have one this has real effects on the design of the language. It would not work well for a language where you have to declare variables before using them, for example. When you're just typing expressions into the toplevel, you want to be able to set x to some value and then start doing things to x. You don't want to have to declare the type of x first. You may dispute either of the premises, but if a language has to have a toplevel to be convenient, and mandatory type declarations are incompatible with a toplevel, then no language that makes type declarations mandatory could be convenient to program in.

在实践中,要获得优秀的设计,你必须贴近并保持贴近你的用户。你必须不断在真实用户身上校准你的想法,尤其是在起步阶段。简·奥斯汀的小说之所以如此优秀,原因之一是她会把小说大声读给家人听。这就是为什么她从不沉溺于自我感动的风景描写,或自命不凡的哲学说教。(哲学思考是存在的,但它融入了故事之中,而不是像标签一样贴在上面。)如果你打开一本普通的“文学”小说,想象一下把它作为你写的东西大声读给朋友听,你就会太痛切地感受到,这种东西对读者来说是多么大的折磨。

In practice, to get good design you have to get close, and stay close, to your users. You have to calibrate your ideas on actual users constantly, especially in the beginning. One of the reasons Jane Austen's novels are so good is that she read them out loud to her family. That's why she never sinks into self-indulgently arty descriptions of landscapes, or pretentious philosophizing. (The philosophy's there, but it's woven into the story instead of being pasted onto it like a label.) If you open an average "literary" novel and imagine reading it out loud to your friends as something you'd written, you'll feel all too keenly what an imposition that kind of thing is upon the reader.

在软件世界中,这个理念被称为“差即是好”(Worse is Better)。实际上,“差即是好”的概念中混合了好几种不同的想法,这也是为什么人们至今仍在争论“差”是否真的“更好”。但其中的核心思想之一是:如果你在开发新东西,你应该尽快把一个原型推到用户面前。

In the software world, this idea is known as Worse is Better. Actually, there are several ideas mixed together in the concept of Worse is Better, which is why people are still arguing about whether worse is actually better or not. But one of the main ideas in that mix is that if you're building something new, you should get a prototype in front of users as soon as possible.

另一种方法可以被称为“万岁玛利亚”策略(译注:美式橄榄球中指孤注一掷的长传)。你不是快速推出原型并逐步完善它,而是试图通过一次漫长的达阵传球,直接创造出完整、成熟的终极产品。据我所知,这是通往灾难的秘方。在互联网泡沫时期,无数创业公司就是这样自我毁灭的。我从未听说过有哪个成功的案例。

The alternative approach might be called the Hail Mary strategy. Instead of getting a prototype out quickly and gradually refining it, you try to create the complete, finished, product in one long touchdown pass. As far as I know, this is a recipe for disaster. Countless startups destroyed themselves this way during the Internet bubble. I've never heard of a case where it worked.

软件世界之外的人可能没有意识到,“差即是好”的理念在艺术领域随处可见。例如在素描中,这个理念是在文艺复兴时期被发现的。现在,几乎每个素描老师都会告诉你,画出准确图形的正确方法,绝不是沿着物体的轮廓慢慢描摹,因为误差会不断累积,最后你会发现线条根本对不上。相反,你应该先在大概正确的位置快速画几笔,然后逐步完善这个初始草图。

What people outside the software world may not realize is that Worse is Better is found throughout the arts. In drawing, for example, the idea was discovered during the Renaissance. Now almost every drawing teacher will tell you that the right way to get an accurate drawing is not to work your way slowly around the contour of an object, because errors will accumulate and you'll find at the end that the lines don't meet. Instead you should draw a few quick lines in roughly the right place, and then gradually refine this initial sketch.

在大多数领域,传统上原型都是用不同的材料制作的。用金属切割的字体最初是用毛笔在纸上设计的。准备用青铜铸造的雕像最初是用蜡塑造的。准备绣在挂毯上的图案最初是用墨水在纸上画的。准备用石头建造的建筑最初是用木头按比例缩小测试的。

In most fields, prototypes have traditionally been made out of different materials. Typefaces to be cut in metal were initially designed with a brush on paper. Statues to be cast in bronze were modelled in wax. Patterns to be embroidered on tapestries were drawn on paper with ink wash. Buildings to be constructed from stone were tested on a smaller scale in wood.

在 15 世纪油画首次流行时,它之所以如此令人兴奋,是因为你实际上可以直接在原型上创作出成品。如果你愿意,你可以先画一个草图,但你不会被它束缚;在完成画作的过程中,你可以琢磨所有的细节,甚至做出重大的修改。

What made oil paint so exciting, when it first became popular in the fifteenth century, was that you could actually make the finished work from the prototype. You could make a preliminary drawing if you wanted to, but you weren't held to it; you could work out all the details, and even make major changes, as you finished the painting.

在软件中你也可以这样做。原型不一定只是一个模型,你可以把它打磨成最终的产品。我认为只要可以,你就应该这样做。这能让你利用一路上获得的新见解。但或许更重要的一点是,这有利于提振士气。

You can do this in software too. A prototype doesn't have to be just a model; you can refine it into the finished product. I think you should always do this when you can. It lets you take advantage of new insights you have along the way. But perhaps even more important, it's good for morale.

士气是设计中的关键。我很惊讶人们竟然不怎么谈论它。我的第一位素描老师曾告诉我:如果你在画画时感到无聊,画出来的画看起来就会很无聊。例如,假设你要画一栋建筑,你决定把每一块砖都单独画出来。如果你想的话也可以这么做,但如果你画到一半觉得无聊,开始机械式地画砖块而不是观察每一块砖,那么画出来的效果会比你仅仅写意地勾勒出砖块还要糟糕。

Morale is key in design. I'm surprised people don't talk more about it. One of my first drawing teachers told me: if you're bored when you're drawing something, the drawing will look boring. For example, suppose you have to draw a building, and you decide to draw each brick individually. You can do this if you want, but if you get bored halfway through and start making the bricks mechanically instead of observing each one, the drawing will look worse than if you had merely suggested the bricks.

通过逐步完善原型来构建东西有利于提高士气,因为这能让你保持专注。在软件开发中,我的原则是:始终保持代码可运行。如果你正在写的东西能在一个小时内跑通测试,你就会有立竿见影的成就感来激励自己。在艺术领域,尤其是油画中,也是如此。大多数画家都是从模糊的草稿开始,然后逐步细化。如果你以这种方式工作,原则上你永远不需要在一天结束时留下一个看起来完全没完成的东西。事实上,画家们甚至有一句俗话:“一幅画永远没有画完的时候,你只是停止在上面工作了。”任何做过软件的人都会对这个想法感到熟悉。

Building something by gradually refining a prototype is good for morale because it keeps you engaged. In software, my rule is: always have working code. If you're writing something that you'll be able to test in an hour, then you have the prospect of an immediate reward to motivate you. The same is true in the arts, and particularly in oil painting. Most painters start with a blurry sketch and gradually refine it. If you work this way, then in principle you never have to end the day with something that actually looks unfinished. Indeed, there is even a saying among painters: "A painting is never finished, you just stop working on it." This idea will be familiar to anyone who has worked on software.

士气也是很难为不成熟的用户设计东西的另一个原因。你很难对自己都不喜欢的东西保持兴趣。要做出好东西,你必须在心里想:“哇,这真的太棒了”,而不是想:“真是垃圾,不过那帮蠢货会喜欢的。”

Morale is another reason that it's hard to design something for an unsophisticated user. It's hard to stay interested in something you don't like yourself. To make something good, you have to be thinking, "wow, this is really great," not "what a piece of shit; those fools will love it."

设计意味着为人类创造东西。但不仅仅用户是人类,设计师也是人类。

Design means making things for humans. But it's not just the user who's human. The designer is human too.

请注意,我一直在谈论“设计师”(单数)。设计通常必须由一个人掌控才能做好。然而,几个人协作完成一个学术研究项目似乎是完全可行的。这在我看来是学术研究与设计之间最有趣的差异之一。

Notice all this time I've been talking about "the designer." Design usually has to be under the control of a single person to be any good. And yet it seems to be possible for several people to collaborate on a research project. This seems to me one of the most interesting differences between research and design.

艺术史上也有著名的合作案例,但其中大多数似乎更像是分子结合,而不是核聚变。在歌剧中,一个人写词,另一个人谱曲是很常见的。在文艺复兴时期,来自北欧的雇工经常被雇来绘制意大利画作背景中的风景。但这些并不是真正的合作。它们更像是罗伯特·弗罗斯特所说的“好篱笆造就邻里和睦”的例子。你可以把优秀的设计拼凑在一起,但在每个具体的项目内部,必须由一个人说了算。

There have been famous instances of collaboration in the arts, but most of them seem to have been cases of molecular bonding rather than nuclear fusion. In an opera it's common for one person to write the libretto and another to write the music. And during the Renaissance, journeymen from northern Europe were often employed to do the landscapes in the backgrounds of Italian paintings. But these aren't true collaborations. They're more like examples of Robert Frost's "good fences make good neighbors." You can stick instances of good design together, but within each individual project, one person has to be in control.

我并不是说优秀的设计要求一个人包揽所有的想法。没有什么比你信任的人给出的建议更有价值的了。但在讨论结束后,最终决定怎么做的权力必须落在一个人身上。

I'm not saying that good design requires that one person think of everything. There's nothing more valuable than the advice of someone whose judgement you trust. But after the talking is done, the decision about what to do has to rest with one person.

为什么学术研究可以由合作者共同完成,而设计却不行?这是一个有趣的问题。我不知道答案。也许,如果设计和学术研究最终交汇,那么最优秀的研究同样也是优秀的设计,因此实际上也无法由多人合作完成。许多最著名的科学家似乎都是独自工作的。但我了解得还不够多,无法断定这里是否存在某种规律。这也可能仅仅是因为,许多著名的科学家工作时,合作还不那么普遍。

Why is it that research can be done by collaborators and design can't? This is an interesting question. I don't know the answer. Perhaps, if design and research converge, the best research is also good design, and in fact can't be done by collaborators. A lot of the most famous scientists seem to have worked alone. But I don't know enough to say whether there is a pattern here. It could be simply that many famous scientists worked when collaboration was less common.

不管科学界的情况如何,真正的合作在艺术界似乎极其罕见。“委员会设计”就是糟糕设计的代名词。为什么会这样?有什么方法可以打破这个限制吗?

Whatever the story is in the sciences, true collaboration seems to be vanishingly rare in the arts. Design by committee is a synonym for bad design. Why is that so? Is there some way to beat this limitation?

我倾向于认为没有——优秀的设计需要一个独裁者。原因之一是,优秀的设计必须浑然一体。设计不仅是为人类设计的,也是为每一个具体的个体设计的。如果一个设计代表的想法能装进一个人的脑袋里,那么这个想法也能装进用户的脑袋里。

I'm inclined to think there isn't-- that good design requires a dictator. One reason is that good design has to be all of a piece. Design is not just for humans, but for individual humans. If a design represents an idea that fits in one person's head, then the idea will fit in the user's head too.

相关链接:

Related: