0%

编程之道 卷二 远古宗师

Book 2 - The Ancient Masters

Thus spake the master programmer:
“After three days without programming, life becomes meaningless.”

编程大师如是说:
“三日不编程,生命无真义。”

2.1

The programmers of old were mysterious and profound. We cannot fathom their thoughts, so all we do isdescribe their appearance.
资深的编程大师神秘而深邃。我们甚至无法理解他们的思维方式,仅能描述其表象。

Aware, like a fox crossing the water. Alert, like a general on the battlefield. Kind, like a hostess greetingher guests. Simple, like uncarved blocks of wood. Opaque, like black pools in darkened caves.
意识,如同渡水之狐狸。警戒,如同战场上的将军。和蔼,如同女主人接待贵客。简单,如同未雕琢之木块。莫测,如同暗洞中的死水。

Who can tell the secrets of their hearts and minds? The answer exists only in Tao.
又有谁能够揭示他们的心智的秘密?这一切答案,仅存在于“道”中。

2.2

Grand Master Turing once dreamed that he was a machine. When he awoke he exclaimed:
“I don’t know whether I am Turing dreaming that I am a machine, or a machine dreaming that I am Turing!”
超级大师图灵曾梦见自己变成了一台机器。当醒来后,他嘀咕着:
“到底是图灵梦到了自己是一台机器呢?还是一台机器梦到了自己是图灵?”

2.3

A programmer from a very large computer company went to a software conference and then returned to report to his manager, saying: “What sort of programmers work for other companies? They behaved badly and were unconcerned with appearances. Their hair was long and unkempt and their clothes were wrinkled and old. They crashed our hospitality suite and they made rude noises during my presentation.”
某大公司的一个程序员去参加一个软件研讨会,当他回来交差时,对他的经理说:“其他公司的那些程序员都是些什么人呀?他们行为不雅,不修边幅。他们披头散发,衣物还皱巴巴的。他们待客态度非常糟糕,在我发言时还很粗鲁地大叫。”

The manager said: “I should have never sent you to the conference. Those programmers live beyond the physical world. They consider life absurd, an accidental coincidence. They come and go without knowing limitations. Without a care, they live only for their programs. Why should they bother with social conventions? They are alive within the Tao.”
经理说道:“我似乎不该让你去参加这次的研讨会。这些程序员的生活早已超乎了物理世界。他们认为生活是荒唐的,只是个偶然的意外而已了。他们来去自由,无所限制。他们仅仅关心自己的程序而已了。为什么要用尘世的繁文缛节去打扰他们呢?他们生活在道中呀。”

2.4

A novice asked the Master: “Here is a programmer that never designs, documents or tests his programs.
Yet all who know him consider him one of the best programmers in the world. Why is this?”
一位新手询问大师:“有位程序员,他从不做设计,不写文档,也不去测试自己的程序。但认识他的人都认为他是世界上最棒的程序员。为什么会这样呢?”

The Master replied: “That programmer has mastered the Tao. He has gone beyond the need for design; he does not become angry when the system crashes, but accepts the universe without concern. He has gone beyond the need for documentation; he no longer cares if anyone else sees his code. He has gone beyond the need for testing; each of his programs are perfect within themselves, serene and elegant, their purpose self-evident. Truly, he has entered the mystery of Tao.”
大师回复道:“这位程序员已精通了编程之道。他已经不再需要设计;当系统崩溃时,他不会烦躁,而是毫无忧虑地去接受一切。他已经不再需要编写文档;因为他不再去关心是否有人会去看他写的代码。他已经不再需要去测试;他写的每个程序本身都是完美的,宁静而优雅,它们的用途不言自明。实际上,他已经领悟了道的奥秘。”