Programming Philosophy – The Tao Of Programming

这是我第一次在这里整篇引用别人的东西。没办法,实在是太性感了…………
(如果在我的Q-zone上看到,请不要以为是那个Clare原创的。唉,话说这人真麻烦……|||)

Part 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.”
“当你从我手中夺走水晶球时,就是你离开的时候了。”

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 greater, then the applications is great.
如果编译嚣是完美的,那么应用程序就是完美的。
The user is pleased and there is harmony in the world.
所以用户心满意足,整个世界因此和谐。
The Tao of Programming flows far away and returns on the wind of morning.
编程之道去如黄鹤来如晨风。

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语言。

In the beginning was the Tao. The Tao gave birth to Space and Time.
道之初,带来了空间和时间。
Therefore, Space and Time are the 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?
还会是什么样呢?

The wise programmer is told about the Tao and follows it.
上士闻道,从而行之。
The average programmer is told about the Tao and searches for it.
中士闻道,谨而寻之。
The foolish programmer is told about the Tao and laughs at it.
下士闻道,大笑之。
If it were not for laughter, there would be no Tao.
大笑不足为道。
The highest sounds are the hardest to hear.
希音不闻。
Going forward is a way to retreat. Greater talent shows itself late in life.
进即是退,大器晚成。
Even a perfect program still has bugs.
任何程序都有漏洞。

Part 2 — The Ancient Masters
Thus spake the master programmer:
编程大师如是说:
“After three days without programming, life becomes meaningless.”
三日不编程,食肉无味。

The programmers of old were mysterious and profound.
远古时代的编程大师们高深莫测,
We cannot fathom their thoughts, so all we do is describe their appearance.
我们不能揣测他们的所思所想,只能描述外表所见。
Aware, like a fox crossing the water.
他达明,如狐狸过水。
Alert, like a general on the battlefield.
机警,如战场上的将军。
Kind, like a hostess greeting her 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 the Tao.
答案仅存于道。

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 out hospitality suites and they made rude noises during my presentation.”
根本不热情好客,还在我说话的时候乱嚷嚷。”

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 replies:
经理说:
“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 the Tao.”
他已经真正掌握了道的精髓。”
以上~

————————-我是Ctrl C + Ctrl V之后的分割线————————-

转自周胖第一讲的PPT。
话说周胖何许人也~
乃我们C++/OOP的老师。
也就是那个逼迫我们用该死的3D界面的Alice做游戏的人~!!

PS:在那个神奇的熊猫烧香横行的年代,我们发觉他真像……熊猫唉~|||||||||||||

Leave a Reply

 嘲笑 大哭 哇噻 思考 疑惑 吼 得瑟 吐 恶心 微笑 无聊 皱眉 满足 囧 哈皮 瞌睡