12

How to contribute to OpenSource project

 2 years ago
source link: https://rodiongork.tumblr.com/post/106239453568/how-to-contribute-to-opensource-project
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

How to contribute to OpenSource project

This post is bit too long. At first I’ll explain why it is hard to find a project to contribute to, so you can avoid typical mistakes. Then I’ll try to give some practical advice on searching for the project.

Why is it so hard to find a project?

Most general problem of beginners is the lack of experience. Not only experience in specific programming language, but also ignorance of popular tools for code management, building the project etc.

For example, project sources are usually hosted in some repository with the help of some Version Control System like Git or SVN. If you do not know the system used by other developers of the project - no one is going to teach you. And if you do not know how to use necessary build tool, like maven - no one is going to explain you how to build the project (unless some special steps are explained in documentation.

Why people do not want to explain you all thoroughly? Mostly because 90% of potential newbie contributors are not going to proceed far. They lose their determination after a day or two studying the project. So any time spent on unknown beginner is potentially just lost time.

Second problem is the lack of accuracy. Once I allowed some student to help in my small project building the demo for it. After some kicking and explanations the required java applet was created - it was very small one. But the code was somewhat horrible. Wrong indentation, poor naming conventions - and a handful of mistakes like “Genarotor” instead of “Generator”.

The third problem is that while many beginners want to develop some great new features in some great projects - they should instead look at first for small bug-fixing (and probably in some smaller projects). So they simply search in wrong direction. Implementing of great new features usually require good knowledge of the project so it just could not be assigned to new team member.

Now, how could you still find a project?

At first, decide where are you going to search. Most popular platform is GitHub, though many good projects are also hosted at SourceForge and other places.

So if you are going to do it with, say, GitHub - surely you should at first learn how to use this site. Of course you need to learn at least basic operations with Git version control system. So register here, create some basic projects, try to commit to them, clone and pull from them - even create branches and pull requests to see how it works. Learn to use it.

Next decide what language is your main. For example it could be Java, C++ or PHP. Usually it would be important to know several, especially for web-projects. Learn about some tools for your language. For C++ learn about several compilers (like MSVC and GCC). Understand the usage of “make” tool (or “maven” for Java, or “nuget” for C#). Practice with it.

No go to GitHub Search and try to create some criteria to find you a list of suitable projects. This could be like following:

  • language = Java
  • stars < 10
  • forks > 3
  • of the size < 100kb

Now surf through the list of results. Try to learn about each project - this may take hours or even days. Try to find the project which purpose you understand well. Look for documentation and open issues. Look for accepted pull-requests - to see whether some people already contributed there, and what they have contributed.

Optionally you can choose some project you already know or have been using. For example, I liked MapDB. I found its source.

When you have found a project - clone it and try to build and run. If you can’t, even after some time - probably it is better to choose another project. If you succeeded - it is great.

Start exploring project features - see how it works and what for it is used. Then try to investigate its code. Feel free to change anything in your local code - for example start from changing labels on buttons, then adding some buttons or changing their behavior etc.

Usually after some study you anyway come to idea that something needs to be improved. If you will find a clear bug - it would be great at all. For example in case with MapDB I found I could not run current version on my OS due to some nasty NullPointerException, arising from the incorrect manipulations with directory paths.

Try to change the code to achieve your goal, to create necessary improvement. Ideally this should be small change - so that people at once will see it is important and raises no doubts. Then push your changes to remote repository (your own at GitHub) and create a pull-request. Owner of the project will be notified and can review your changes, either accepting or declining them.

If your “invention” is not quite obvious and you are not sure, whether it is needed - you may instead create a ticket. Explain your idea and write that you are ready to implement it. Owner of the project will comment on your issue whether it should be done. After that you can write implementation and create pull-request as explained above.

You also can browse existing tickets (if any) and see if you understand meaning of any and is ready to perform required task. This is one of the best way to contribute - however many project owners are too lazy to work with tickets :)

And still here is another way…

Instead of contributing to other open-source project you may start your own. Use any idea, even simple - this could be basic JavaScript game (like famous 2048), or some JQuery plugin for example.

Create your own repository. Use tickets to set tasks for yourself. Behave like you are working on serious project - and you will learn much in this way. You may even invite some your friends or classmates to contribute to your project. Or search for contributors at forums.

After few projects - even tiny - completed in this way you will see that it is far easier to understand other’s sources and contribute to them if you still want to.

Good luck, and please do not forget to share your story if you succeed in contributing your code to anything!


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK