“编程之道”(The Tao of Programming)(参见アマゾン Japan 或 Amazon 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的译文:
编程之道 第四部 第四章
尝有程序员为价格王编程。手之所触,击键騞然,莫不中音:合于《桑林》之舞,乃中《经首》之会。程序编译而无误,运行如三月之风。
王曰:“嘻,善哉!技盖至此乎?”
程序员面终端,转而对曰:“吾之所好者,道也;进乎技矣。始吾之编程之时,所见无非程序者;三年之后,以函数故,未尝见全程序也。方今之时,吾以神遇而不以目视,官知止而神欲行。依乎天理,无需筹划,因其固然,吾未尝编程而程序自现焉。虽然,每至于难解处,吾见其难为,怵然为戒,视为止,行为迟。击键甚微,豁然已解,如土委地。编译程序,抚键而坐,为之踌躇满志,闭目而登出之。”
王曰:“善哉!吾闻子之言,得悟焉。”