K老在拿图灵奖时的发言:Computer Programming as an Art

很多话说得很透彻,把一些觉比较精彩的摘抄一下。

... It seems to me that if
the authors I studied were writing today, they would agree with the following
characterization: Science is knowledge which we understand so well that we can
teach it to a computer; and if we don‘t fully understand something, it is an art
to deal with it. Since the notion of an algorithm or a computer program provides
us with an extremely useful test for the depth of our knowledge about any given
subject, the process of going from an art to a science means that we learn how
to automate something.

Artificial intelligence has been
making significant progress, yet there is a huge gap between what computers can
do in the foreseeable future and what ordinary people can do. The mysterious
insights that people have when speaking, listening, creating, and even when they
are programming, are still beyond the reach of science; nearly everything we do
is still an art.

... Fifteen years ago computer programming
was so badly understood that hardly anyone even thought about proving programs
correct; we just fiddled with a program until we "knew" it worked. At that time
we didn‘t even know how to express the concept that a program was correct, in
any rigorous way. It is only in recent years that we have been learning about
the processes of abstraction by which programs are written and understood; and
this new knowledge about programming is currently producing great payoffs in
practice, even though few programs are actually proved correct with complete
rigor, since we are beginning to understand the principles of program structure.
The point is that when we write programs today, we know that we could in
principle construct formal proofs of their correctness if we really wanted to,
now that we understand how such proofs are formulated. This scientific basis is
resulting in programs that are significantly more reliable than those we wrote
in former days when intuition was the only basis of correctness.


... Of all the books I‘ve mentioned, Mueller‘s comes
closest to expressing what I want to make the central theme of my talk today, in
terms of real artistry as we now understand the term. He observes: "It was once
thought that the imaginative outlook of the artist was death for the scientist.
And the logic of science seemed to spell doom to all possible artistic flights
of fancy." He goes on to explore the advantages which actually do result from a
synthesis of science and art.

A scientific approach is
generally characterized by the words logical, systematic, impersonal, calm,
rational, while an artistic approach is characterized by the words aesthetic,
creative, humanitarian, anxious, irrational. It seems to me that both of these
apparently contradictory approaches have great value with respect to computer
programming.

... When I speak about computer programming as
an art, I am thinking primarily of it as an art form, in an aesthetic sense. The
chief goal of my work as educator and author is to help people learn how to
write beautiful programs.

... programming can give us both
intellectual and emotional satisfaction, because it is a real achievement to
master complexity and to establish a system of consistent rules.


... I can still remember the great thrill it was for me to
read the listing of Stan Poley‘s SOAP II assembly program in 1958; you probably
think I‘m crazy, and styles have certainly changed greatly since then, but at
the time it meant a great deal to me to see how elegant a system program could
be, especially by comparison with the heavy-handed coding found in other
listings I had been studying at the same time. The possibility of writing
beautiful programs, even in assembly language, is what got me hooked on
programming in the first place.

... When we apply our own
prejudices to "reform" someone else‘s taste, we may be unconsciously denying him
some entirely legitimate pleasure. That‘s why I don‘t condemn a lot of things
programmers do, even though I would never enjoy doing them myself. The important
thing is that they are creating something they feel is
beautiful.

... There are many senses in which a program can
be "good," of course. In the first place, it‘s especially good to have a program
that works correctly. Secondly it is often good to have a program that won‘t be
hard to change, when the time for adaptation arises. Both of these goals are
achieved when the program is easily readable and understandable to a person who
knows the appropriate language.

Another important way for a
production program to be good is for it to interact gracefully with its users,
especially when recovering from human errors in the input data. It‘s a real art
to compose meaningful error messages or to design flexible input formats which
are not error-prone.

Another important aspect of program
quality is the efficiency with which the computer‘s resources are actually being
used. I am sorry to say that many people nowadays are condemning program
efficiency, telling us that it is in bad taste. The reason for this is that we
are now experiencing a reaction from the time when efficiency was the only
reputable criterion of goodness, and programmers in the past have tended to be
so preoccupied with efficiency that they have produced needlessly complicated
code; the result of this unnecessary complexity has been that net efficiency has
gone down, due to difficulties of debugging and
maintenance.

The real problem is that programmers have spent
far too much time worrying about efficiency in the wrong places and at the wrong
times; premature optimization is the root of all evil (or at least most of it)
in programming.

We shouldn‘t be penny wise and pound
foolish, nor should we always think of efficiency in terms of so many percent
gained or lost in total running time or space. When we buy a car, many of us are
almost oblivious to a difference of $50 or $100 in its price, while we might
make a special trip to a particular store in order to buy a 50 cent item for
only 25 cents.

... we should make use of the idea of
limited resources in our own education. We can all benefit by doing occasional
"toy" programs, when artificial restrictions are set up, so that we are forced
to push our abilities to the limit. We shouldn‘t live in the lap of luxury all
the time, since that tends to make us lethargic. The art of tackling
miniproblems with all our energy will sharpen our talents for the real problems,
and the experience will help us to get more pleasure from our accomplishments on
less restricted equipment.

In a similar vein, we shouldn‘t
shy away from "art for art‘s sake"; we shouldn‘t feel guilty about programs that
are just for fun. ... "there is nothing, the utility of which is more
incontestable. To what shall the character of utility be ascribed, if not to
that which is a source of
pleasure?"

最后一节探讨编程工具的优劣问题,及优质的编程工具会给程序员带来的愉悦,好的工具应该给程序员更多细节的反馈而不是把他们当傻子屏蔽掉所有细节等等。

原文地址:http://www.paulgraham.com/knuth.html

时间: 2024-10-12 02:23:56

K老在拿图灵奖时的发言:Computer Programming as an Art的相关文章

图灵奖获得者Richard Hamming的演讲《You and Your Research》读后所感

附原文链接:http://pan.baidu.com/s/1mgHwKDa Richard Hamming是美国贝尔实验室的科学家,图灵奖获得者.最近,拜读了他的You and Your Research演讲,颇受启发. 首先,Richard讲了科研选题的问题.他会去专门花周五一下午时间来去思索整个领域的"大问题".而作为一个博士生来讲,说实话,研究方向其实并不那么自由,我是研究网络安全的,我很喜欢网络攻防.漏洞挖掘一类的课题,但是现在实验室方向主要瞄准了安全机制.云计算,这有点遗憾,

分布式系统---1 图灵奖获奖者Barbara Liskov介绍

分布式领域图灵奖牛人Barbara Liskov 维基介绍,英文原文链接https://en.wikipedia.org/wiki/Barbara_Liskov Barbara Liskov教授,就职于MIT,是美国杰出的计算机科学家,是美国第一位获得计算机科学Ph.D.的女性.1939年出生于加州洛杉矶,1961年在Berkeley获得数学学士学位,1968年在Standford获得计算机博士学位,师从著名的人工智能领域大师John McCathy. 19世纪70年代期间,她发明和研究CLU编

图灵奖得主Judea Pearl:h5棋牌平台出售

近日,h5棋牌平台出售( h5.super-mans.com Q:2012035031)h5棋牌平台出售,并试图为人工智能的未来探路纽约大学教授 Gary Marcus 就对深度学习展开了系统性的批判.此前,图灵奖获得者,UCLA 教授 Judea Pearl 题为<Theoretical Impediments to Machine Learning with Seven Sparks from the Causal Revolution>的论文中,作者就探讨了当前机器学习存在的理论局限性,

AI三巨头获2018年图灵奖!

ACM 宣布,2018 年图灵奖获得者是号称深度学习三巨头的 Yoshua Bengio, Yann LeCun 和 Geoffrey Hinton,得奖理由是:他们在概念和工程上取得的巨大突破,使得深度神经网络成为计算的关键元素(For conceptual and engineering breakthroughs that have made deep neural networks a critical component of computing.). Yoshua Bengio Yo

分布式系统---2 图灵奖获奖者Leslie Lamport的贡献

图灵奖牛人LeslieB. Lamport介绍 英文原文链接https://en.wikipedia.org/wiki/Leslie_Lamport Leslie B. Lamport,生于1941年,美国著名的计算机科学家,以发明分布式关键技术(特别是PAXOS).LATEX.TLA+知名,于2013年获得图灵奖.他1960年在MIT获得数学学士学位,1972年从Brandeis大学获得数学Ph.D,1970~1977在Massachusetts Computer Associates从事计算

图灵奖牛人介绍

维基的图灵奖介绍,英文原文链接https://en.wikipedia.org/wiki/Turing_Award 图灵奖作为计算机领域的世界顶级大奖,从1966年到2015年共有64位牛人获得该奖,其中有3位是杰出女性,超值得点赞,她们分别是Frances E. Allen(编译器优化).Barbara Liskov(编程语言和分布式系统).Shafi Goldwasser(加密算法复杂度理论). 分布式相关的获奖者有2位,分别是Barbara Liskov(ViewStamp Replica

图灵奖--计算机科学童鞋的最高荣誉!

图灵奖,由美国计算机协会(ACM)于1966年设立,又叫“A.M. 图灵奖”,专门奖励那些对计算机事业作出重要贡献的个人.其名称取自计算机科学的先驱.英国科学家.由于图灵奖对获奖条件要求极高,评奖程序又是极严,一般每年只奖励一名计算机科学家,只有极少数年度有两名合作者或在同一方向作出贡献的科学家共享此奖.因此它是计算机界最负盛名.最崇高的一个奖项,有“计算机界的诺贝尔奖”之称. 从1966年到2013年的46届图灵奖,共计有61名科学家获此殊荣,其中美国学者最多,此外还有英国.瑞士.荷兰.以色列

图灵奖

图灵奖(Turing Award),全称“A.M. 图灵奖(A.M Turing Award)” [1-2]  ,由美国计算机协会(ACM)于1966年设立,专门奖励那些对计算机事业作出重要贡献的个人 [1]  .其名称取自计算机科学的先驱.英国科学家艾伦·麦席森·图灵(Alan M. Turing) [1]  .由于图灵奖对获奖条件要求极高,评奖程序又是极严,一般每年只奖励一名计算机科学家,只有极少数年度有两名合作者或在同一方向作出贡献的科学家共享此奖.因此它是计算机界最负盛名.最崇高的一个奖

[Z]图灵奖获得者Richard Karp讲述Berkeley CS的发展史

A Personal View of Computer Science at Berkeley 赤裸裸的吊炸天