iDog“翻译”的编程之道节选

“编程之道”(The Tao of Programming)(参见アマゾン JapanAmazon US) 是Geoffrey James以中国古代(主要是春秋时期)哲学、散文名篇的笔触写的IT幽默文章,现在iDog再尝试把它们还原一下。:-)

The Tao of Programming

Book 4, Chapter 4

Price Wang’s programmer was coding software. His fingers danced upon the keyboard. The program compiled without an error message, and the program ran like a gentle wind.

“Excellent!” the Price exclaimed, “Your technique is faultless!”

“Technique?” said the programmer, turning from his terminal, “What I follow is the Tao — beyond all technique. When I first began to program I would see before me the whole program in one mass. After three years I no longer saw this mass. Instead, I used subroutines. But now I see nothing. My whole being exists in a formless void. My senses are idle. My spirit, free to work without a plan, follows its own instinct. In short, my program writes itself. True, sometimes there are difficult problems. I see them coming, I slow down, I watch silently. Then I change a single line of code and the difficulties vanish like puffs of idle smoke. I then compile the program. I sit still and let the joy of the work fill my being. I close my eyes for a moment and then log off.”

Price Wang said, “Would that all of my programmers were as wise!”

iDog的译文:

编程之道 第四部 第四章

尝有程序员为价格王编程。手之所触,击键騞然,莫不中音:合于《桑林》之舞,乃中《经首》之会。程序编译而无误,运行如三月之风。

王曰:“嘻,善哉!技盖至此乎?”

程序员面终端,转而对曰:“吾之所好者,道也;进乎技矣。始吾之编程之时,所见无非程序者;三年之后,以函数故,未尝见全程序也。方今之时,吾以神遇而不以目视,官知止而神欲行。依乎天理,无需筹划,因其固然,吾未尝编程而程序自现焉。虽然,每至于难解处,吾见其难为,怵然为戒,视为止,行为迟。击键甚微,豁然已解,如土委地。编译程序,抚键而坐,为之踌躇满志,闭目而登出之。”

王曰:“善哉!吾闻子之言,得悟焉。”

文章《iDog“翻译”的编程之道节选》有 2 条评论。

  1. Livecn

    http://livecn.huasing.org/tao_of_programming.htm

    节选:

    程序员为公子王写软件,指飞键舞,不差丝毫,行之如风。

    公子王曰:『嘻,善哉!技盖至此乎?』

    程序员释键对曰:『臣之所好者道也,进乎技矣。始臣之编程之时,所见无非程序者;三年之后,未尝见程序也,见其子程序也;方今之时,臣以神遇而不以目视,官知止而神欲行,因其固然,程序自写之。诚然,尝至于难者,吾见其难为,怵然为戒,视为止,行为迟,改其一字,謋然已解,如烟随风。使之编译,释键而坐,为之踌躇满志,闭目而log off之。』

    公子王曰:『吾之程序员皆如此,则其善焉!』

    6.2

    Why are programmers non-productive? Because their time is wasted in meetings.

    Why are programmers rebellious? Because the management interferes too much.

    Why are the programmers resigning one by one? Because they are burnt out.

    Having worked for poor management, they no longer value their jobs.

    程序员低产者何也?累与会也。

    程序员叛者何也?累与制也。

    程序员去者何也?累与耗也。

    为愚者御,不重其职。

    7.2

    In the east there is a shark which is larger than all other fish. It changes into a bird whose wings are like clouds filling the sky. When this bird moves across the land, it brings a message from Corporate Headquarters. This message it drops into the midst of the program- mers, like a seagull making its mark upon the beach. Then the bird mounts on the wind and, with the blue sky at its back, returns home.

    The novice programmer stares in wonder at the bird, for he understands it not. The average programmer dreads the coming of the bird, for he fears its message. The master programmer continues to work at his terminal, for he does not know that the bird has come and gone.

    东方有鲛,其大不知几千里也;化而为鸟,其翼若垂天之云。怒而飞,投司部之讯于程序员众,若鸥入滩。扶摇直上,倚天而归。

    下士瞠然,大惑之;中士怵然,大惧之;上士漠然,无视之。

    Reply

发表评论

电子邮件地址不会被公开。 必填项已用*标注