How to participate in the world's outstanding open source projects?

640?wxfrom=5&wx_lazy=1

Source | Those things about Tomcat | Author | Hou Shucheng

Open source plays an increasingly important role in today's software design, architecture and development.

From SSM, ROR to OpenJDK, Kafka, Tenserflow, and even Bitcoin, which is popular all over the world and travels thousands of miles a day, is also an open source product. This open source product promotes the emergence of more coins and chains, and of course, it is habitual to ignore Linux, which is an open source product.

  • People use open source invisibly when they visit various websites. Web Servers such as Apache and Nginx may be used behind them. If you upgrade to https, the SSL used may also be based on open source products;

  •  Every time we use an Android phone, we are using open source products;

  • When you use SSM and ROR without hesitation;

  • In order to organize photos of many years, in order to classify by characters, when using PaddlePaddle and Tensorflow;

  • You bought a computer with Linux preinstalled on it;

  • When you pass the blink of an eye to authenticate "you are you" in some important scenes in the app... 

It is no exaggeration to say that open source products have always affected people's "production and life".

A decade ago, with the release of Github, the use of Git for version management became more and more popular. At the same time, we can also more easily participate in open source projects through Github.

Use open source, and at the same time, you can give your own code and ideas back to the open source community...

So in the past ten years, countless excellent open source projects have been hosted through Github, such as Ruby on Rails (ROR), like Spring, and many projects have been migrated from SVN to Git. In the process, like SourceForge, Google Code has become more and more declining.

Of course, it is hosted on Github, so that not only the features of Git are used, but also developers in different cities can participate. At the same time, it is convenient for users to participate, submit Issues, and initiate Pull Requests.

In this way, "everyone gathers firewood and the flame is high", and the projects contributed by many people will develop more and develop better. Moreover, when users use open source products, most of them consider the product's latest

When is the update. For products that have not been updated for several years, there will be some concerns about using them.

1. What is open source

I talked about how important open source products are for a long time, and how open source affects our lives. What exactly is open source?

For open source, the most basic and direct feeling must be open source, that is, you can see the detailed "source code" at any time. After all, "there is no secret in front of the source code."

With the source code, you can understand its internal mechanism. When there is a problem during use, you can analyze and solve it yourself at any time without waiting for the official slow action.

Of course, this is only the first level of meaning. The more important significance of open source is that the development of the community around the product can give back the power of everyone to the open source product. The participation of the people, the virtuous cycle mechanism of putting forward opinions, ideas and contributions.

Many people are using the product, and the problems encountered in the process and the code to solve the problem can be submitted back to the product. In real projects, some users can provide different needs due to different scenarios, and even find various problems in different environments. Therefore, it is open source that allows more people to participate in product development and contribute.

This "everyone for me, I for everyone" momentum has further promoted the development of the community.

For example, Linux, which affects the world, also attracted experts from all over the world after Linus was open sourced.

2. How to participate in open source projects

After reading the previous content, you may say that for these open source Niu X projects, I really "eat a tiger, I don't know where to start", I don't know where to participate, and I can't contribute.

In fact, consider this:

The framework and component functions that we usually use frequently in our development, if we find specific bugs, we can fix them and submit them to the official. Maybe your changes will be merged into the code, affecting millions of developers in the world.

In addition to code, project documentation is also a very important part. When we come into contact with a new product, we start with its documentation and follow up with "QuickStart" from beginner to advanced.

So, seeing the wrong content in the document, or some content official after each product release, the document change is missing, these are the places where we can participate.

Earlier we talked about the impact of open source projects on the world. And with the popularity of Github, it has become easier and easier to get involved in an open source project. How to participate?

Take the Tomcat management and monitoring tool psi-probe ( a powerful Tomcat management and monitoring tool ) mentioned in my previous article as an example.

Step 1: fork

First, find the project you want to participate in on Github, and click " Fork " in the upper right.

640

At this point, you'll see a "HD scanned version" of the current project appearing in your repo shortly, like our usual scanners.

640

Shortly after the fork is successful, the item will show up in your personal Repository. At the same time, it shows which Fork it came from. The source can be easily traced.

640

After fork, according to the usage, you can submit code for the areas you think need to be improved and participate in the project.

Step 2: Modify the code to submit

Remember, the current project is " your " project. located in your Repo. All git operations need to be based on this benchmark, git clone to the local, perform operations, and then commit to "your" repository.

For code modifications, it may be necessary to become familiar with the specific inner workings. You can also contribute to its documentation as we introduced earlier.

All modifications and changes have been submitted to git, and when you push to the remote branch, your modified code can be seen in your repository on Github.

Step 3: Create a Pull request

At this point, click " Pull Request " in your repository, and the Pull Request initiated by others for "your project" will be displayed. We now want to submit code to the " source repository ", so click the green " New pull request " button in the upper right.

640

At this point, you can choose which branch of "your warehouse" to submit to which branch of "source warehouse". The changed file content, submitter, etc. will be displayed. Click the green " Create pull request " button, enter the information, and complete the creation of the PR.

640

So far, the pull request list of the " source repository " will display the PR we just initiated, the status is Open, and a "code inspection" and "continuous integration" will be performed at the beginning.

640

Wait for the above "Code Check" and "Continuous Integration" to complete. When there are no problems, the icon will turn green. At this point, the maintainer of the "source repository", Commiter, can merge your submitted content into the source branch.

640

But in general, we need to describe the content of the submitted changes, what functions are mainly implemented, and some screenshots can be submitted at the same time.

Step 4 (Optional): Add more detailed information such as description

640

Then we will add detailed descriptions, screenshots, etc. to the PR as required, and wait for the review again.

640

640

After waiting for the Commiter review to be ok, this content will be merged into the specified branch of the source repository. At this time, the PR will display the branch to which xxx merge commit has been committed, and the status of the PR is "Closed". At this point, this participation has been completed.

640

We will also appear in the " contributors " list for that repository. Isn't it cool?

To sum up, the process of participating in an open source project:

  1. fork a project

  2. Submit Amendments and Changes

  3. Initiate a Pull Request to the source library

  4. Wait for the Code Review, and add more details if necessary

  5. Waiting for the code to be merged into the source library

  6. complete submission

Find a project you are interested in and have the ability to participate in, and start your open source journey.

For more Tomcat articles, please scan the code and follow the official account:

640

Click on the image to see more recommended content

↓↓↓

640

How experienced programmers should improve themselves!

640?

[Interview questions] The fourth set of the most complete Java interview clearance cheats in 2018!

640?

High concurrency in the eyes of big talkers!

640?

Those little-known low-level implementation principles of serialization and deserialization!

640?

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325475704&siteId=291194637