Programming - THE Tao of Programming (i)

xiaoxiao2021-03-06  38

The Tao of Programming Programming

Book 1 - The Silent Voidbook 2 - The Ancient MasterSbook 3 - DesignBook 4 - Coding

The Silent Voidbook ONE

Thus spake the master program: Programming Master is said:

"WHEN You Have Learned to Snatch The Error Code from The Trame, It Will Be Time for You to Leave." "When you take the crystal ball from my hands, it is when you leave."

1.1

Something mysterious is formed, 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. The mysterious thing is born in the silent void. This is a long-lasting existence never disappeared. It is the root of all procedures. I don't know how to describe it, just call it.

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

The Tao Gave Birth To Machine Language. Machine Language Gave Birth To The Assembler. Duomano language, machine language student comics.

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 with the Tao. No matter how short, every language has its own purpose, each language expresses the software 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.3

At the beginning of the tao gave birth to space and time. There, Space and Time Are The yan and yang of programming. Brought space and time, the space and time are programmed yin and yang poles. . 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.4

The 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 TWO

Thus 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.1

The Program of Profound. We cannot Fathom Their Thoughts, So All We do is describe their Apperance. The master of the ancient times is very unpredictable. We can't speculate their thinking, only describe the appearance of the appearance. .

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

Grand Master Turing Once 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 what I am Turing Dreaming That I am A Machine, or Machine Dreaming That I am Turing!" "I don't know if Tu Ling dreams will become a machine or the machine dreams of itself into Tuling. "

2.3

A programmer from a very large computer company went to a software conference and then 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 the Made Rude Noises During My Presentation. "A large company's programmer reported to his supervisor:" The programmers of those other companies are some What kind of people? They are indecent, not trimming, the hair is fluffy, the clothes are worn, and they are not enthusiastic, and they are still chasing when I talk. "

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 programs.... Why SHOULD THEY BOTHER 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, an unexpected accident. They come to freedom, they are not concerned, they only live for their procedures. Why do you want to use secular harassment to disturb them? "

"They is alive within the tao." "They live in the road".

2.4

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..?" A novice asked the Master: "There is a programmer, he never designs, nor to write documents, and does not even test his procedure, but knowing his people think he is the greatest programmer in the world, 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 "manager. : "The programmer has mastered. He does not need to design in advance; he also never bother, just accept everything, no matter what happens is good. He doesn't need to write a document, he does not care And have anyone to see the code he wrote. He also does not need to test; each program he wrote has a perfect self, calm and elegant, their purpose is self-evident. He has truly mastered the essence of the road. "Designbook Three

Thus spake the master program: Programming Master is said:

"When Program is Being Tested, IT IS TOO LATE To Make Design Changes." The program will change its design is too late. "

3.1

THERE ONCE WAS A Man Who Went to a Computer Trade Show. Each Day As He Entered, The Man Told The Guard At The Door: I have participated in the 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 Raider 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 were millions of dollars Computer equipment, so he firmly stared this person, but this person is just from a booth to another booth, whispered calm.

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 used? What is it it you Are Stealing? "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.2

There 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 number is not appropriate for the number. You must appropriate for the novel. You musting structure. "There is a programming master. He writes non-structural procedures. program. 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.3

There Was Once A Programmer Who Was Attached To The Court of The Warlord ASKED The Programmer: "Which is Easier To Design: an accounting package or an operation system?" Someone asked a programmer, "a financial software Which is easier to design with an operating system? "

"An Operating System," is the operating system ", the 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 machines with simple harmony between machines. This is why the operating system is more easily designed than finance software. "

The Warlord of Wu Nodded and SMILED. "That Is All Good and Well, But Which Is Easier To Debug?" These people smiled. "Good, but which one is easier to debug?"

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

3.4

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" a project manager to bring the master programmer The needs of a project, then ask the master: "If I give you 5 programmers, how much time to design 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 becommers?" "THE," The Design Will Never Be Completed, "He Said. Master shrugged:" Then this The project will never finish. "

CodingBook Four

Thus spake the master program: 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.1

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

A 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 reason for this?" An initiator asked Master: "One of my The program is sometimes 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 express it hharged? Computers Simulate Determinism; ONLY Tao Is Perfect. Master said: "You are confused because you don't understand. 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.3

A 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. 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. "Is it in the game console?", Beginners asked again.

"IT is Even in a video game," said the master. "Yes, or even in the game console." Master said.

"AND is the tao in the dos for a personal computer?" "" Also exists in DOS of your computer? "

The master cough and shifted his position slightly. "He Said. Master coughed, slightly, said," Today's class is here ". 4.4

Price Wang's Programmer Was Coding Software. His Fingers Danced Up An Error Message, And The Program Ran Like A Gentle Wind. When the program is written, the finger fails to fly on the keyboard. There is no error message when compiling, and the program is running like a breeze.

Excellent! "The Price Exclaimed," Your Technique Is Faultless! "Is too exciting! Your skill is already impeccable.

"? Technique" said the programmer, turning from his terminal, "What I follow is the Tao -. Beyond all technique When I first began to program I would see before me the whole program in one mass After three years I no longer. saw this mass. Instead, I used subroutines. But now I see nothing. My whole being exists in a formless void. My senses are idle. My spirit, free to work without a plan, follows its own instinct. in short, my program writes itself. True, sometimes there are difficult problems. I see them coming, I slow down, I watch silently. Then I change a single line of code and the difficulties vanish like puffs of idle smoke. I then compile the program. I sit Still and let the joy of the work fill my being. i close my being. "Skill?" Skill. When I started to program, I saw the entire program. I saw a child process three years later. Now I can't see anything. My entire existence is no form of virtual. I It feels very leisure, in fact, in fact, my program is written, sometimes I see some problems, I will stop watching them quietly, then I changed a line of code, the problem is like a small smoke The same is a black. Then I compile the program. Sitting there to enjoy the joy of work. Close your eyes and exit the system.

Price Wang Said, "Would That All of My Programmers WERE As Wise!" "When my programmer can meet this realm!"

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

New Post(0)