How to Write Perfect Software

February 21, 2004 9:50 PM

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.

4 TrackBacks

Listed below are links to blogs that reference this entry: How to Write Perfect Software.

TrackBack URL for this entry: http://fishbowl.pastiche.org/mt-tb.cgi/479

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... Read More

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... Read More

Charles’s recent post on pain caused by bugs and feature creep put me in mind of a conversation I once... Read More

How to Write Perfect Software from HMK's Spurious Thoughts on July 9, 2004 5:38 AM

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... Read More

4 Comments

Why, this sounds very similar to advice on how to have a perfect marriage. :-)

Coding is a Zen Thing.

Reminds me of this quote:
"I attempted Zen Programming, where I'd meditate on my solution for two years and then write the code in fifteen minutes. Well, it didn't quite work. But I did manage under a day. "

http://www.s2.org/~chery/blog/2003-05-28.html

want to write a software

Comments are no longer being accepted for this blog entry. If you really want to make your voice heard, you can always email me.

Previously: Eastern Standard Mindf--

Next: Error Message of the Day