《编程之道》摘录

        《编程之道》中不乏经典,精彩的句子,今天拜读时选择了一些记录下来,方便自己和别人以后查阅或是欣赏。

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.

Thus spake the master programmer:
"After three days without programming, life becomes meaningless."

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."

A manager went to the master programmer and showed him the requirements document for a new application. The manager asked the master: "How long will it take to design this system if I assign five programmers to it?"
"It will take one year," said the master promptly.
"But we need this system immediately or even sooner! How long will it take it I assign ten programmers to it?"
The master programmer frowned. "In that case, it will take two years."
"And what if I assign a hundred programmers to it?"
The master programmer shrugged. "Then the design will never be completed," he said.

"A well-written program is its own heaven; a poorly-written program is its own hell."

A program should be light and agile, its subroutines connected like a strings of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little nor too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity.

A program, no matter how complex, should act as a single unit. The program should be directed by the logic within rather than by outward appearances.

Does a good programmer refuse to maintain his code?

Thus spake the master programmer:
"Without the wind, the grass does not move. Without software, hardware is useless."


[本日志由 Gmxp 于 2009-08-26 02:35 AM 编辑]
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags: 编程之道
评论: 2 | 引用: 0 | 查看次数: 670
回复回复妮子[2009-08-31 07:36 PM | del]
.mine is sofa
回复回复妮妮[2009-08-31 07:28 PM | del]
"Without the wind, the grass does not move. Without software, hardware is useless."

how important software is!
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.
字数限制 1000 字 | UBB代码 开启 | [img]标签 关闭