Programming (2)

xiaoxiao2021-03-06  49

Ancient masters (The Ancient Masters)

Mastering the programmer developed by software said:

After three days without programming, life has become meaningless.

Note: Programming has become part of the programmer life, it is difficult to cut. Programming becomes the first needs of programmers.

2.1

Early programmers are mysterious and profound. We can't know their thoughts, so we can do it to describe their behavior.

He is awake, like a fox through the water pond. He is vigilant, like a general on the battlefield. He is kind, like a housewife, entertaining her guest. He is simple, like a block has no carved wood. He is unable to see, black pool water like a dark cave.

Note: It is difficult to understand - can only be described.

Who can tell their secrets of their minds and minds?

Note: Who knows how they write such a program? How do they consider? The genius's thoughts are difficult to describe

The answer exists only in the road.

Note: Maybe you can explain these, find the answer.

2.2

The grandfather's mastery of the grandfather is a machine. When he woke up, he screamed: "I don't know if I am a map spirit, dreaming of me is a machine, or I am a Machine, dreaming, I am a map spirit! "

Note: Reality and dreams are mutual integration, so that people will not be able to clearly, those who are real, those are illusory.

2.3

A very large computer company's programmer participated in a software conference, followed by reporting his manager. He said: "What kind of programmer is working for other companies? They behave very bad, don't pay attention to appearance. They The hair is very long and unfair. Their clothes were wrinkled and very old. They overthrew the rules of the guests, and the rude noise was issued when I introduced. "

The manager said: "I shouldn't let you go to this meeting. These programmers live outside the material world. They think life is ridiculous, an unexpected coincidence. They don't know the restrictions. They don't think of the secular Life, only for their procedures. How can they consider the customs of society? "

"They live in the road".

Note: Like every scientist forgetting me, these programmers regard the program as their own life. Not just a profession.

2.4

A newcomer asked: "There is a programmer here, he never designed, writes a document, or tests his procedure. But all people who know him think he is one of the best programmers in the world. Why is this this? ? "

Mastering the programmer Answer: "The programmer has already mastered. He has surpassed the need for design. When the system fails, he will not become angry, but it is uncomfortable. He has surpassed it. Write a document, he never cares about whether other people will look at his code. He has surpassed the need for testing, and every program is perfect, clear, elegant. Their function is self-understanding. He has entered the mystery stage of the road. "

Note: It is difficult to understand the genius.

Design

Mastering the programmer said this

"When the program is tested, it is too late to do design."

Note: The design modification should be done during the coding phase.

3.1

There is a person to go to a computer business exhibition. Every day when he comes in, this person told the guard:

"I am a great thief, because my escape this leader. In advance, this business exhibition can not be avoided."

These words have been very worried about the guards because there is many computer equipment inside, so he looks closely to this person. But this person is only from a booth to another, quietly self-speaking.

When this person leaving, the guard took him to the side and checked his clothes, but did not find anything.

The next day, this person came again, and he said to the guards: "I ran in a lot of things yesterday, but I will be more." So the guards see him more tight, but no use.

On the last day of commercial exhibition, the guards never inhibited his curiosity. "Mr. Thief", he said, "I don't know what I don't know, I can't calm. Please inspire me, what is your stolen something? ? "

This person smiled. "I am stealing", he said.

Note: Thought is the true invaluable treasure. Various products have become great due to their internal thoughts. Thought is the foundation of all. Good thinking is the key to solving the problem. Can find thought from products, It is really understanding the product.

3.2

Previously, there was a programmer who had mastered the road. He prepared a non-structural procedure. An initiator wants to imitate him, and start writing unstructured procedures. When the scholar invited the former to evaluate his progress, he criticized beginners to write Non-structured procedures, said: "It is not suitable for beginners to a master. Before transcend structure, you must first understand."

Note: There is no way to imitate others without principles, consider the actual situation of your own place. 3.3

A programmer was sent to the Tribe of the Uking Valve. The warlord questioning programmer: "That is easier to design: A financial package is still an operating system?"

"One Operating System", programmers answer.

The warlords do not believe in: "A financial package is trivial, compared with the complexity of an operating system."

"Not this" programmer said, "When designing a financial package, the programmer works like a middleman, between people with different ideas: how it must operate, how must its report must be manifested, and how it must In line with the tax law. In comparison, an operating system is not limited by its external performance. When designing an operating system, the programmer is the simplest harmony between machines and ideas. This is why an operating system is more Causes of easy design. "

The Umperian can nodded. "Very good, but that is more easier to debug?"

The programmer did not answer.

Note: Since the warlord does not believe in programmers, why should the programmer say more?

3.4

A manager to master the programmer, give him a new application demand document. Manager asked the programmer: "How long does it take to design this system, if I assign five programmers to it?"

"It takes a year", the programmer answers quickly.

"But we need this system, so fast! How much time does it take to assign ten programmers?"

The programmer frowned. "In that case, it will take two years."

"So, if I assign 100 programmers to this project?"

The programmer shrugged. "Then this design will not complete" he said.

Note: If the task is handed over to the expert, let experts have to decide the development of things, do not try to use the increase in manpower to increase the progress of the project, especially if the programmer is pushing time. Programming (2) author : Liu Junsong translated this article to: Said.com April 22, 2002

Coding

The programmer who has mastered the road said:

"A good program written is its own paradise;

A bad program is its own hell.

4.1

A program should be bright and agile, its subroutine is connected to each other, like a string of pearls. The soul and purpose of the program should always be maintained. There should be too few or too many, either useless loop, either useless Variables, either lack structured, or overfold everything stiff.

Note: The program should find a coordination in these mutual contradictory standards, and the program has certain flexibility.

A program should follow the "Minimum Surpected Principle", what is it? It is very simple, it is to respond to the user forever, which makes him feel at least surprised.

Note: The program is simple, but not let the user surprised.

A program, whether it is complicated, should work like a separate part. The program should be instead of internal logic instead of external performance.

Note: Do not use the interface to specify the process of the program. The interface is the performance of the program process rather than its nature. If a program fails in these requirements, it will enter a state without order and confusion. Correct the only way is Rewrite this program.

4.2

A beginner asked the programmer: "I have a program, it sometimes runs sometimes interrupted. I follow the rules of programming, but I am completely confused. What is the reason?"

Mastering the programmer replied: "You are confused because you don't understand. Only a fool wants to get rational behavior from people. Why do you want to get it from the machine created? Computer imitation Only the road is perfect. "The rules of programming are short, only the way is permanent. So, you must meditate, before you are inspired.

"But how can I know that I have been inspired?" Beginner asked.

"Your program will run correctly." The programmer of the hand is answered.

Note: The rules of programming are the inherent rules of the software, not the inner rules themselves, only to understand this, can not be used by the rules, can learn how to use the various rules of programming. Master the inherent law of the software is more mastered Rules should be much more important.

4.3

A programmer who has mastered the way to a newcomer explained the natural performance of a newbie. "The Tao was reflected in all software - no matter how tightless," mastering the programmer said.

"Tao in the handheld calculator?" Asked the beginner.

"Yes" answers.

"Tao in a game?" The beginner continued to ask. "The Dao even exists in the game", mastering the programmer of the road.

"So in the DOS of your personal computer?"

Mastering the programmer coughing, moving it slightly, "Today's class is over"

Note: The inherent rules of the software are nowhere, no time.

4.4

The prince's programmer is coding. His finger dances on the keyboard. There is no error message in the program compile, and the program runs like a soft wind.

"Too good!" Prince was shocked, "Your technology is not shortcoming!"

"Technology?" Said that from the end of the terminal, "I followed the road --- surpass all the technology. When I first started programming, I can see the entire program in front of me. Three After year, I can't see this. I actually. I use subroutine. But now I haven't seen anything. I have no description of the whole person. My feelings are idle. My spirit, From the work release, there is no plan, follow its own intuition. Simply, my program is written by itself. Indeed, sometimes there is difficult problem. I saw them came, I stopped, I am quiet. Observe. Then I change the code, it is like a light smoke. I then compile the program. I sat quietly, let the joy of work full of me. I have to exit the system. "

Prince said: "Can all of my programmers can be smart!"

Note: It is very similar to China's ancient Zhuangzi << 庖庖 解> >>, and it can be seen that many things of things are connected.

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

New Post(0)