4.1A program shoshould be light and agile, its subroutines connected like a strings of pearls. the spirit and intent of the program shocould be retained throughout. there shoshould be neither too little nor too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity.
A program should be flexible and its sub-process is like a string of pearls on an online line. From beginning to end, the goal is clear. One byte is too long, and one byte is too short. There are no unnecessary loops and no referenced variables, neither lack of structure nor rigidity.
A program shocould follow the Law of Least Astonishment. What is this law? It is simply that the program shoshould always respond to the user in the way that astonishes him least.
A program should follow the ''least surprised th'' principle. What is the ''least surprised th'' principle ''? That is to say, a program should minimize the user's surprise.
A program, no matter how complex, shocould act as a single unit. The program shocould be directed by the logic within rather than by outward appearances.
No matter how complicated a program is, it should be a single whole. A program is guided by its internal logic rather than 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 rewrite the program.
If a program cannot meet its needs, it will be in disorder and disorder. The only way out is to rewrite 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 reason for this? "
A beginner asked the master: "a program of mine is sometimes normal and sometimes abnormal. I have fully followed the programming rules, and I am totally confused by it. What is the reason for this ?"
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 have CT it from a machine that humans have constructed? Computers simulate determinism; only the Tao is perfect.
The Master said, "You are confused because you do not know. Only a fool can believe that the result can be taken for granted as long as he follows what others say. Why do you want to get the result of taking it for granted from a machine constructed by humans? Computers are just the product of determination; only the Tao is the only perfect.