Beginning of my Open Source Contribution

Asmin Budha
3 min readJul 7, 2020
https://ji4n127gpjg29plb11l88dg7-wpengine.netdna-ssl.com/wp-content/uploads/2019/03/iStock-956366756-1024x683.jpg

It has been late for this article since this article will be revolving around my contribution to react-native-camera which was long before. But, today while writing this article I was motivated by participants in my Git & GitHub for beginners session. Also, recalling a comment from Anit Shrestha dai where he mentioned maybe writing an article about it will help others, has motivated me to write this article.

In this article, I’ll be talking about my story about how I did my contribution and I’ll talk about the case before and now which I learned from it. I hope this article will give an idea and motivation to beginners who are new to the world of Open Source. For how to part, there are lots of blogs and tutorials so this article will only be focusing on the motivation part, not on how to do part.

My Story

It starts when I was on a react-native project on my current working company Leapfrog Technology. My tasks were mostly revolving around the camera part of the app. There are two libraries which we were using in our app i.e react-native-image-picker and react-native-camera.

We had a task where we had to open the front camera initially for better UX and back cameras on some parts. And you know with client projects if there’s some task then you have to do it anyway. But the library hadn’t provided that props for Android, it was only available on IOS. So, we looked into the internal codes of Android if we can add that feature. We did find the solution but unfortunately, that solution doesn’t work for the Android version above 6. Although we have created a PR for this if someone might benefit from it.

Later on, with react-native-image-picker, we had some random crash issues too so we decided to use react-native-camera since it allows props to show front and back cameras too. With this, we integrated react-native-camera but one feature which it provided was not in react-native-camera i.e providing paths to save the captured image. Now, again we did search into and added code. We thought this might be helpful for others too so we opened a PR that got merged later on.

Steps I took

  1. Did change the code in node_modules directly for the use case of our application.
  2. Once, changes in node_modules resolve our issue. We forked the original package to our repo then pushed our changed code.
  3. With our forked repo, we can use it until those features are merged into the original library.
  4. Now, to create PR into the original library, we tried to generalize this feature and made it accessible through props.
  5. Tested out changed library for edge cases and bugs.
  6. Once verified we created a PR that has a nice discussion over it. Maintainers and collaborators were quick to respond, they reviewed code and requested for changes or any other clarification.
  7. After approval, they merged it. Unfortunately, it got some bugs that we might have missed while testing but thanks to the open source community they quickly fixed those bugs and added that same feature in IOS too.

But contribution is not limited to adding features or bugs. Contribution can also be done by raising issues or fixing grammar mistakes in documentation. Likewise, we have also raised many issues during that project so can be your contribution. After this incident, my respect for the open source community has raised more. And thanks to react-native-community, they have so granularized modules that it’s easy for us to contribute.

Learning

So, what I felt with these experiences is that need or attitude that makes you do it anyway helps you to contribute more i.e fix bugs or add a feature you need otherwise we’ll drop that library or tools thinking that it doesn’t provide feature we want and search for other or say it’s not possible like I used to do during my college days. But I think the attitude that I have to fix it or add that feature helps motivate you more into contribution. So, my suggestion would be to not be limited to resources provided by others rather create your resource or modify others.

--

--

Asmin Budha

Programming enthusiast who loves solving problems