Many people don't like to read the source code and feel bored.
If you don't understand the source code, it will be difficult to write the code later. Many developers mainly focus on the writing of code, but ignore the reading of code.
Reading code is very important. The following Anhui computer training introduces code reading skills for everyone.
1. Learning to run the code is the first step in reading the code, so that you can learn a lot about the details of the project, how to run it and how to use the library.
This is the best way to understand a project. If you can understand and write related projects by yourself, you will have your own ideas about using frameworks and libraries.
2. Find high-level logic When you start reading the code of the project, every detail will be involved.
On the contrary, you need to master the high-level structure and find a starting point from this place, which can be used in many large-scale project development.
If you are developing a web program, Anhui IT Training suggests looking at different packages, such as the location where business logic is stored, the location where ui code is stored, and the location where the controller is stored.
3. Understanding and using tools Many tools can help you read the source code and greatly help you visualize the code.
In the process of use, Anhui IT training thinks that IntelliJIdea tool can navigate the source code, and allows searching by using part of words or even abbreviations of words.
You should also learn keyboard shortcuts.
Using the mouse to navigate the source code may be boring and slow, and keyboard shortcuts can jump faster.
4. Understanding the language A deep understanding of a specific language will help improve your code reading skills.
Every language has its own conventions, styles and grammar.
This knowledge can help you get familiar with the specific code quickly.
Anhui computer training found that in Java language, method names start with lowercase letters, while in C # language, method names start with uppercase letters.
Knowing this difference can help you find the identification method from the source code.
I flew 10000 kilometers from China and 13 hours to Austin, Texas, USA. I was slowly released from the expectation and joy of seeing my son an