TIPS: [Program Development Learning] (4) code optimization Learning

Source: Internet
Author: User

In fact, in the process of learning software development, the language is relatively studious. After all, just grasp the syntax, remember some words, and learn more about the unique features of the language. What is really difficult in software development is the soft power other than the language. For example, when we are looking for a job, our technical capabilities are our hard power, while our learning and dealing capabilities are our soft power, the strength of these two aspects should be mutually exclusive. Otherwise, we will not be able to build ourselves into a complete person. In more cases, soft power has shaped our hard power, is the cornerstone of our various capabilities. A series of related knowledge, such as development thinking, design thinking, and data analysis, constitute the soft power of software development.

 

I have been familiar with three aspects: design pattern, reconstruction, and data structure. Nothing else is involved. First, the previousArticleI have mentioned that I am not from a division, and even those who have never been in high school look at the data structure as if I were a tianshu. Second, based on recognizing your own goals and abilities, you have formulated learning objectives for other directions. Therefore, you have not invested much in this field. Therefore, I am just talking about it here, it's not an article about words and deeds. Maybe there are also many mistakes that may be expected to prove.

 

Let's start with the design model. In fact, this aspect has already been used during training. At that time, the exercise was the famous abstract factory ". This pattern seems to be actually being taught by training schools or regular universities in manstreet, perhaps because it best reflects the design pattern concept. I believe everyone should know the three main characteristics of object-oriented: encapsulation, inheritance, and polymorphism. the prosperity of the design model is only popular after the mainstream of object-oriented development, therefore, I have heard many sayings"The design pattern is designed to make up for the shortcomings in object-oriented development.". Here, I cannot make an accurate judgment to prove whether this statement is correct. However, from my own point of view, this sentence should be correct.

 

I have read the gof Design Model Book and the headfirst series. I read the big talk Design Model several months ago. There are actually a lot of books explaining the design patterns, and there are various forms. Although I have read these books, they are all knowledgeable and I have not followed them for practice, so I have not learned them well. However, this is the last time I read the story. First, the design model has already been used in our daily development, such as strategy, template method, simple factory, and Singleton. Second, some models have never been used, such as interpreters, Yuan-sharing, and memos. Third, the design pattern is good, but it should be mostly used in practice. In practice, we should select the best pattern, instead of abusing these patterns. We should not turn them down, but more importantly, clarify the logic.

 

There is only so much understanding of the design pattern, but it is also superficial, but the data structure is an important piece of knowledge that I can't stand. In terms of data structure, I really have no say, and I have bought a few books. However, the current level is just a few simpleAlgorithmThere is no other things than sorting, not to mention terms such as complexity. They are just a noun for me.

 

Finally, let's talk about the reconstruction of the project. In fact, after each project is completed, some reconstruction will be performed during the test. If it is not a time issue, most projects can make a lot of reconstruction and makeCodeIt is more elegant and concise, but this rarely happens. In fact, I am a perfectionist with a little obsessive-compulsive disorder. I hope my code has neat and nice comments, and I also hope that my code will be concise and beautiful, so there will be no repeated code, A method must not exceed one screen. However, these years of development have not completely fulfilled my ambitious wish!

 

My restructuring is very simple. I give full play to the three main characteristics of object-oriented, and then, according to the classic sentence that my manager of the first company said :"Object-oriented means all of them come out!"Refactoring as a principle. In fact, it is nothing more than taking advantage of the inheritance and rewriting of polymorphism functions, and encapsulation is often considered at the beginning of the encoding stage. The other is to clarify the relationship between the include and the hierarchy. The last step is to complete the annotations to facilitate future maintenance.

 

------------------------------------------------

If you use word2007 to publish a video, the film is not displayed or you are prompted to have an attachment but no attachment, please go to the independent blog to view the complete article!

Modify and add content of the article only in the independent blog!

My independent blog: kiddie-Http://www.zyblog.net/

Link to this article:Http://www.zyblog.net/post-114.html

You are welcome to reprint it. Please indicate the source of this 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.