The Humble Programmer

IT职场 专栏收录该内容
1 篇文章 0 订阅

The Humble Programmer

Edsger W. Dijkstra


Translated by cdmaok

As a result of a long sequence of coincidences I entered the programming profession officially on the first spring morning of 1952 and as far as I have been able to trace, I was the first Dutchman to do so in my country. 在经过一系列机缘巧合之后,我在1952年春正式选修编程专业。迄今为止,我是一个第一个这样做的有迹可寻的丹麦人。In retrospect the most amazing thing was the slowness with which, at least in my part of the world, the programming profession emerged, a slowness which is now hard to believe. 回想起来,我觉得最惊讶的是,编程专业的出现是现在令人难以置信的缓慢(至少在我看来)。But I am grateful for two vivid recollections from that period that establish that slowness beyond any doubt. 但是现在,我很感激那两段鲜活的建立于那段不可置疑的缓慢的时期的记忆。

After having programmed for some three years, I had a discussion with A. van Wijngaarden, who was then my boss at the Mathematical Centre in Amsterdam, a discussion for which I shall remain grateful to him as long as I live. 在编程多年后,我和我曾经在阿姆斯特丹数学中心的老板A. van Wijingaarden有过一次交流,一次我将会在我余下时光中都感念的交流。The point was that I was supposed to study theoretical physics at the University of Leiden simultaneously, and as I found the two activities harder and harder to combine, I had to make up my mind, either to stop programming and become a real, respectable theoretical physicist, or to carry my study of physics to a formal completion only, with a minimum of effort, and to become....., yes what? A programmer? But was that a respectable profession? 当时讨论的重点是:当时我将要被指派要去莱顿大学同时学习理论物理,我发现这两件事越来越难结合,我需要下定决心,要么放弃编程成为一个真正的,令人尊敬的理论物理学家,要么去花最少的精力学习物理,等待期满之后去当一个什么,程序员?但那是一个令人尊敬的专业?For after all, what was programming? 那么,编程究竟是什么呢?Where was the sound body of knowledge that could support it as an intellectually respectable discipline? 能够证明编程是一门智力上令人尊敬的学科的充分完整的知识在哪里?I remember quite vividly how I envied my hardware colleagues, who, when asked about their professional competence, could at least point out that they knew everything about vacuum tubes, amplifiers and the rest, whereas I felt that, when faced with that question, I would stand empty-handed. 我清楚的记得,我当时多么嫉妒我的从事硬件的同事,因为当他们被问及他们的专业技能时,他们至少能指出他们熟知真空管、放大器和其余器件的一切,而我,面对这些问题时,束手无策。Full of misgivings I knocked on van Wijngaarden's office door, asking him whether I could "speak to him for a moment"; when I left his office a number of hours later, I was another person. 满是焦虑,我敲开了van Wijingaarden的办公室的门,我问他是否有空可以和我聊一聊,当我几个小时之后离开时,我觉得我变了一个人。For after having listened to my problems patiently, he agreed that up till that moment there was not much of a programming discipline, but then he went on to explain quietly that automatic computers were here to stay, that we were just at the beginning and could not I be one of the persons called to make programming a respectable discipline in the years to come? 在耐心的了解我的问题之后,他赞同说当下并没有完整的编程学科,但他紧接着平静的解释了计算机自动化设备发展处于刚开始的阶段,为什么我不可以在未来的几年内成为那些呼吁将编程变成一门令人尊敬的学科的人之一呢?This was a turning point in my life and I completed my study of physics formally as quickly as I could. 这是我人生的一个转折点,我尽可能快的形式上的完成了物理学习。One moral of the above story is, of course, that we must be very careful when we give advice to younger people; sometimes they follow it! 上述故事给我们的启示之一,当我们在给年轻人他们可能遵循的建议时,请谨慎。

Another two years later, in 1957, I married and Dutch marriage rites require you to state your profession and I stated that I was a programmer.在那两年之后,也就是1957年,我结婚了,丹麦的结婚仪式要求陈述你的职业,然后我声明我是一个程序员。 But the municipal authorities of the town of Amsterdam did not accept it on the grounds that there was no such profession.但阿姆斯特丹镇里的市政当局以没有这一职业为由拒绝接受这一说法。 And, believe it or not, but under the heading "profession" my marriage act shows the ridiculous entry "theoretical physicist"! 还有,信不信由你,我的婚姻登记表中职业这一栏下显示的是荒谬的“理论物理学家”。

So much for the slowness with which I saw the programming profession emerge in my own country. 在我生活的国家,我见证了编程专业出现的十分缓慢。Since then I have seen more of the world, and it is my general impression that in other countries, apart from a possible shift of dates, the growth pattern has been very much the same. 在那之后,我更了解全球的时候,我的普遍印象是,在其他国家,除了一些日期上的变换,这个专业的增长模式还是十分相似的。

Let me try to capture the situation in those old days in a little bit more detail, in the hope of getting a better understanding of the situation today. 我尝试着抓住过去的那些日子里那个环境中的一些细节,以期更好的了解今天这个环境。While we pursue our analysis, we shall see how many common misunderstandings about the true nature of the programming task can be traced back to that now distant past. 当我们继续我们的分析时,我们将会发现有多少普遍的关于编程任务的本性的误解可以追溯到距今甚远的过去。

The first automatic electronic computers were all unique, single-copy machines and they were all to be found in an environment with the exciting flavour of an experimental laboratory.第一代电子自动计算机是独特的,单拷贝的机器。它们都是在氛围令人兴奋的实验室中问世的。 Once the vision of the automatic computer was there, its realisation was a tremendous challenge to the electronic technology then available, and one thing is certain: we cannot deny the courage of the groups that decided to try and build such a fantastic piece of equipment. 一旦自动计算机的版本发布,它的实现是对现有电子技术的巨大挑战,但有一件事是可以确定的,我们不能否认那些团体决心尝试和建造这样完美的器件的勇气。For fantastic pieces of equipment they were: in retrospect one can only wonder that those first machines worked at all, at least sometimes.对于那些奇妙的器件而言,回顾过去,它们对这些第一代的机器能够工作至少一段时间而感到惊讶。 The overwhelming problem was to get and keep the machine in working order.让这些机器能够正常工作是一个巨大的问题。 The preoccupation with the physical aspects of automatic computing is still reflected in the names of the older scientific societies in the field, such as the Association for Computing Machinery of the British Computer Society, names in which explicit reference is made to the physical equipment. 自动化计算对物理因素的专注反映在领域内传统科学社团的命名上,例如大不列颠计算机协会的计算机联盟(ACM),命名明确的参考了物理器件。

What about the poor programmer? 那么,关于苦逼的程序员呢?Well, to tell the honest truth: he was hardly noticed. 老实说,他们是没有什么存在感的。For one thing, the first machines were so bulky that you could hardly move them and besides that, they required such extensive maintenance that it was quite natural that the place where people tried to use the machine was the same laboratory where the machine had been developed. 首先,第一代机器都十分庞大以至于你几乎不可能移动它们。除此之外,它们需要全面的维护以至于人们自然而然的在它们问世的同一个实验室继续使用这些机器。Secondly, his somewhat invisible work was without any glamour: you could show the machine to visitors and that was several orders of magnitude more spectacular than some sheets of coding.第二,程序员什么的,工作不引人注目,毫无魅力可言——比起你向来宾展示一大片代码而言,展示机器的壮观程度要比前者高出几个数量级。 But most important of all, the programmer himself had a very modest view of his own work: his work derived all its significance from the existence of that wonderful machine.但更重要的是,程序员本身对他自己的工作有着谦逊的态度——他们所有工作的意义都来源于这个已存在的美妙的机器。 Because that was a unique machine, he knew only too well that his programs had only local significance and also, because it was patently obvious that this machine would have a limited lifetime, he knew that very little of his work would have a lasting value.因为这是一个独一无二的机器,程序员深知他的程序只有本地意义,同时机器生命苦短,代码也难以永恒。 Finally, there is yet another circumstance that had a profound influence on the programmer's attitude to his work: on the one hand, besides being unreliable, his machine was usually too slow and its memory was usually too small, i.e. he was faced with a pinching shoe, while on the other hand its usually somewhat queer order code would cater for the most unexpected constructions.最后,还有一种情况极大的影响了程序员对其工作的态度——一方面,机器运行缓慢,内存容量小,就好比面对一双穿起来生疼的鞋,另一方面,机器有些奇怪的指令码要迎合预料不到的需求。 And in those days many a clever programmer derived an immense intellectual satisfaction from the cunning tricks by means of which he contrived to squeeze the impossible into the constraints of his equipment.在那段日子里,许多聪明的程序员突破机器的限制,通过奇妙的技巧实现“不可能”,从而获得智力上的满足。

Two opinions about programming date from those days.从那段日子开始,关于编程出现了两种观点。 I mention them now, I shall return to them later.我现在提及,稍后再回归。 The one opinion was that a really competent programmer should be puzzle-minded and very fond of clever tricks; the other opinion was that programming was nothing more than optimizing the efficiency of the computational process, in one direction or the other.一种观念是一个有能力的程序员应该有一颗热衷于解题的心和热爱技巧,另一种观念是编程只不过是从某个方向优化计算程序而已。

The latter opinion was the result of the frequent circumstance that, indeed, the available equipment was a painfully pinching shoe, and in those days one often encountered the naive expectation that, one more powerful machine were available, programming would no longer be a problem, for then the struggle to push the machine to its limits would no longer be necessary and that was all what programming was about wasn't it?确实,现有的机器就好比一双令人生疼的鞋,在那些日子里,人总是天真的期望有一台性能更为强大的机器,那么编程不再是一个问题,从而努力突破机器的限制不再是必要的,这不就是编程这个专业吗?第二个观念就是这种频繁发生的情况的产物。 But in the next decades something completely different happened: more powerful machine became available, not just an order of magnitude more powerful, even several orders of magnitude more powerful.但在接下来的几十年里,有些事与预想截然不同的发生了:性能更为强大的机器问世了,不仅仅是一个数量级的性能优化,甚至是好几个数量级的性能提升。 But instead of finding ourselves in the state of eternal bliss of all programming problems solved, we found ourselves up to our necks in the software crisis! 与沉浸在所有编程问题的解决的欣喜若狂相反,我们在软件危机中发现了自身的瓶颈。How come? 怎么会这样?

There is a minor cause: in one or two respects modern machinery is basically more difficult to handle than the old machinery.有一个小的诱因是,现代计算机在一两个方面上总的要比老式计算机难应付。 Firstly, we have got the I/O interrupts, occurring at unpredictable and irreproducible moments; compared with the old sequential machine that pretended to be a fully deterministic automaton, this has been a dramatic change and many a systems programmer's grey hair bears witness to the fact that we should not talk lightly about the logical problems created by that feature. 首先,我们遇到了不可预料和不可再现的I/O中断,和老旧的伪决定性自动机,这是一个戏剧般的半个,许多系统程序员灰白的头发都见证了不可妄谈这一特征所带来的逻辑问题。Secondly, we have got machines equipped with multi-level stores, presenting us problems of management strategy that, in spite of the extensive literature on the subject, still remain rather elusive. 第二,虽然我们有了多级存储的机器,但它同样给我们展示了一个经营策略的问题,尽管学科文献众多,但依旧难以捉摸。So much for the added complication due to structural changes of the actual machines. 而实际机器结构上的变化同样也增加了问题的复杂度。

But I called this a minor cause; the major cause is... that the machines have become several orders of magnitude more powerful! 但是我称之为小的诱因,主要原因是机器的性能提升了几个数量级。To put it quite bluntly: as long as there were no machines, programming was no problem at all; when we had a few weak computers, programming became a mild problem, and now we have gigantic computers, programming had become an equally gigantic problem.直言之,当没有计算机时,根本就不存在编程的问题,当我们有性能稍弱的计算机时,编程也不是什么大问题,当我们有大型计算机时,编程同样的也变成庞大的问题。 In this sense the electronic industry has not solved a single problem, it has only created them, it has created the problem of using its products. 从这种观念出发,电子工业还没有解决创造器件时产生的问题,就遇到了使用这种产品产生的问题。To put it in another way: as the power of available machines grew by a factor of more than a thousand, society's ambition to apply these machines grew in proportion, and it was the poor programmer who found his job in this exploded field of tension between ends and means.换句话说,当现有机器性能提升超过一千倍时,社会渴望其产出成比例提升,只有可怜的程序员发现在这个压力爆棚的领域他的工作只有两条出路,要么给出解决方案,要么走人。 The increased power of the hardware, together with the perhaps even more dramatic increase in its reliability, made solutions feasible that the programmer had not dared to dream about a few years before.硬件性能的提升,伴随着其可靠性也许更为戏剧的提升,使程序员几年前不敢妄想的解决方案变得可行。 And now, a few years later, he had to dream about them and, even worse, he had to transform such dreams into reality!现在,几年后,程序员们不得不去“妄想”,甚至要把这种“妄想” 编程现实。Is it a wonder that we found ourselves in a software crisis? 我们发现自己置身于软件危机中,这是一个神奇的事吗?No, certainly not, and as you may guess, it was even predicted well in advance; but the trouble with minor prophets, of course, is that it is only five years later that you really know that they had been right. 不,肯定不是,你可能会猜,这是可以事先预言到的,但这次麻烦的预言,只不过在五年之后就得知他们是对的。

Then, in the mid-sixties, something terrible happened: the computers of the so-called third generation mad their appearance. 然后,在六十年代中期,一些可怕的事情发生了——所谓的第三代计算机问世。The official literature tells us that their price/performance ratio has been one of the major design objectives.正式文献记载性价比是这一代计算机研发设计的主要目标之一。 But if you take as "performance" the duty cycle of the machines various components, little will prevent you from ending up with a design in which the major part of your performance goal is reached by internal housekeeping activities of doubtful necessity.但是如果你认为性能就是机器不同组件的占空率,那么你将不可避免的把设计实现指向内部对难以捉摸的必要性的活动开支上。 And if your definition of price is the price to be paid for the hardware, little will prevent you from ending up wth a design that is terribly hard to program for: for instance the order code might be such as to enforce, either upon the programmer or upon the system, early binding decisions presenting conflicts that really cannot be resolved.如果你对价格的定义是用于支付硬件的钱,那么你将不可避免的以一个难以编程例如指令码执行要么依靠程序员,要么依靠系统,约束决策,暴露难以解决的冲突的设计而告终。 And to a large extent these unpleasant possibilities seem to have become a reality. 并且很大程度上,这些令人不快的可能性似乎已经成为现实。When these machines were announced and their functional specifications became known, quite a few among us must have become quite miserable; at least I was. 当这些机器面世并且它们的功能特性被熟知时,我们其中相当一部分的人一定变得相当可悲,至少我是。It was only reasonable to expect that such machines would flood the computing community, and it was therefore all the more important that their design should be as sound as possible.仅仅期望这样的机器淹没计算社区才是理性的,因此,重中之重是让他们的设计和听上去的尽可能一致。 But the design embodied such serious flaws that I felt that with a single stroke the progress of computing science had been retarded by at least ten years of frustrating experience, still so many people honestly believed that come law of nature tells us that machines have to be that way. 但是,那些表现出让我觉得如此严重缺陷的设计将破坏计算科学的进步,使这门科学被一段至少十年的令人沮丧的经历所阻碍发展,仍然有很多人真诚的相信自然法则告诉我们这是计算机的必经之路。They silence their doubts by observing how many of these machines have been sold, and derive from that observation the false sense of security that, after all, the design cannot have been that bad. 他们用观察有多少这样的机器售出打消了顾虑,保持沉默,并从观察得出了错误的安全感——这样的设计毕竟也没有这么差。 But upon closer inspection, that line of defense has the same convincing strength as the argument that cigarette smoking must be healthy because so many people do it. 但是透过更为细致的观察,安全的底线变得同样具有说服力,就像因为很多人抽烟所以抽烟一定健康的论据一样。

It is in this connection that I regret that it is not customary for scientific journal in the computing area to publish reviews of newly announced computers in much the same way as we review scientific publications: to review machines would be at least as important. 关于这一点,计算领域的科学期刊不同寻常的发表对新问世的计算机的评论,正如我们评论科学出版物一样,我对此深表遗憾,评论新型机器至少同样重要。And here I have a confession to make: in the early sixties I wrote such a review with the intention of submitting it to the CACM, but in spite of the fact that the few colleagues to whom the text was sent for their advice, urged me all to do so, I did not dare to do it, fearing that the difficulties either for myself or for the editorial board would prove to be too great. 在这里,我需要坦承,在六十年代早期,我写了这样一篇打算投往CACM的评论,尽管我没有发给同事寻求建议,但他们极力主张我这样做,我不敢这样做,害怕不管是对我自身还是编辑部而言,困难都有点太大了。This suppression was an act of cowardice on my side for which I blame myself more and more. 这种压抑是一种让我越发谴责自己的一种懦弱的行为。The difficulties I foresaw were a consequence of the absence of generally accepted criteria, and although I was convinced of the validity of the criteria I had chosen to apply, I feared that my review would be refused or discarded as "a matter of personal taste". 我遇见到的困难是缺少普遍接受的标准的结果和尽管我深信我挑选的标准的有效性,我担心我的评论会被拒绝或者被视为个人品味而舍弃。I still think that such reviews would be extremely useful and I am longing to see them appear, for their accepted appearance would be a sure sign of maturity of the computing community. 我至今认为这样的评论会极度有用,我渴望看到他们出现,因为它们被接受时的样子会成为一个计算社区明显成熟的标志。

The reason that I have paid the above attention to the hardware scene is because I have the feeling that one of the most important aspects of any computing tool is its influence on the thinking habits of those that try to use it, and because I have reasons to believe that that influence is many times stronger than is commonly assumed. 我留意硬件的原因是觉得任何一个计算工具最重要的因素之一是它在思考习惯上对用户的影响,因为我有理由相信这样的影响比一般预设的要深远好几倍。Let us now switch our attention to the software scene. 让我们把注意力转向软件。

Here the diversity has been so large that I must confine myself to a few stepping stones. I am painfully aware of the arbitrariness of my choice and I beg you not to draw any conclusions with regard to my appreciation of the many efforts that will remain unmentioned. 这里多样性如此显著,我必须限制自己在几个立足点上。我很痛苦的意识到我做出选择的武断,于是我请求你不要就我对许多未提及的贡献的欣赏得出任何结论。

In the beginning there was the EDSAC in Cambridge, England, and I think it quite impressive that right from the start the notion of a subroutine library played a central role in the design of that machine and of the way in which it should be used. 起初,在英国剑桥有EDSAC,我认为当时子程序库在机器设计和机器使用方法中扮演主角的观点尤其令人印象深刻。 It is now nearly 25 years later and the computing scene had changed drastically, but the notion of basic software is still with us, and the notion of the closed subroutine is still one of the key concepts in programming. 现在距离当时接近25年过去了,计算领域彻底的变化了,但是基本软件的观念还伴随着我们,闭合子程序的观念也还是我们编程的核心概念之一。We should recognise the closed subroutine as one of the greatest software inventions; it has survived three generations of computers and it will survive a few more, because it caters for the implementation of one of our basic patterns of abstraction. 我们应该认出闭合子程序作为最伟大的软件发明之一,它经历了三代计算机的发展并且它还将继续存活几代,应为它迎合了我们基本的抽象模式的接口思想。Regrettably enough, its importance has been underestimated in the design of the third generation computers, in which the great number of explicitly named registers of the arithmetic unit implies a large overhead on the subroutine mechanism. 第三代计算机中,有大量明确命名为寄存器的算术计算单位,揭示了子程序机制的大量使用。令人扼腕的是,闭合子程序的重要性在第三代计算机设计中被低估了。But even that did not kill the concept of the subroutine, and we can only pray that the mutation won't prove to be hereditary. 但即便这样,也没有让子程序概念就此作古,我们也只能祈祷这种变化不会被证明是遗传的。

The second major development on the software scene that I would like to mention is the birth of FORTRAN. 我想在软件领域提及的第二种主要发展是FORTRAN的诞生。At that time this was a project of great temerity and the people responsible for it deserve our great admiration. 在那时,这是一个伟大而冒失的计划,负责这个计划的人们值得拥有我们伟大的赞美。It would be absolutely unfair to blame them for shortcomings that only became apparent after a decade or so of extensive usage: groups with a successful look-ahead of ten years are quite rare! 因为大约10年后日渐明显的外延用法错误而去责备他们是显然不公平的,能够成功预测十年后的团队相当的罕见。 In retrospect we must rate FORTRAN as a successful coding technique, but with very few effective aids to conception, aids which are now so urgently needed that time has come to consider it out of date.回顾过去,我们必须把FORTRAN看作一项成功,但是基本没有帮助对其概念产生的编码技术,在如此迫切需要帮助的现在认为这项技术已经过时了。 The sooner we can forget that FORTRAN has ever existed, the better, for as a vehicle of thought it is no longer adequate: it wastes our brainpower, is too risky and therefore too expensive to use. 我们越早忘记FORTRAN曾经存在过,越好。对于思想的马车而言,它不再胜任,它浪费了我们的脑力成果,太过于冒险,因此也太奢侈以至于用不起。FORTRAN's tragic fate has been its wide acceptance, mentally chaining thousands of programmers to our past mistakes. FORTRAN悲惨的命运已经因为它广泛的接受度,影响了数以千计的程序员为我们过去的错误买单。 I pray daily that more of my fellow-programmers may find the means of freeing themselves from the curse of compatibility. 我每天祈祷有更多我的程序员伙伴们找到从通用性的祸害中解脱出来的方法。

The third project I would not like to leave unmentioned is LISP, a fascinating enterprise of a completely different nature. 第三个我不想略去的工程是LISP,一个迷人的完全不同类型的计划With a few very basic principles at its foundation, it has shown a remarkable stability. 基于LISP基础的几个基本原则使LISP展示出了非凡的健壮性。Besides that, LISP has been the carrier for a considerable number of in a sense our most sophisticated computer applications. 除此之外,LISP成为我们相当多复杂的计算机程序的载体。LISP has jokingly been described as "the most intelligent way to misuse a computer". LISP曾经被调侃为滥用电脑的最智能的方法。 I think that description a great compliment because it transmits the full flavor of liberation: it has assisted a number of our most gifted fellow humans in thinking previously impossible thoughts. 我想这种描述是一种巨大的赞美,因为它传递了解放的气息——LISP已经帮助许多我们之中最有天赋的人思考了之前不可能思考的东西。

The fourth project to be mentioned is ALGOL 60. 第四个提及的工程是ALGOL60While up to the present day FORTRAN programmers still tend to understand their programming language in terms of the specific implementation they are working with -hence the prevalence of octal and hexadecimal dumps-, while the definition of LISP is still a curious mixture of what the language means and how the mechanism works, the famous Report on the Algorithmic Language ALGOL 60 is the fruit of a genuine effort to carry abstraction a vital step further and to define a programming language in an implementation-independent way.到目前为止,FORTRAN程序员依然倾向于从他们的开发(即八进制的兴起和十六进制的衰落)了解他们的编程语言,当LISP的定义仍然是一种令人好奇的混合物,其中包括这门语言意味着什么和这门机制是怎么工作的,算法语言中的著名报告中说到,ALGOL60是真正努力去承载抽象概念至关重要的一步再加上通过独立于语言之外的方法定义一门编程语言的成果。 One could argue that in this respect its authors have been so successful that they have created serious doubts as to whether it could be implemented at all! 有人会说从这个角度,ALGOL60的作者很成功以至于他们已经对这门语言是否可以实现产生了严肃的疑问。The report gloriously demonstrated the power of the formal method BNF, now fairly known as Backus-Naur-Form, and the power of carefully phrased English, at least when used by someone as brilliant as Peter Naur. 报告辉煌的展示了范式BNF(也就是人尽皆知的Backus-Naur-Form)的作用和谨慎措词的英语的力量,至少,当一个像Peter Naur一样聪明的人在使用时。I think that it is fair to say that only very few documents as short as this have had an equally profound influence on the computing community. 我觉得这种基本没有像它这么短的文档在计算社区有着同等影响力的说法是相当公道的。The ease with which in later years the names ALGOL and ALGOL-like have been used, as an unprotected trade mark, to lend some of its glory to a number of sometimes hardly related younger projects, is a somewhat shocking compliment to its standing. 这种伴随着ALGOL的名字或像是使用ALGOL的舒适,像未经保护的商标,分享了它的部分荣耀给大量基本不相关年轻的语言,就像是对ALGOL的生命力的一种某种程度上令人震惊的致敬。The strength of BNF as a defining language is responsible for what I regard as one of the weaknesses of the language an over-elaborate and not too systematic syntax could now be crammed into the confines of very few pages. BNF作为一门严格定义的语言,它的长处导致了我个人认为是这门语言的缺点——过分精心制作并且语法定义不规则,很难在几页纸中完全说明。 With a device as powerful as BNF, the Report on the Algorithmic Language ALGOL 60 should have been much shorter. 有一个BNF一般强大的设备,算术语言中的ALGOL60报告可以变得更多。Besides that I am getting very doubtful about ALGOL 60's parameter mechanism: it allows the programmer so much combinatorial freedom, that its confident use requires a strong discipline from the programmer. 除此之外,我对ALGOL60的参数机制——赋予程序员更多组合自由表示怀疑,它自信的使用要求程序员更为自律。Besides expensive to implement it seems dangerous to use. 除了开发的高昂成本之外,它使用起来似乎也很危险。

Finally, although the subject is not a pleasant one, I must mention PL/1, a programming language for which the defining documentation is of a frightening size and complexity. 最后,尽管这个项目有点令人不快,但是我必须提及——PL/1,一门描述文档尤其庞大复杂的编程语言。Using PL/1 must be like flying a plane with 7000 buttons, switches and handles to manipulate in the cockpit. 使用PL/1就像开着一架驾驶舱有着7000个按钮,开关和扳手去操纵的飞机。I absolutely fail to see how we can keep our growing programs firmly within our intellectual grip when by its sheer baroqueness the programming language -our basic tool, mind you!- already escapes our intellectual control. 我完全不明白我们怎么靠智力把握用完全怪异的编程语言(我们的基本工具)保持发展的程序的稳定。提醒你,这已经逃离我们智力的掌控了。And if I have to describe the influence PL/1 can have on its users, the closest metaphor that comes to my mind is that of a drug. 还有如果我不得不描述PL/1对其用户的影响,脑海中最为贴近的隐喻就是**。I remember from a symposium on higher level programming language a lecture given in defense of PL/1 by a man who described himself as one of its devoted users.我记得这个隐喻出自于一个自称是PL/1的忠实用户在一个高级设计语言的专题讨论会上做的一个演讲。 But within a one-hour lecture in praise of PL/1. he managed to ask for the addition of about fifty new "features", little supposing that the main source of his problems could very well be that it contained already far too many "features". 但是,在一个为期1小时的表扬PL/1的演讲中,他希望大家添加50种新特性,却不假设他问题的源头是这门语言已经包含了太多的新特性。The speaker displayed all the depressing symptoms of addiction, reduced as he was to the state of mental stagnation in which he could only ask for more, more, more... 演讲者展示了所有令人沮丧的上瘾的症状,他陷入内心停滞,但渴求更多。When FORTRAN has been called as infantile disorder, full PL/1, with its growth characteristics of a dangerous tumour, could turn out to be a fatal disease. FORTRAN被称之为婴儿期的凌乱,完整的P/L1,带着危险肿瘤成长,结果发现是一种致命的疾病。

So much for the past. 关于过去,到此为止。But there is no point in making mistakes unless thereafter we are able to learn from them.但制造错误没有任何意义除非在此之后我们可以从中得到教训。 As a matter of fact, I think that we have learned so much, that within a few years programming can be an activity vastly different from what it has been up till now, so different that we had better prepare ourselves for the shock.事实上,我觉得我们学了这么多以至于通过几年的编程可以变得和之前截然不同。 Let me sketch for you one of the posssible futures.让我简述一下你们可能的未来。 At first sight, this vision of programming in perhaps already the near future may strike you as utterly fantastic. 乍看之下,这种编程的想象也许会让你不久的将来变得十足的不切实际。Let me therefore also add the considerations that might lead one to the conclusion that his vision could be a very real possibility. 因此,也允许我加上也许会让人得出他的想象相对实际的结论的考虑吧。

The vision is that, well before the seventies have run to completion, we shall be able to design and implement the kind of systems that are now straining our programming ability, at the expense of only a few percent in man-years of what they cost us now, and that besides that, these systems will be virtually free of bugs. 这种想象就是,在七十年代结束之前,我们有可能设计和实现那种尽量利用编程能力,开支是许多年前百分之几的系统。此外,这些系统可以几乎摆脱bugsThese two improvements go hand in hand. 这两项提升相辅相成。In the latter respect software seems to be different from many other products, where as a rule a higher quality implies a higher price. 在后一个方面,软件看上去和许多其他产品不同,很多产品质量和价格是成正比的。Those who want really reliable software will discover that they must find means of avoiding the majority of bugs to start with, and as a result the programming process will become cheaper.那些想要真正有效的软件的人将会发现他们必须从找到避免大多数bug的方法开始,最后,编程过程将变得便宜。 If you want more effective programmers, you will discover that they should not waste their time debugging, they should not introduce the bugs to start with. 如果你想要一些有能力的程序员,你将发现他们不会浪费时间在调试上,他们不应该以调试bug作为开始。 In other words: both goals point to the same change. 换句话说,两种目标指向同样的变化。

Such a drastic change in such a short period of time would be a revolution, and to all persons that base their expectations for the future on smooth extrapolation of the recent past -appealing to some unwritten laws of social and cultural inertia- the chance that this drastic change will take place must seem negligible.在如此短的一段时间内发生如此激烈的变革,这会是一场革命,对所有人来说,基于他们对未来的期望,对过去(诉诸不成文的社会,文化惰性的法律)做出的和平推断,这种巨大变革会发生的机会几乎微不足道。 But we all know that sometimes revolutions do take place! 但我们都知道有时候革命真的发生了。And what are the chances for this one? 那么这次变革我们的机遇是什么呢?

There seem to be three major conditions that must be fulfilled. 似乎有三个主要条件需要满足。The world at large must recognize the need for the change; secondly the economic need for it must be sufficiently strongly and, thirdly, the change must be technically feasible.一般来说,世界必须承认需要变化,第二经济需求十分强烈,还有第三,变革在技术上是可行的。 Let me discuss these three conditions in the above order. 让我讨论按顺序讨论一下上述三个条件。

With respect to the recognition of the need for greater reliability of software, I expect no disagreement anymore.谈到对软件更为可靠的需求,我表示完全同意。 Only a few years ago this was different: to talk about a software crisis was blasphemy.在几年前,就不一样了——讨论软件危机是对上帝的亵渎。 The turning point was the Conference on Software Engineering in Garmisch, October 1968, a conference that created a sensation as there occurred the first open admission of the software crisis.转折点是 1968年十月在Garmisch举行的软件工程的学术会议,一次萌生了知觉承认软件危机的回忆。 And by now it is generally recognized that the design of any large sophisticated system is going to be a very difficult job, and whenever one meets people responsible for such undertakings, one finds them very much concerned about the reliability issue, and rightly so. 到目前为止,普遍认为任何大型系统的设计都是一项十分困难的工作,无论何时,人们遇到负责这样工作的人,都会发现他们非常关心可靠性问题。 In short, our first condition seems to be satisfied. 简而言之,我们第一个条件似乎满足了。

Now for the economic need.现在说到经济需求。 Nowadays one often encounters the opinion that in the sixties programming has been an overpaid profession, and that in the coming years programmer salaries may be expected to go down. 现在人们总是遇到说六十年代编程是一个薪酬过高的职业的观点,并且说未来几年内,程序员薪酬希望可以下降。Usually this opinion is expressed in connection with the recession but it could be a symptom of something different and quite healthy, viz. that perhaps the programmers of the past decade have not done so good a job as they should have done.通常,这种观点的表述与经济衰退有关,但这是一种不同,健康的事物的征兆——也许过去几十年里程序员没有很好完成他们应该完成的工作。 Society is getting dissatisfied with the performance of programmers and of their products. 社会对程序员的表现和他们的产品感到不满意。But there is another factor of much greater weight.但还存在另外一种导致重担的因素。 In the present situation it is quite usual that for a specific system, the price to be paid for the development of the software is of the same order of magnitude as the price of the hardware needed, and society more or less accepts that. 现在的情况是,对于特定的系统,为软件升级的价格和升级硬件的价格在同一个数量级,社会或多或少接受了这一点。But hardware manufacturers tell us that in the next decade hardware prices can be expected to drop with a factor of ten. 但硬件制造商告诉我们说在接下来数十年,硬件价格将会以十倍速度下降。If software development were to continue to be the same clumsy and expensive process as it is now, things would get completely out of balance. 如果软件发展还是一如既往的笨拙,程序一如既往的昂贵,局势将失去平衡。You cannot expect society to accept this, and therefore we must learn to program as order of magnitude more effectively.你不能指望社会接受这一点,因此我们必须学会有效的编程。 To put it in another way: as long as machines were the largest item on the budget, the programming profession could get away with its clumsy techniques, but that umbrella will fold rapidly. 换句话说,只要机器还是预算中的大项,那么笨拙的编程技术还能侥幸逃脱,但是保护伞会快的折起来。In short, also our second condition seems to be satisfied. 总之,我们的第二个条件似乎也能满足。

And now the third condition: is it technically feasible? 现在轮到第三个条件,技术上可行吗? I think it might and I shall give you six arguments in support of that opinion.我觉得可行,我会用六个论据支撑我的观点。

A study of program structure had revealed that programs -even alternative programs for the same task and with the same mathematical content- can differ tremendously in their intellectual manageability. 一份程序结构的研究表明程序,即便是同一个任务的替补程序和有着相同的数学内容,在程序管理方面都有着巨大的差异。A number of rules have been discovered, violation of which will either seriously impair or totally destroy the intellectual manageability of the program.研究发现许多规律,违反任何一条规律要么局部或者整体的破坏程序的人为管理。 These rules are of two kinds. 这些规律不外乎两种。Those of the first kind are easily imposed mechanically, viz. by a suitable chosen programming language.第一种容易在物理上加以利用,即选用合适的编程语言。 Examples are the exclusion of goto-statements and of procedures with more than one output parameter. Goto语句的和多输出参数的程序的剔除是很好的佐证。For those of the second kind I at least -but that may be due to lack of competence on my side- see no way of imposing them mechanically, as it seems to need some sort of automatic theorem prover for which I have no existence proof. 对于第二种,我至少看不到物理上使之暴露的方法(可能是我能力不足),好像需要一些我没有证明存在的自动化的定理证明程序。Therefore, for the time being and perhaps forever, the rules of the second kind present themselves as elements of discipline required from the programmer.因此,第二种规律时不时作为程序员训练的要素之一出现。 Some of the rules I have in mind are so clear that they can be taught and that there never needs to be an argument as to whether a given program violates them or not. 有些规律我清楚的知道以至于可以教给他人和不需要判断一段给定的程序是否违反了。Examples are the requirements that no loop should be written down without providing a proof for termination nor without stating the relation whose invariance will not be destroyed by the execution of the repeatable statement. 我们给出必要的例子——任何循环需要给出终止条件或者声明不变量之间的关系保证不变量不会被程序的循环语句执行而破坏。

I now suggest that we confine ourselves to the design and implementation of intellectually manageable programs.我现在提议把我们限制在智能可控程序的设计和实现的范围内。 If someone fears that this restriction is so severe that we cannot live with it, I can reassure him: the class of intellectually manageable programs is still sufficiently rich to contain many very realistic programs for any problem capable of algorithmic solution.如果有些人害怕这种限制过于严格,我们没有办法存活,我保证智能可控程序的种类足够的丰富,可以囊括现实很多能够解决算术问题的程序。 We must not forget that it is not our business to make programs, it is our business to design classes of computations that will display a desired behavior.我们不能忘记我们的职业不是为了编程,而是设计能够表现预设行为的计算类别。 The suggestion of confining ourselves to intellectually manageable programs is the basis for the first two of my announced six arguments. 把我们限制在智能可控程序的建议是我所谓的六个论据的前两个的基础。

Argument one is that, as the programmer only needs to consider intellectually manageable programs, the alternatives he is choosing between are much, much easier to cope with. 论据一,程序员只要考虑智能可控问题,选择更为容易考虑。

Argument two is that, as soon as we have decided to restrict ourselves to the subset of the intellectually manageable programs, we have achieved, once and for all, a drastic reduction of the solution space to be considered. 论据二,我们一决定把我们限制在智能可控程序的子集内,我们就一劳永逸的实现了考虑解决方案的空间的减少。 And this argument is distinct from argument one. 这个论据和论据一不同。

Argument three is based on the constructive approach to the problem of program correctness.论据三是建立在程序正确性问题的建设性方法上的。 Today a usual technique is to make a program and them to test it.今天,一项普通的技术就是写一个程序,然后去测试。 But: program testing can be a very effective way to show the presence of bugs, but is hopelessly inadequate for showing their absence. 尽管,程序测试是一种非常有效的方法去暴露bugs,但对证明不存在bugs几乎是完全没用的。The only effective way to raise the confidence level of a program significantly is to give a convincing proof of its correctness.显著提高程序可信度唯一有效的方法是给出一个令人信服的关于正确性的证据。 But one should not first make the program and then prove its correctness, because then the requirement of providing the proof would only increase the poor programmer's burden.但是我们不应该首先写出程序,然后去证明它的正确性,因为要求证明只会增加苦逼程序员的负担。 On the contrary: the programmer should let correctness proof and program grow hand in hand.相反,程序员应该让正确性证明和程序相互验证,发展。 Argument three is essentially based on the following observation.论据三本质上是从以下的观察得来的。 If one first asks oneself what the structure of a convincing proof would be and, having found this, then constructs a program satisfying this proof's requirements, then these correctness concerns turn out to be a very effective heuristic guidance.如果一个人问自己一个令人信服的证据应该具备什么,他了解后,写了一个很好的满足了证明要求的程序,然后这些关于正确性的担心变成一种有效的启发式的指导。 By definition this approach is only applicable when we restrict ourselves to intellectually manageable programs, but it provides us with effective means for finding a satisfactory one among these. 当我们把自己限制在智能可控程序时,按照定义,只有这种方法是可行,但这种方法也提供许多有效的方法,让我们从中挑选一个满意的。

Argument four has to do with the way in which the amount of intellectual effort needed to design a program depends on the program length.设计一个程序需要多少人力根据程序的长度判断,论据四与此相关。 It has been suggested that there is some kind of law of nature telling us that the amount of intellectual effort needed grows with the square of program length.曾经有人指出存在一种自然法则告诉我们耗费人力是程序长度的平方。 But, thank goodness, no one has been able to prove this law.但是谢天谢地,还没有人能够证明这种法则。 And this is because it need not be true.这是因为它需要是假的。 We all know that the only mental tool be means of which a very finite piece of reasoning can cover a myriad cases is called "abstraction"; as a result the effective exploitation of his powers of abstraction must be regarded as one of the most vital activities of a competent programmer.我们都知道能够解决很多问题的推理论证工具称之为抽象,抽象能力的有效开发可以被认为一个有能力的程序员至关重要的敏捷之一。 In this connection it might be worth-while to point out that the purpose of abstracting is not to be vague, but to create a new semantic level in which one can be absolutely precise.关于这一点,值得指出抽象的意图并不是为了模糊本身,而是去创造新的准确语义水平。 Of course I have tried to find a fundamental cause that would prevent our abstraction mechanisms from being sufficiently effective. 当然,我曾经尝试去找到能够阻止我们抽象机制起作用的基础原因。 But no matter how hard I tried, I do not find such a cause. As a result I tend to the assumption -up till now not disproved by experience- that my suitable application of our powers of abstraction, the intellectual effort needed to conceive or to understand a program need not grow more than proportional to program length.但不管我多么努力,我都找不到任何一个原因。最后,我倾向于假设(直到现在未通过经验证明)我恰当的抽象化能力,也就是人力需要想象或者理解一个程序的耗费不会根据程序长度按照超过正比例的速度增长。 But a by-product of these investigations may be of much greater practical significance, and is, in fact, the basis of my fourth argument.但是这些调查的一个衍生品更有实际意义,实际上,它是我论据四的基础。 The by-product was the identification of a number of patterns of abstraction that play a vital role in the whole process of composing programs. 衍生品是许多在整个编程过程中扮演重要角色的抽象模式的识别。Enough is now known about these patterns of abstraction that you could devote a lecture to about each of them. 你了解这些抽象模式足够多,你就可以就每个模式作报告。What the familiarity and conscious knowledge of these patterns of abstraction imply dawned upon me when I realized that, had they been common knowledge fifteen years ago, the step from BNF to syntax-directed compilers, for instance, could have taken a few minutes instead of a few years.这些抽象模式的熟悉和了解让我幡然醒悟,例如从BNF到方向句法编译,可以用几分钟代替几年的花费。 Therefore I present our recent knowledge of vital abstraction patterns as the fourth argument. 因此,我把我们最近对重要抽象模式的理解作为论据四。

Now for the fifth argument. It has to do with the influence of the tool we are trying to use upon our own thinking habits. 现在说到论据五,它和我们建立在我们思考习惯上的工具的影响有关。I observe a cultural tradition, which in all probability has its roots in the Renaissance, to ignore this influence, to regard the human mind as the supreme and autonomous master of its artefacts.我观察到一种十有八九来源于文艺复兴的文化传统,为了忽略这种影响,需要把人心视为肉体最高自主的主人。 But if I start to analyse the thinking habits of myself and of my fellow human beings, I come, whether I like it or not, to a completely different conclusion, viz. that the tools we are trying to use and the language or notation we are using to express or record our thoughts, are the major factors determining what we can think or express at all! 但我一开始分析我和同类的思考习惯时,我得到一个完全不同的结论,不管我喜欢与否,即我们使用的工具和我们用来表达或者记录我们想法的语言或记号,是决定我们能够想到什么的主要因素。 The analysis of the influence that programming languages have on thinking habits of its users, and the recognition that, by now, brainpower is by far our scarcest resource, they together give is a new collection of yardsticks for comparing the relative merits of various programming languages.对编程影响程序员的思考习惯的分析和脑力是我们几乎不曾使用的资源的认识,它们给出了从多方面给出不同编程语言优缺点的尺度。 The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague.一个有能力的程序员能够意识到他自己脑容量的严格尺寸,因此,他谦逊的完成编程任务,牵涉到其他事情时,他避免小聪明像躲避瘟疫一样。 In the case of a well-known conversational programming language I have been told from various sides that as soon as a programming community is equipped with a terminal for it, a specific phenomenon occurs that even has a well-established name: it is called "the one-liners".说到一种著名的会话式程序设计技术,我从不同渠道被告知说如果一个计算社区一旦装备终端,一种特殊的现象就会发生,这种现象甚至有了一个被广泛接受的名称——打趣的人。It takes one of two different forms: one programmer places a one-line program on the desk of another and either he proudly tells what it does and adds the question "Can you code this in less symbols?" -as if this were of any conceptual relevance!- or he just asks "Guess what it does!".它有一到两种不同的形式,一个程序员在别人桌面放了一个调侃的程序,他要么骄傲的展示它的用途并问别人你能用更少的字符写完吗(好像有任何概念的相关性一样),要么就问说猜猜这是用来干嘛的。 From this observation we must conclude that this language as a tool is an open invitation for clever tricks; and while exactly this may be the explanation for some of its appeal, viz. to those who like to show how clever they are, I am sorry, but i must regard this as one of the most damning things that can be said about a programming language.通过这个观察,我们必须总结说这门语言是一种宣扬奇技淫巧的工具,同时这会是它的一些诉求的解释,例如说那些喜欢展示他们有多聪明的人,对不起,但是我必须把它视作关于编程语言最令人恶心的地方。 Another lesson we should have learned from the recent past is that the development of "richer" of "more powerful" programming languages was a mistake in the sense that these baroque monstrosities, these conglomerations of idiosyncrasies, are really unmanageable, both mechanically and mentally.我们必须从过去学到的另外一课是所谓功能强大,丰富的编程语言的发展是一种错误,就像这些奇怪庞然大物,某人特有的气质的聚集,都是心灵上,肉体上不可控的。 I see a great future for very systematic and very modest programming languages. 我从系统的谦逊的编程语言上看到很美好的未来。When I say "modest", I mean that, for instance, no only ALGOL 60's "for clause", but even FORTRAN's "DO loop" may find themselves thrown out as being too baroque. 当我说谦逊时,我的意思是,例如,不仅是ALGOL60for分支语句,还有FORTRANDO循环语句发现因为变得过于怪异而被淘汰。I have run a little programming experiment with really experienced volunteers, but something quite unintended and quite unexpected turned up.我曾经和一些有经验的志愿者做过一点编程实验,但有些不期望发生和预料不到的事情发生了。 None of my volunteers found the obvious and most elegant solution.我的志愿者没有一个找到明显而漂亮的解决方法。 Upon closer analysis this turned out to have a common source: their notion of repetition was so tightly connected to the idea of an associated controlled variable to be stepped up, that they were mentally blocked from seeing the obvious. 通过更为细致的观察,我们找到相同的源头:他们对与重复的概念与用于加速的联合控制变量的联系过于紧密,以至于他们被蒙蔽了完全看不到明显的方法。Their solutions were less efficient, needlessly hard to understand, and it took them a very long time to find them.他们的方法低效,晦涩难懂,并且耗费了大量时间。 It was a revealing, but also shocking experience for me. 这是一段对我来说具有启示作用,和令人震惊的经历。 Finally, in one respect one hopes that tomorrow's programming languages will differ greatly from what we are used to now: to a much greater extent than hitherto they should invite us to reflect in the structure of what we write down all abstractions needed to cope conceptually with the complexity of what we are designing. 最后,从某个方面上来讲,如果一个人希望明天的编程语言和现在的大为不同,很大程度的优于现在的,他们应该邀请我们在我们写下的所有需要用来应付概念上我们如今设计的抽象结构中思考。So much for the greater adequacy of our future tools, which was the basis of the fifth argument.关于我们未来工具的优越性,也就是我们第五个论据的基础,就讲到这里。

As an aside I would like to insert a warning to those who identify the difficulty of the programming task with the struggle against the inadequacies of our current tools, because they might conclude that, once our tools will be much more adequate, programming will no longer be a problem.作为旁观者,我希望提醒一下那些以现有工具不足而觉得编程任务困难的人。 Programming will remain very difficult, because once we have freed ourselves from the circumstantial cumbersomeness, we will find ourselves free to tackle the problems that are now well beyond our programming capacity. 编程依旧会十分困难因为一旦我们从详尽的笨重中解放出来,我们将会发现自己得以面对解决远在我们编程能力以外的问题

You can quarrel with my sixth argument, for it is not so easy to collect experimental evidence for its support, a fact that will not prevent me from believing in its validity.你可以不同意我的第六个论据,因为很难收据支持的实验证据,但不能阻止我相信它的正确性。 Up till now I have not mentioned the word "hierarchy", but I think that it is fair to say that this is a key concept for all systems embodying a nicely factored solution.直到现在,我还没有提到分层这个词,但我认为把它作为一个所有收录着一个精细分解解决方案的系统的核心概念是合理的。 I could even go one step further and make an article of faith out of it, viz. that the only problems we can really solve in a satisfactory manner are those that finally admit a nicely factored solution. 我甚至可以走更远一步写一篇关于信仰的文章,即我们能够以令人满意的方式解决的唯一问题是那些最后接受精细分解解决方案的问题。At first sight this view of human limitations may strike you as a rather depressing view of our predicament, but I don't feel it that way, on the contrary! 乍看之下,这种人类局限的观点是一种令人抑郁的关于我们处境的观点,但我恰恰相反,不这么觉得。The best way to learn to live with our limitations is to know them.学会和我们的局限共存的方法就是了解我们的局限。 By the time that we are sufficiently modest to try factored solutions only, because the other efforts escape our intellectual grip, we shall do our utmost best to avoid all those interfaces impairing our ability to factor the system in a helpful way.等到我们足够谦逊去尝试分解方案的死后,因为其他形式的努力已经超过我们智力的掌控,我们将要尽最大的努力去避免所有这些内部损害我们以有用的方式分解系统的能力的交流。 And I cannot but expect that this will repeatedly lead to the discovery that an initially untractable problem can be factored after all. 我不得不希望这不停的引领我们发现一个容易解决的问题最终也是可以分解的。Anyone who has seen how that majority of the troubles of the compiling phase called "code generation" can be tracked down to funny properties of the order code, will know a simple example of the kind of things I have in mind.任何一个看到了大多数所谓的“代码生成”的编译状态的麻烦都可追溯到指令码的有趣特性的人,都会知道一个我在脑海中想到的事情简单示例。 The wider applicability of nicely factored solutions is my sixth and last argument for the technical feasibility of the revolution that might take place in the current decade. 适用性更好的分解良好的解决方案是我第六个也是最后一个论据用于支持技术上可行的可能会在这十年发生的革命。

In principle I leave it to you to decide for yourself how much weight you are going to give to my considerations, knowing only too well that I can force no one else to share my beliefs.原则上,我把这些论据留给你,让你决定我的考察占多少分量,因为我很清楚我没有办法强迫任何人跟随我的信仰。 As each serious revolution, it will provoke violent opposition and one can ask oneself where to expect the conservative forces trying to counteract such a development. 每次重要的变革都会招致剧烈反对,每个人都可以问自己希望保守力量抵消多少发展。I don't expect the primarily in big business not even in the computer business; I expect them rather in the educational institutions that provide today's training and in those conservative groups of computer users that think their old programs so important that they don't think it worth-while to rewrite and improve them.我不指望主要的大财团,甚至计算机领域的集团,我宁愿希望教育机构提供培训,希望那些保守团体的计算机用户认为他们古老的程序很重要以至于不值得重写或者优化。 In this connection it is sad to observe that on many a university campus the choice of the central computing facility has too often been determined by the demands of a few established but expensive applications with a disregard of the question how many thousands of "small users" that are willing to write their own programs were going to suffer from this choice. 关于这一点,很多大学校园的中心电脑设备的选择视一些现成但昂贵且不理会千千万万愿意自己编程的小用户的问题的程序的需求而定,学校将为他们的选择埋单,这是相当可悲的。Too often, for instance, high-energy physics seems to have blackmailed the scientific community with the price of its remaining experimental equipment. 这种事情太常发生,例如,高能物理似乎曾经用他们剩下的实验设备勒索科学社区。The easiest answer, of course, is a flat denial of the technical feasibility, but I am afraid that you need pretty strong arguments for that.当然,最容易的解决方法,是对技术可行性的干脆的拒绝,但我担心你需要足够支撑这种方法的论据。 No reassurance, alas, can be obtained from the remark that the intellectual ceiling of today's average programmer will prevent the revolution from taking place: with others programming so much more effectively, he is liable to be edged out of the picture anyway. 唉,现在普遍程序员的脑力水平可以阻止变革发生是得不到任何保证的,因为其他人的编程变得更为有效,程序员很容易在社会的版图中被边缘化。

There may also be political impediments.还有很多政治方面的障碍。 Even if we know how to educate tomorrow's professional programmer, it is not certain that the society we are living in will allow us to do so.即便我们知道怎么去培养未来的专业的程序员,我们不能确定社会允许我们这样做。 The first effect of teaching a methodology -rather than disseminating knowledge- is that of enhancing the capabilities of the already capable, thus magnifying the difference in intelligence. 传授方法论(而不是散布知识)的第一影响是增强了现有的能者的能力,因此拉大了智商上的差异。In a society in which the educational system is used as an instrument for the establishment of a homogenized culture, in which the cream is prevented from rising to the top, the education of competent programmers could be politically impalatable. 在一个教育系统是用来建立平均文化的社会,在一个精英不允许出现在顶层的社会,培养有能力的程序员在政治上是不对味的。

Let me conclude.让我总结一下。 Automatic computers have now been with us for a quarter of a century. 计算机已经伴随我们走过一个世纪的四分之一了。They have had a great impact on our society in their capacity of tools, but in that capacity their influence will be but a ripple on the surface of our culture, compared with the much more profound influence they will have in their capacity of intelligent challenge without precedent in the cultural history of mankind.它们以工具的身份对我们社会产生了深远的影响,但是和在人类历史上史无前例的以智力挑战的形式产生深远的影响相比,它们只能以波浪的形式影响我们文化的表面, Hierarchical systems seem to have the property that something considered as an undivided entity on one level, is considered as a composite object on the next lower level of greater detail; as a result the natural grain of space or time that is applicable at each level decreases by an order of magnitude when we shift our attention from one level to the next lower one. 似乎拥有决定在某种程度上将物体视作一个不可分割整体的权利的分层系统,被视作一个级别更低,细节更多的混合物,最后,当我们将注意力从一级转向更低一级时,时空的天然粒面会以合适的数量级减少。We understand walls in terms of bricks, bricks in terms of crystals, crystals in terms of molecules etc. 我们知道墙以砖为单位,砖以结晶体为单位,结晶体以分子为单位,等等。As a result the number of levels that can be distinguished meaningfully in a hierarchical system is kind of proportional to the logarithm of the ratio between the largest and the smallest grain, and therefore, unless this ratio is very large, we cannot expect many levels.在分层系统中,许多级别可以有意义的区分出来,这和最大与最小粒度的比率的对数成正比,因此,除非比率很大,我们不能指望能够分很多层。 In computer programming our basic building block has an associated time grain of less than a microsecond, but our program may take hours on computation time.在计算机编程中,我们基本的编程语句有低于一微秒的时间粒度,但我们的程序却可能花费几小时的计算时间。 I do not know of any other technology covering a ratio of 1010 or more: the computer, virtue of its fantastic speed, seems to be the first to provide us with an environment where highly hierarchical artefacts are both possible and necessary.我不知道任何一种超过1010次方的比率的技术,以它超凡速度为优点的计算机,似乎是第一个给我们提供需要分层粒度大和实现它的环境的。 This challenge, viz. the confrontation with the programming task, is so unique that this novel experience can teach us a lot about ourselves.这样的挑战,即面对编程任务,是独一无二的,因此这样小说一般的经历可以教会我们很多关于自己的知识。 It should deepen our understanding of the processes of design and creation, it should give us better control over the task of organizing our thoughts.它加深了我们对设计和创造程序的理解,它帮助我们更好的完成想法条理化的任务。 If it did not do so, to my taste we should not deserve the computer at all! 如果它没有这样做,对我来说,我们根本不值得拥有计算机。

It has already taught us a few lessons, and the one I have chosen to stress in this talk is the following. 它已经给我们上了几课,在这次谈话中我要强调以下几点。We shall do a much better programming job, provided that we approach the task with a full appreciation of its tremendous difficulty, provided that we stick to modest and elegant programming languages, provided that we respect the intrinsic limitations of the human mind and approach the task as Very Humble Programmers.我们应该更好的编程,证明我们用满是对任务带来的巨大困难的感激的方法完成任务,证明我们坚持谦逊和优雅的编程语言,证明我们尊重人类内心固有的限制和以谦卑的程序员的身份完成任务。


<script type=text/javascript charset=utf-8 src=""></script> <script type=text/javascript charset=utf-8 src=""></script>
阅读(120) | 评论(0) | 转发(0) |

上一篇:Java final修饰符


  • 0
  • 0
  • 0
  • 一键三连
  • 扫一扫,分享海报

©️2021 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页
钱包余额 0