标题:One day a Novice came to the Master. 出处:Felix021 时间:Thu, 12 Mar 2009 20:58:16 +0000 作者:felix021 地址:https://www.felix021.com/blog/read.php?1503 内容: 有两个版本,都很有意思。如果觉得看英文版郁闷,可以对照着google翻译看“中文版”: http://translate.google.com/translate?prev=hp&hl=en&js=y&u=http%3A%2F%2Fwww.felix021.com%2Fblog%2Fread.php%3F1503&sl=en&tl=zh-CN&history_state0= ------------------------------------------------------------- version 1 zz from http://topic.csdn.net/u/20070114/01/ee02dfed-511b-419a-91fe-89917726354a.html 7楼 One day a Novice came to the Master. "Master, " he said, "How is it that I may become a Writer of Programs? ". The Master looked solemnly at the Novice. "Have you in your possession a Compiler of Source Code? " the Master asked. "No, " replied the Novice. The Master sent the Novice on a quest to the Store of Software. Many hours later the Novice returned. "Master, " he said, "How is it that I may become a Writer of Programs? ". The Master looked solemnly at the Novice. "Have you in your possession a Compiler of Source Code? " the Master asked. "Yes, " replied the Novice. The Master frowned at the Novice. "You have a Compiler of Source. What now can prevent you from becoming a Writer of Programs? ". The Novice fidgeted nervously and presented his Compiler of Source to the Master. "How is this used? " asked the Novice. "Have you in your possession a Manual of Operation? " the Master asked. "No, " replied the Novice. The Master instructed the Novice as to where he could find the Manual of Operation. Many days later the Novice returned. "Master, " he said, "How is it that I may become a Writer of Programs? ". The Master looked solemnly at the Novice. "Have you in your possession a Compiler of Source Code? " the Master asked. "Yes, " replied the Novice. "Have you in your possession a Manual of Operation? " the Master asked. "Yes, " replied the Novice. The Master frowned at the Novice. "You have a Compiler of Source, and a Manual of Operation. What now can prevent you from becoming a Writer of Programs? ". At this the Novice fidgeted nervously and presented his Manual of Operations to the Master. "How is this used? " asked the Novice. The Master closed his eyes, and heaved a great sigh. The Master sent the Novice on a quest to the School of Elementary. Many years later the Novice returned. "Master, " he said, "How is it that I may become a Writer of Programs? ". The Master looked solemnly at the Novice. "Have you in your possession a Compiler of Source Code, a Manual of Operation and an Education of Elementary? " the Master asked. "Yes, " replied the Novice. The Master frowned at the Novice. "What then can prevent you from becoming a Writer of Programs? ". The Novice fidgeted nervously. He looked around but could find nothing to present to the Master. The Master smiled at the Novice. "I see what problem plagues you. " said the Master. "Oh great master, please tell me. " asked the Novice. The Master turned the Novice toward the door, and with a supportive hand on his shoulder said, "Go young Novice, and Read The Fucking Manual. " And so the Novice became enlightened. ------------------------------------------------------------ Version 2 zz from http://fishbowl.pastiche.org/2004/02/21/how_to_write_perfect_software/ One day, the novice came to the master and asked, "Master, how can I write perfect code?" To which the master replied: "To write perfect code, you must not code." The novice looked at the master and begged him to explain further, but the Master was silent. After a week of worried meditation, the novice returned: "Master," spoke the novice. "There is no code without bugs. However much we test, we will introduce bugs whenever we code. Entropy always increases. Each line of code that is added takes it further from perfection. Even with the most rigorous of refactoring, necessary compromises will need to be made between elegance and practicality, or even between conflicting ideals of elegance." The master remained silent. "Master," spoke the novice. "Every feature added to software increases the expectations of its users. If your program counts lines in a file, then its users will want it to also count words. If your program counts words, then its users will want it to also check they are spelled correctly." "And if your program does anything, users will want it to also read email." "Yet if your program does not count words, users will not miss a spell-checker, and if your program does not count lines, users will not desire a word-count." "Did not the Buddha teach us that desire is the source of suffering?" The master remained impassively silent. "So, the way to write perfect software is to keep it as idea in your head, and never commit it to code, where it will acquire blemishes and imperfections, and be subject to the disfiguring desires of users. The perfect software must be unwritten. Un-coded, it is in harmony with the world." The master handed the novice a copy of the LOAF specification. The novice was enlightened. Generated by Bo-blog 2.1.0