《The Tao Of Programming》Book Five - Mainteance

Book Five - Mainteance
第五篇 维护

Thus spake the master programmer:
编程大师如是说:

"Though a program be but three lines long, someday it will have to be
maintained."
“既使一个程序只有三行长,也总有一天需要去维护它”

5.1

A well-used door needs no oil on its hinges.
A swift-flowing steam does no grow stagnant.
Neither sound nor thoughts can travel through a vacuum.
Software rots if not used.
These are great mysteries.
经常使用的门不需要往门轴里上油。
流动的东西就不会停滞不前。
流水不腐,户枢不蠹。--王磊
声音和思想都不能在真空里传播。
软件不用就会腐朽。

5.2

A manager asked a programmer how long it would take him to finish the
program on which he was working. "I will be finished tomorrow," the
programmer promptly replied.
经理问程序员要多长时间才能完成他的项目。“明天”

"I think you are being unrealistic," said the manager. "Truthfully, how
long will it take?"
“太不着边际了,老实说,要多久?”

The programmer thought for a moment. "I have some features that I wish
to add. This will take at least two weeks," he finally said.
程序员想了一想说。“还有一些新的功能要加进去,可能至少要两个星期吧。”

"Even that is too much to expect," insisted the manager, "I will be
satisfied if you simply tell me when the program is complete."
“即使两个星期恐怕也太夸张了,什么时候你只要告诉我说程序已经完成就好
了。”

The programmer agreed to this.
Several years slated, the manager retired. On the way to his retirement
lunch, he discovered the programmer asleep at his terminal. He had been
programming all night.
几年后,这个经理已经退休了,在他的离职午餐上,他发现这些程序员在他的终
端前睡着了,他整夜都在编程。

5.3

A novice programmer was once assigned to code a simple financial package.
一个初学者被要求编写一个财务软件。

The novice worked furiously for many days, but when his master reviewed
his program, he discovered that it contained a screen editor, a set of
generalized graphics routines, and artificial intelligence interface,
but not the slightest mention of anything financial.
他疯狂地工作了很多天,但他的主管检视他的程序时发现,它写了一个编辑嚣,
一个图形程序集,和人工智能的界面,但是看不到任何跟财务有关的东西。

When the master asked about this, the novice became indignant. "Don't be
so impatient," he said, "I'll put the financial stuff in eventually."
主管要求解释时,程序员被激怒了:“你太没耐心了,我会在最后写财务的部
分。”

5.4

Does a good farmer neglect a crop he has planted?
Does a good teacher overlook even the most humble student?
Does a good father allow a single child to starve?
Does a good programmer refuse to maintain his code?
一个好的农民不会不管他的庄稼。
一个好的老师不会不管哪怕是最差的学生。
一个好的父亲不会让他的任何一个孩子挨饿。
一个好的程序员不应拒绝维护他的程序。

你可能感兴趣的:(编程,工作)