Design and Research
January 2003 (This article is derived from a keynote talk at the fall 2002 meeting of NEPLS.) 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.
2003 年 1 月(本文摘自 2002 年秋季 NEPLS 会议上的一次主题演讲。)到访这个国家的游客常常惊讶地发现,美国人喜欢通过问“你是做什么的?”来开始对话。我从来不喜欢这个问题。
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.
Lisp 的新方言。”我向那些不喜欢被问到他们做什么的人推荐这个答案。
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.
当你为一个不包括你在内的群体设计某些东西时,它往往是为那些你认为不如你成熟的人设计的,而不是为那些比你更成熟的人设计的。
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.
C、Lisp 和 Smalltalk 是为他们自己的设计者使用而创建的。
Cobol, Ada, and Java, were created for other people to use.
Cobol、Ada 和 Java 是为其他人使用而创建的。
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.
您不想最终得到像 Marble 这样的编程语言。
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.
例如,在软件开发中拥有一个交互式顶层是一个巨大的胜利,在 Lisp 中被称为读取-评估-打印循环。
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
当您只是在顶层输入表达式时,您希望能够将 x 设置为某个值,然后开始执行操作
to x.
到 x。
You don't want to have to declare the type of x first.
您不想首先声明 x 的类型。
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.
当你把自己写的东西告诉你的朋友时,你会非常敏锐地感受到这种东西对读者来说是一种多么强加的负担。
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.
用石头建造的建筑在木材上进行了较小规模的测试。
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.
它们更像是罗伯特·弗罗斯特(Robert Frost)的“好篱笆造就好邻居”的例子。您可以将良好设计的实例粘在一起,但在每个单独的项目中,必须由一个人来控制。
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:
有关的: