Engineer Java source code to read some insight

First, why read the source code

That is, by reading the source code to give you any good.

  1. Learn how the demand - realize, open your mind, improve your ability to design architecture - design;
  2. Help to better understand the principles and architecture design;
  3. Online help quickly locate problems BUG
  4. According to their own business can modify the source code, customization
  5. You can learn some programming skills:
    • How to use design patterns
    • How to correct various types of Java, rational, efficient and practical (lock, thread pool, etc.)
    • What with the data structures and algorithms
  6. Enhance the personal experience, on the one hand from the accumulated experience of work in the project, on the other hand to read from the accumulation of open source projects. Does your company have a common open-source project design and project implementation, okay?

Second, how to read the source code

  1. First, figure out the principle of (demand), what is this thing;
  2. Secondly, got architecture design, module (function) delineation;
  3. Again, use;
  4. Finally, just to read the source code
    • Not the whole look, focus on the core, the higher station
    • Always thinking: Principles - Design - realization
    • debug -> core classes and a timing chart of FIG.

Third, the personal opinions of some

  1. A common sense, read the source code before long to forget. If the process of reading to understand the principles of (demand), to understand the architecture design, output the core class diagrams and timing diagrams, then back to the verses and easy;
  2. If writing a blog about the source: Principles, architectural design and technology, the core class diagrams and timing diagrams + vernacular description;
  3. Each person's background knowledge, read the source code in different ways, for their own is the best;

Guess you like

Origin www.cnblogs.com/littlecharacter/p/12154597.html