Book 1 - The Silent Void
Thus spake the master programmer:
“When you have learned to snatch the error code from the trap frame, it will be time for you to leave.”
编程大师如是说:
“当你学会了从trap frame中捕获错误编码时,你就可以走了。”
1.1
Something mysterious is formed, born in the silent void. Waiting alone and unmoving, it is at once still and yet in constant motion. It is the source of all programs. I do not know its name, so I will call it the Tao of Programming.
沉默的虚空之中诞生了一些神秘的东西,它绝对静止也永恒存在。它是所有程序之根源。我并不知道其名称,因此姑且称它为编程之道。
If the Tao is great, then the operating system is great. If the operating system is great, then the compiler is great. If the compiler is great, then the application is great. The user is pleased and there exists harmony in the world.
如果道是完美的,那操作系统就是完美的。如果操作系统是完美的,那编译器就是完美的。如果编译器是完美的,那么应用程序就是完美的。用户因此满意,世界因此和谐。
The Tao of Programming flows far away and returns on the wind of morning.
编程之道去如流水来如晨风。
1.2
The Tao gave birth to machine language. Machine language gave birth to the assembler. The assembler gave birth to the compiler. Now there are ten thousand languages.
道生机器语言,机器语言生汇编器,汇编器生编译器。因此现在有上万语言。
Each language has its purpose, however humble. Each language expresses the Yin and Yang of software. Each language has its place within the Tao.
每一门语言都有其意图,无论多么卑微。每一门都表达出了软件的阴阳两面。每一门语言在都“道”之中占据一席之地。
But do not program in COBOL if you can avoid it.
但是,尽量别用COBOL来编程。
1.3
In the beginning was the Tao. The Tao gave birth to Space and Time. Therefore Space and Time are Yin and Yang of programming.
太初有道,道生时空。因此时空乃编程之阴阳。
Programmers that do not comprehend the Tao are always running out of time and space for their programs.
未领悟“道”的程序员,常常在他们的程序中耗尽了时间与空间。
Programmers that comprehend the Tao always have enough time and space to accomplish their goals.
然而已经领悟了“道”的程序员,总是有足够的时间和空间来完成他们的任务。
How could it be otherwise?
不然,又会怎样呢?
1.4
The wise programmer is told about Tao and follows it. The average programmer is told about Tao and searches for it. The foolish programmer is told about Tao and laughs at it.
If it were not for laughter, there would be no Tao.
机智的程序员听闻了“道”,会尽力去遵循;中庸的程序员听闻了“道”,会试图去探寻;愚钝的程序员听闻了“道”,会加以嘲笑。
不被嘲笑,就算不上真正的“道”了。
The highest sounds are hardest to hear. Going forward is a way to retreat. Great talent shows itself late in life. Even a perfect program still has bugs.
最大的声响,听来反而无声无息;前进的路有时也是条退路;伟大的天才通常很晚才显露出他的才智。即使是个完美的程序,仍然会存在bug。
译注
1.4的典故出自《庄子》,原文是:“上士闻道,勤而行之;中士闻道,谨而寻之;下士闻道,大笑之。不笑不足以为道。大音希声,进道若退,大器晚成。”