"Programming" (the previous article seems to be a reticed)

zhaozj2021-02-11  171

"Programming" (Xiao Zhao translation) Blue forest http://www.lslnet.com 2001 January 1, 2001

The Tao of Programming - Programmed Translated by Geoffrey James

[小] Translation finishing

Description: This article is the << Programming >> << Programming Zen >> << Fable of the Computer Age >> One of the books, is organized by Xiao Zhao translation, in addition, the full electronic document of this book is from Xiao Zhao According to the "programmed" of the market (including the three volumes of the above), it will be published together (see "Programming" full translation.

Table of contents directory

Book 1 - The Silent Void Book 2 - The Ancient Masters Book 3 - Design Book 4 - Coding Book 5 - Maintenance Book 6 - Management Book 7 - Corporate Wisdom Book 8 - Hardware And Software Book 9 - - Epilogue

-------------------------------------------------- ------------------------------

The Silent Voidbook OnThus Spake The Master Programmer: Programming Master is said:

"When you have learned to snatch the error code from the trap frame, it will be time for you to get." "When you take the crystal ball from my hands, it is when you leave." 1.1something mysterious is ford , born in the silent void. Waiting alone and unmoving, it is at once still and yet in constant motion. It is the source of all programs. I do not know its name, so I will call it the Tao of Programming. silent The mysterious thing was born in the void. This constant long-lasting existence never disappeared. It is the root of all procedures. I don't know how to describe it, just call it as programming. If the Tao is great, then the operating system is great. If the operating system is great, then the compiler is great. If the compiler is greater, then the applications is great. The user is pleased and there is harmony in the world. If the road is perfect, the operating system is perfect. If the operating system is perfect, then the compilation is perfect. If the compilation is perfect, then the app is perfect, so the user is full, the whole world is harmonious.

The Tao of Programming Flows Far Away and returns on the wind of morning. Programming is like Yellow Cranes like the morning wind.

1.2The Tao Gave Birth to Machine Language Gave Birth to the assembler. Duo Machine Language, Machine Language Collection. The Assembler Gave Birth To The Compiler. Now There Are Ten Thousand Languages. Compiler compiler, finally produce tens of thousands of advanced languages. Each Language Has ITS Purpose, HOWEVER HUMBLE. Each Language Expresses The yin and yang 'software. Each Language Has Its Place With Language Has Its Place With Language Has Its Place With Language Has Its Place With Language Has Its Place With Language Has Its Place With Language Has Its Place With Language Has Its Place With Language Has Its Place With Language Has Its Place With Language Has Its Place With Language Has Its Pable. No matter how negligible Yin and yang poles. Each language has its own path.

But do Not Program in Cobol if you can avoid it. But try not to use the COBOL language.

1.3in The Beginning Was The Tao. The Tao Gave Birth To Space and Time. Thelefore, Space And Time Are The Yin and Yang 'Programming. Brought space and time, the space and time are the yin and yang programmed. Both pole. Programmers that do not comprehend the Tao are always running out of time and space for their programs. Programmers that comprehend the Tao always have enough time and space to accomplish their goals. Understand programming way programmers often time consuming and useless space Without, the programmers who have the road have sufficient space and time to complete the programming task.

How could it be otherwise? Otherwise what is it?

1.4The wise programmer is told about the Tao and follows it. The average programmer is told about the Tao and searches for it. The foolish programmer is told about the Tao and laughs at it. Sergeant news channel, whereby the rows. The Beijing is smelling. The corporal smells and laughs. If IT WERE NOT for Laughter, There would be no tao. Laughing is insufficient.

The Highest Sounds Are The Hardest to Hear. Going Forward Is A Way To Retreat. Greater Talent Shows Itself Late in Life. Even a Perfect Program Still Has Bugs. 希 音 不,, 即 即 退Any procedure has a vulnerability.

-------------------------------------------------- ------------------------------

The Ancient Mastersbook TWothus Spake The Master Program: Programming Master is said:

"After Three Days without Programming, Life Becomes Meaning" is not programmed three days, and the carnivorous meat is tasteless.

2.1the programmers of profound. We cannot Fathom Their THOUGHTS, SO All We do is describe Their APPEARANCE. The programming masters of the ancient times are highly unpredictable. We can't speculate what they think, only describe the appearance. see. Aware, like a fox crossing the water. Alert, like a general on the battlefield. Kind, like a hostess greeting her guests. Simple, like uncarved blocks of wood. Opaque, like black pools in darkened caves. Aware, like a fox Overwater; the general police, such as the general of the battlefield; peace, such as the main woman waiting for guests; simple, stayed with wood; chaos, such as the abyss water. Who can tell the secrets of their hearts and minds? Who can I do their best?

The answer exissrs only in the tao. The answer is only over.

2.2grand master turning overce Dreamed That HE WAS A Machine. When He Awoke He Exclaimed: Super Master Tu Lee dreams that he is a machine and wakes up after he recalls:

"I don't know WHETHER I am Turing Dreaming That I am A Machine, or a Machine Dreaming That I am Turing!"

"I don't know if Tu Ling dreams to become a machine or the machine dreams of itself to become a Tuling." 2.3a Programmer from a Very Large Computer Company Went to a Software Conference and the Returned to Report To His Manager, Saying: " What sort of programmers work for other companies? They behaved badly and were unconcerned with appearances. Their hair was long and unkempt and their clothes were wrinkled and old. They crashed out hospitality suites and they made rude noises during my presentation. "a big company After the programmer participated in a software conference, reported to his supervisor: "What kind of person is the programmers of those other companies? They are indecent, they are not repaired, the hair is fluffy, the clothes are worn, and they are not happy. when I speak of voices - "the manager said:". I should have never sent you to the conference Those programmers live beyond the physical world They consider life absurd, an accidental coincidence They come and go without knowing limitations Without.... A Care, They Live Only for their program. Why Should Thebother with Social Conventions? "His supervisor said:" I should not let you participate in this meeting, these programmers live outside the real world. They think life is ridiculous One accidental accident. They come to freedom, they are not concerned, they only live for their procedures. Why do they use secular harassments to disturb them? "" "" "" They live In the road ".

2.4A 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..?" A novice asked the Master : "There is a programmer, he never designed, no writing document, does not test his procedure, but knowing his people think he is the world's greatest programmer, why?" 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 "the manager said:." that program He has mastered. He does not need to pre-design; when the system crashes, he also never bother, just accept everything, no matter what happens, he does not need to write a document, he never needs to write a document. Seeing the code he wrote. He does not need to test; each program he wrote has a perfect self, calm and elegant, their purpose is self-satisfied. "He has truly mastered the essence of the road." ----- -------------------------------------------------- -------------------------

DesignBook Threethus Spake The Master Programmer: Programming Master is said:

"When Program is Being Tested, It is to make to make design change."

"The program is tested when the program is tested is too late." 3.1There Once Was a man who who went to a class show. Each day as He Entered, The Man Told The Guard At the Door: A person participated Computer exhibition, every day he enters the door:

"I am A Great Thief, Renowned for My Feats of Shoplifting. Be Foreway NOT Escape Unplunded." "Warning you first, I am a stealing master, I am famous for the end of the room." This exhibition also doomed again. "This speech disturbed the guard greatly, because there were millions of dollars of computer equipment inside, so he watched the man carefully. But the man merely wandered from booth to booth, humming quietly to himself. disturbed the guard greatly, Because there is worth a million computer equipment, he firmly stared this person, but this person is just from a booth to another booth, whispered calmly. When the man left, the Guard Took Him Aside and Searched Was Clothes, But Nothing Was To Be Found. When this person leaving, the guard searched his body, but did not find anything.

On the next day of the trade show, the man returned and chided the guard saying: "I escaped with a vast booty yesterday, but today will be even better." So the guard watched him ever more closely, but to no avail exhibition. The next day, this person said to the guard: "I gave it yesterday, but today I will gain more." So the guard is more careful, but this is completely difficult.

On The Final Day of The Trade Show, The Guard Could Restrain His Curiosity No Longer. "Sir Thief," He Said, "I am So Perplexed, i cannot Live In Peace. What is it it is you are switch? "The last day of the exhibition, the guard can never hold his curiosity. "Mr. Xiao," he said, "You said that I am panic, please tell me, what do you stole?"

"I am Stealing ideas," He SAID. This person smiled and said: "I am stealing."

3.2There once was a master programmer who wrote unstructured programs A novice programmer, seeking to imitate him, also began to write unstructured programs When the novice asked the master to evaluate his progress, the master criticized him for writing unstructured programs, saying..: "What is appropriate for the master is not appropriate for the novel. You Must Understand The Tao Before Transcending Structure." There is a programming master, he writes non-structural procedures, and a beginner deliberately imitates him, and also writes non-structured. program of. When he let the master look at his progress, the master criticizes his non-structural procedures: "The right thing for a programming master may not be the same as a beginner, you must understand the programming. "3.3there Was Once a Program WHO WAS Attached to the Court of The Warlord of Wu. The Warlord Asked The Programmer:" Which is Easier To Design: an accounting package or an operation system? "### Someone asked a programmer "A financial software and one operating system which make it easier to design?" "An Operating System," is the operating system ", this programmer replied. The Warlord Uttered An Exclamation of Disbelief. "SURELY An Accounting Package is trivial next to the complexity of an operating system," He Said. This person is confusing. He said: "Obviously a financial software is negligible for the complexity of the operating system."

"Not so," said the programmer, "when designing an accounting package, the programmer operates as a mediator between people having different ideas: how it must operate, how its reports must appear, and how it must conform to the tax laws By. ... contrast, an operating system is not limited my outside appearances When designing an operating system, the programmer seeks the simplest harmony between machine and ideas This is why an operating system is easier to design "the programmer said:" no, design Finance When the software, a programmer must become an intermediary of users with different opinions, he must understand the user's operating habits, what form, how to follow the tax law. On the contrary, an operating system is completely unrelated to these external things. Design Operating system, programmers only need to achieve their own ideas and simple harmony between machines. This is why the operating system is more easier than finance software. "That is all good and welcome, But which is easier to debug? "These people smiled and said. "Good, but which one is easier to debug?"

The program Made no reply. The programmer did not answer.

3.4A 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" a project manager to bring programming Master a project demand, then ask Master: "If I give you 5 programmers, how much time does this project?" "It will take one year," said the master promptly. "One year", Master said.

"But we need this system immediately or even sooner! How long Will it take it?" "But we can't wait for so long, the sooner, if 10 programmers?"

The master programmer frowned. "In That Case, IT Will Take Two Years." The master wrinkled and said: "That takes 2 years."

"And what if I assign a hundred program be it?" "" What about the 100 years? "

The Master Program Shrugged. "He Said. Master shrugged:" The item is never finished. "

-------------------------------------------------- ------------------------------

Codingbook Fourthus Spake The Master Programmer: Programming Master is said:

"A Well-Written Program Is ITS OWN Heaven; a poorly-written program is it it its inghell." "Write a good program is its own paradise, the bad program written is its own hell"

4.1A 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. It should be a light free, its child process is like a pearl on a line. From beginning to end, the target is clear. Inc. is too long, and a reduced byte is too short. There is no unnecessary cycle, there is no variable that is not referenced, neither lack of structured nor is stiff. A program should follow the Law of Least Astonishment. What is this law? It is simply that the program should always respond to the user in the way that astonishes him least. A program should follow the Law of Least Astonishment '' and what is ` `Minimum surprise principle ''? That is to say that a program should minimize the surprise of users.

A Program, No Matter How Complex, Should Act As A Single Unit. The Program Should Be Directed by The Logic Withnin Rather Than by Outward Appearance. No matter how complicated, it should be a single overall. The program is guided by its internal logic instead of its appearance.

If The Program Fails in these Requirements, IT Will Be in a state of disorder and confusion. The Only Way To Correct this is to shutrite the program. If a program does not meet the needs of the required requirements, it will be in a chaotic state. . The only way out is to override this program.

4.2A Novice Asked The Master: "I Have a Program That Sometimes Runs and Sometimes Aborts. I Have Followed The Rules of Programming, YET I am Totally Baffled. What is the reference for this?" A beginner asked Master: "My A program is sometimes sometimes not normal. I have fully followed the rules of programming, and I am completely confused, what is the reason? "The master replied:" You are confused Because You do Not Understand the Tao .. only a fool expects rational behavior from his fellow humans Why do you expect it from a machine that humans have constructed Computers simulate determinism; only the Tao is perfect master said:?. "you are confused because you do not understand the road. Only fool will believe that as long as others say, you can get the result of thinking. Why do you want to get the result of a person who wants to construct from a human body? The computer is only a product of the decisions; only the road is the only perfect. The rules of programming are transitory; the rules of any programming are only suitable for specific situations, only Tao is eternal. So you are subject to you I have to think about it before guiding. "

"But How Will I Know WHEN i HAVE RECEIVED EnLightenment?", How do I know when I am guided? "

"Your Program Will Then Run Correctly," Replied the master. "When your program is running correctly." Master said.

4.3a Master Was Explaining The Nature of The Tao To One of His Novices, "The Tao Is Embodied in All Software - Regardless Of How Insignificant," Said The Master. Beginner invited the "Road Method Nature". Master said: "The memory is in any software - no matter how much software." "Is The Tao in a Hand-Held Calculator?" Asked The Novice. "Is it in the handheld calculation 嚣?", Beginners asked.

"IT IS," Came the reply. "Yes,"

"Is The Tao in a video game?" Continued The Novice. "Also in the game console?", Beginners

转载请注明原文地址:https://www.9cbs.com/read-5863.html

New Post(0)