How did I reach 22k GitHub contributions?
10k hours rule
GitHub is where software is built.
My first contribution
Even though I was doing a Computer Science graduation at USP in Brazil, no professor ever said to us to create a GitHub user account. I do think that every developer should have a GitHub account to be able to contribute with open source projects.
How everything started
I've joined GitHub in 2012, even though I started my Computer Science graduation in 2010. I've started using GitHub in 2013 to save all my university projects because I was going to spend one year in the US to do a study abroad, and I would buy a new laptop there. All my university work before 2013 was kind of lost.
My first contribution to an open-source project was opening an issue at https://github.com/emotionsense/SensorManager, then sending the code solution in an issue comment, and after learning how to fork and send a pull request.
It resulted in 2 commits https://github.com/emotionsense/SensorManager/commit/d14bb814350f3f08f0058f87f622e99cda6ba567 , and https://github.com/emotionsense/SensorManager/commit/46cb46b068464783c9711de103723e14d064335f.
SensorManager was a library that we were using to gather sensor information in our Android app for university research. The 2 commits were to fix the memory leak of IntentReceiver and Bluetooth.
I was so happy about my first contribution to an open-source project, however, I didn't know how this would change my life.
After that I went back to Brazil in the second semester of 2014, I was finishing my graduation and doing master at the same time, for this reason, I did not have much time to contribute more to open source.
I was accepted for a summer internship at PontoTel in January 2015, a startup that manages employee check-ins and checkouts. We were using angular v1, and relying a lot on open source packages using bower and npm to install them. Consequently, every time I got some bug or limitation in one of our dependencies I've decided to open an issue on the Github repo about it.
In 2015, I've contributed a bit to angular/python/android packages that were the stack we were using at the time. In addition, I also made my first commit to the Relay project (https://github.com/facebook/relay/commit/326ab58dc2269c36ff905442f2af2ddb5e1c8a71), back then I was already excited by the possibilities of using GraphQL and Relay to build apps.
In 2016, I've left PontoTel to start Entria where we built a lot of big projects for big companies like Natura and Gol. We focused a lot on the bleeding edge and we were experimenting a lot with new packages and approach that seems old today. For the backend we used MongoDB, node, koa, and GraphQL; for the frontend and apps we used to react, styled-components, relay, and react-native.
All this new stack had a lot of open-source opportunities to improve and collaborate. Everybody in our team was encouraged to contribute back to open source. Our daily dev workflow was to work on our projects, but also open issues, contribute to pull request if needed.
The following years were like this, but with even more contributions.
Below is my contributions chart over the years. It was exponential.
Retrieving the maximum from Github
It is important to show that nobody starts with 10k contributions out of nothing, it is a long process.
The first use of GitHub is to store your projects keeping the history of them. If your project is not about your next big startup, you should make it public. Making it public will create a good portfolio for you over time, and can also help somebody else. It is like Learning in Public.
The second use is to explore new projects (https://github.com/explore), you can see which projects are trending and learn something new. It could also help you find a project to solve a problem you have in your company. In addition, you can follow developers to check what they are working on and discover new projects.
Collaboration is a key part of building software today. We can only build your startup project faster because we rely on the shoulders of many open source projects. You can contribute in many ways as opening new issues, fixing typos, improving/adding new docs, adding a failing test case, fixing some code in a pull request.
Our private use of GitHub includes scrum management using issues and milestones, GitHub actions to automate CI/CD, code review in pull requests, dependabot to update dependencies.
The notifications page is where I check if someone needs my help.
Uncommon, but powerful GitHub Workflows
For me, the best way to learn about a repository is to watch all their interactions of them. As a result, I receive constant notifications about new issues, pull requests, and discussion in that repo, this is like spaced repetition, which is great for learning.
Reading open source code is also a good way to learn more about a project. Most developers that I've talked to, never even tried to read some open source code that they used every day. I like to understand how something works, and reading code always gives me new insights.
Another missing opportunity for developers is to use more code search. GitHub code search let you paste some code snippet and find related code. It could definitely help you how to use some packages without docs.
For example, react-native-view-overflow was made searching for setClipChildren on GitHub, which gives us the insight for the final solution.
use Github search tools, paste code snippets, filter by language, date, package
Read open-source code, download the repository, and explore the code
expand your network, follow your peers
discover what is on trends
subscribe to repositories and see the repository progress along the way
grow incrementally, consistency takes time