Programming path (4)

Source: Internet
Author: User

Article 4 Encoding
The programmer said:
"A Perfect program is its own paradise, while a poorly written program is its own hell. "
4.1
A program should be lightweight and flexible, and its subprograms are connected like a string of pearls. Its spirit and intention should always run through. In a program, the content should be neither too much nor too little; there should be neither an unwanted loop structure nor redundant variables; there should be no structural or too rigid.
A program should follow the "least shocking principle ". What is this principle? Simply put, it is the response of a program to the user's instructions, which should always minimize the user's surprise.
A program should be run in a whole way no matter how complicated it is. Procedures should be guided by their internal logic, rather than external forms.
If a program fails to meet these requirements, it will be in a disordered and ambiguous state. The only correction method is to rewrite this program.
4.2
A beginner asked the master: "I have a program that is not working properly. I have always followed the programming rules, but the results are confused. What is the reason ?"
The master replied, "because you have not understood it, you are confused. Only a fool can expect to see rational behavior from humans, how can you look at a machine made by humans? Computers imitate the theory of determination, and only the Tao is perfect.
The rules used by programming are just a flash of cake, and only the Tao is permanent. Therefore, before you get inspired, you must meditate ."
"But how can I know that I have been inspired ?" Questions for beginners.
"When your program runs correctly ." The master replied.
4.3
A university is explaining the true meaning to one of his beginners ." This is reflected in all the software-no matter how insignificant it looks ." Said the master.
"Is this in the palm calculator ?" Questions for beginners.
"Yes ."
"Is this channel reflected in electronic games ?" Continue to ask questions for beginners.
"This is even reflected in electronic games ." Said the master.
"Is this reflected in the DOS system of my PC ?"
The master coughed and moved a little bit ." Today's class is here ." He said.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.