The Humble Programmer

The Humble Programmer

by
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 p

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: 谦逊滚动(humble rolling)是一种谦虚而持续的努力,以实现个人成长和成功。这个概念强调与人为,不自满且不浮华,而是通过谦虚的态度和勤奋的工作,逐步取得进步和成就。 谦逊滚动表明,成功并非一蹴而就的结果,而是通过持续不断的努力来实现的。它倡导通过积累经验、学习和不断改进来持续进步。在这个过程中,个人需要保持谦虚的态度,不骄不躁,不因一时的成就而停步不前。 在谦逊滚动的理念中,人们应该珍惜并学会从失败和挫折中汲取力量。即使在取得一些成功后,他们也不会陷入自满的陷阱,而是以谦虚的姿态追求更高的目标。他们相信通过持续的努力和不断改进,可以取得更大的成就。 谦逊滚动还强调与人为的价值观,不追求表面上的光鲜和虚荣。相反,它鼓励个人专注于内心的成长和价值观的塑造。通过谦逊滚动,一个人可以培养出真正的谦逊和品格,这是持久成功的关键。 总而言之,谦逊滚动是一种谦虚和持续进步的理念,它强调不断努力和学习,以实现个人的成长和成功。通过谦虚的态度和勤奋的工作,人们可以不断取得进步,并以内心的成长和价值观的塑造为基础,实现持久的成功。 ### 回答2: humble rolling(谦逊滚动)是一种以谦虚为基础的生活方式或哲学观念。它强调人们应该保持谦虚、谦逊的态度,在生活中追求平衡、和谐和内外在的满足。 在这个快节奏和竞争激烈的社会中,许多人渴望寻求成功、名声和财富,常常忽略了谦虚和满足。然而,谦虚滚动告诉我们,成功并不是唯一的追求,而是要与谦逊和谦虚相结合。 谦虚滚动的重点是通过从内心开始,平衡自己的欲望和需求。它鼓励我们反思自己的目标、期望和价值观,并意识到自己的有限性和局限性。通过这种反思,我们可以更好地理解自己,接受自己,并对自己和他人保持谦虚的态度。 谦虚滚动还强调人与人之间的互相尊重和尊重他人的成就。它教导我们在与他人交往时要保持谦逊和谦卑的态度,不论对方的社会地位、经济状况或智力水平如何。通过尊重他人和欣赏他人的成功,我们可以建立互助合作和和谐的关系。 尽管谦虚滚动强调谦虚和满足,但它并不意味着我们应该停止追求进步和成就。而是要在追求的过程中保持谦虚,并珍惜和感激自己所拥有的一切。通过谦虚滚动,我们能够以更平衡和积极的态度面对挑战和困难,更加享受生活的美好。 总的来说,谦虚滚动是一种以谦虚为基础的生活方式,旨在帮助人们实现平衡、和谐和内外在的满足。通过反思自己的目标和价值观,尊重他人的成就和保持谦逊的态度,我们可以过上更加充实和有意义的生活。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值