How to familiarize yourself with an open source project?

Source: Internet
Author: User

Turn from: http://www.blogjava.net/killme2008/archive/2012/05/22/378885.html (a good blog)

You have a task, you need to use an open source project, or the boss will tell you a thing to get you to know something. How to do it. How to get started. My habit is this:

1. First, find and read the project's blog and materials, through Google you can find a general description of the blog, a quick read to the project's purpose, function, basic use of a general understanding.

2. Read the project's documentation and focus on similarGetting started, ExampleTo learn how to download, install, and even use the knowledge needed for the project.

3. If the project has to provide ready-made example project, first try to follow the introduction of the beginning of the document run example, if the operation is smooth, then congratulations on your successful opening a good head; If you encounter problems, first try the project'sFAQand other documents to find the answer, again, can be the problem (such as the exception information) as a keyword to search, find the relevant solutions, you met, others will also encounter, enthusiastic friends will record the process of settlement; Finally, you can submit the question to the project mailing list, please help you see.do not attempt to modify example until you have successfully run example.

4. After running the first example, try to modify the example according to your understanding and needs, test advanced features, etc.

5. Once you understand basic usage, you need to get to know the project in depth. Examples include configuration management, advanced features, and best practices for projects. Usually a well-functioning project provides a light-to-depth user guide, and you don't need to read the guide from beginning to end, focusing on some chapters and taking notes (Evernote recommended) based on time and interest, especially on your own tasks.

6. If time permits, try to build the project from the source. Often open source projects provide a build guide that will guide you through building an environment for development, debugging, and construction. Try building a version.

7. If time permits and is interested, try to read the source code:
(1) Before reading the source code, to see whether the project provides architecture and design documents, read these documents can understand the general design and structure of the project, read the source will not be able to do not know.
(2) Before reading the source code, must be able to build and run the project, have an intuitive feeling.
(3) The first step in reading the source code is to grab the trunk and try to sort out a normal run of the calling path, which can be used to observe the runtime variables and behaviors. Modify the source code to join the log and print can help you better understand the source code.
(4) Appropriate drawing to help you understand the source code, in order to clear the trunk, you can draw the entire process into a flowchart or standard UML diagram, to help the memory and the next reading.
(5) Select the interesting "branch" code to read, for example, you are interested in network communication, read the network layer of code, go deep into the implementation of the details, such as what it used the library, what design patterns adopted, why do so. If possible, debug the detail code.
(6) When reading the source code, pay attention to unit test, try to run unit test, basically a good unit test will describe the function and boundary of the codes clearly.
(7) After familiar with the source code, found that there can be improved, there is energy, will be able to propose to the project developers to improve the comments or issue, and even help him repair and implementation, participate in the development of the project.

8. Usually after reading the document and the source code, you can have a more in-depth understanding of the project, but in the field of the project, you may also want to search for related projects and materials to see if there are other better projects or solutions. Trade-offs between breadth and depth.

These are some of my personal habits, and I'm not exactly following this, but in this order, it basically allows you to learn and use an open source project more efficiently.

Huawei Zhangyu: How to learn the open source project and the analysis of Ceph

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.