《编程之道》摘录
作者:Gmxp 日期:2009-08-26
《编程之道》中不乏经典,精彩的句子,今天拜读时选择了一些记录下来,方便自己和别人以后查阅或是欣赏。
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."
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."
评论: 2 | 引用: 0 | 查看次数: 670
回复
].mine is sofa 

"Without the wind, the grass does not move. Without software, hardware is useless."
how important software is!
how important software is!
发表评论
上一篇
下一篇


文章来自:
Tags: