Code Encyclopedia Read Note 01

Source: Internet
Author: User

is also a classic book "Code Daquan", from the watercress saw a lot of praise, see a little feeling Daquan really is as its name, all the way down is very practical things, some although all contact, but look again is still a great profit. First, the core of software construction is the complexity of management. Although there are plenty of pages to discuss the basic elements of programming such as variables, statements, and so on, there are also strategies and methods for improving and adjusting code. But in-depth understanding, these are all around the above sentence to unfold, that is, the core of software construction is the complexity of management. The root cause of this goal is the contradiction between human brain intelligence and software project complexity. The book will often mention a few numbers, almost in 6, about 7 changes, because this is the brain of the limit of intelligence management, more, can not control, hehe. Therefore, there are some concluding suggestions in the book. For example, to build a working class, the internal members should be controlled at 7 (+) 2, which is 5 or 9, if it is native type, 9 member variables can be tube, if all are object members, 5 can also ensure that your mind is always clear. There are, for example, the nested structure of the program, similar to If, loop ah what, to maintain the level of nesting can not be more than 6 layers, and according to the actual investigation, generally more than 3 layers of nesting will make the programmer very confused and crazy, as well as the number of parameters of the subroutine as far as possible to keep under 7, or not remember Without the help of a modern IDE, I can't remember more than 4 parameters, hehe.

I think meeting these metrics is not a hard thing to do, and these things also give the standard that can be relied upon to improve the code. But want to manage this complexity, from the author's book summed up, the specific may be the following: First, division, since the brain tube, then the system is divided, that is, from the design point of view to abstract a number of parts, each time the brain focus on a part, which I have a profound experience, Although I am now completely self-made things more than 15000 lines, but also can not imagine myself to remember all the parts, if the abstract is not good, I have a special headache, every day in the code to turn over, the efficiency is very low, second, clear understanding, in fact, this is similar to the above point, Only a clear understanding of the meaning of the abstract, in order to do a good job of each interface, so that in the focus on other parts of the abstraction, the other part needs to be remembered and management clearer and more concise, because there is no need to focus on how the other parts are implemented, as long as the interface and abstraction to do it, third, clear expression, In the program should be clear expression of logic and abstract meaning, that is, to increase the readability of the program, alas, this is too important, the book is also around this constant discussion, the above mentioned those parts of the detail repeatedly said this, even the name has a special chapter to discuss.

This book I do not intend to go again, this may be too swallowed, that may not be too much, so, or slowly chew, I want to note the nature of the homework should not be so heavy, the teacher is also urging us to learn, really learn not to learn of course or to see themselves, anyway willing to deceive themselves no one will know and nobody will remind you

Code Encyclopedia Read Note 01

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.