📜 ⬆️ ⬇️

How to participate in an open source project and get paid?

Hello Habrahabr!

Many development teams participate in contests and accelerators. Win prizes or receive funding.
What if you didn't get on a passing train?

There are several options. One of them is to start your project and wait for it to take off, while spending time creating code and advertising the project in contests, accelerators, negotiations with investors. If successful, you need to find specialists to raise the infrastructure. A number of virtual or real servers for the site, programmers, databases, clients. As a result, many projects never fly up on GitHub and other similar resources.

You can view a list of successful projects for which money is already being paid today, choose the one that is more interesting to you personally and start receiving for your work, albeit not much but compensation.
')
Here is a complete list of projects:
tip4commit.com/projects

Here is an extra:
prime4commit.com/projects

For example, choose the project OpenBazaar. It can be useful in every store. Well paid for it. The server part is in python. The project is at an early stage, a group of programmers is still being formed and is just emerging from alpha.

We look at the details of the code generation process, right on the integration server:
travis-ci.org/OpenBazaar/OpenBazaar/builds/36072087

We notice that the project uses tests for code style and coverage. We can immediately see the statistics:
coveralls.io/builds/1249548

We see that simple work on creating lines of comments, editing style is still enough. And the price of such work is not small.
Sometimes it's $ 1 for 1 fixed line of code.

tip4commit.com/github/OpenBazaar/OpenBazaar

Well, let's get acquainted with the content of the requirements for the code that claims to be part of the project:
github.com/OpenBazaar/OpenBazaar/blob/master/CONTRIBUTING.md

Everything is pretty real. But there is no business for a big company. Since the price for one patch is still quite small, when compared with the salary of a programmer in a large and medium-sized company. The patch takes a little time, but it may take several hours, and sometimes days, to take it.

There is a desire to optimize work


For Python, you can use the Pylint statistical analysis tool. It is easy to use. You just need to dial:

pylint < >.py

And we immediately see the lines that are worth paying attention to correcting errors, editing style, etc.

You can also use the examples from this package for automatic code parsing and additions. In this way, you can write a script that will independently add parameters to comments for coverage tests, and other serial edits. Here are examples of such scripts one , two , three .

In general, you can even organize a working group of programmers. Take a free virtual server: cloud.lab.fi-ware.org
This is a European project from the company Telefonica. I was calmly given IP addresses for free in this cloud.
For the first time, this is a pretty good decision. Later you can move to something more independent.

You can start with free code analysis tools: pmccabe, memory tests (DUMA / DML / VALGRIND). For python, this is pylint.
Wikipedia has entire articles on similar tools .

If over time there are accumulated tools for work - tests, compilers, scripts, tools of static and dynamic code analysis, licenses for Coverity, Klocwork paid services, you can look towards PVS-Studio. All this can be stored on such a cloud server.

The details of working with GitHub and practically used git commands, more than once or twice, were described for habr:

Approximately such commands interact with GitHub

Copy repository


git clone git: //github.com: username / OpenBazaar.git
cd openbazaar
git remote add upstream git: //github.com/OpenBazaar/OpenBazaar.git
git fetch upstream
git checkout -b feature # Creates a new branch called “feature” and makes it active.

Now, do good (and let it be expressed in commits).

git push origin feature # Uploads changes from the current branch to origin to the branch feature

Compress several patches into one (respectively, they will pay only for one PR, but sometimes you have to do it at the request of the author of the project or the owner)


git clone git: //github.com: username / OpenBazaar.git
cd openbazaar
git remote add upstream git: //github.com/OpenBazaar/OpenBazaar.git
git fetch upstream
git checkout feature
git rebase -i master

= squash = - A window with a text file will open in this place. If you replace the first word in the line with squash, then after writing the file, the patch of this line will be merged with the previous one (if there is no squash there). Thus, several patches can be combined into one.

git push -f origin feature

Automatic synchronization with the main repository


git checkout master
git remote add upstream git: //github.com/OpenBazaar/OpenBazaar.git
git pull --rebase upstream master
git checkout feature
git rebase master

= fix any conflicts = - Open files about which git speaks in a text editor. Find the string '<<<' and merge parts from 2 files into one.

git push -f origin feature



After that, a test is automatically launched on the repository (now it is a compilation with the installation of dependencies and checking the code style, and I would like to add static and dynamic analysis and automatic addition of comments with a description of the arguments and return values).



Here is an example of transferring funds for errors found by the static analyzer:
tip4commit.com/projects/728/tips

Many thanks to all for your attention.
Link to github code: github.com/OpenBazaar/OpenBazaar

Source: https://habr.com/ru/post/237977/


All Articles