My First Open-Source Contribution

When I started my career in software, I was really fascinated by the people's contribution to open-source libraries. I used to wonder how the community works, and how projects are maintained and kept up to date. So all of this started building my interest in the open-source community. Also working at PLG Works we got multiple opportunities to work on different projects which later became open-source and it encouraged us in doing the open-source contribution to other libraries also.

As we know, the first merged PR is very special for every open-source contributor. So in this blog, I will discuss and share the experience of my first merged PR.

How I came across the problem statement

I used the up-for-grabs and find-me-Issues websites for finding the issues/enhancements in the open-source libraries. The websites also provided different filters which helped me in finding the proper issues/enhancements.
The first issue/enhancement that I found was in the gabriel-vasile/mimetype package. So let's discuss it in detail.

Feature Description

The package was written in golang and it helps in detecting MIME types and extensions of different file formats based on magic numbers. There was a requirement for support for the new image file format JXR and JXS which was recently released.
The PR for the JXR file format was already raised by someone else so the scope was only limited to the JXS file format.

Walkover to the solution

In the MIME type detection of the file formats, the magic number plays an important role. It is a sequence of characters at the start of the file format which helps in detecting the file type and its extension. So for JXS, I referred to the official documentation released by IANA where I came to know about the magic number of JXS format which is a 12-byte string like 0x0000 000C 4A58 5320 0D0A 870A.

So I used the magic number and added the corresponding logic in the package.

Closing Remarks

I would like to thank @gabriel-vasilel for actively reviewing my PR and giving valuable feedback on the same. Also, I would like to appreciate PLG Works for encouraging team-members to support and make contributions to the open-source libraries to give back to the community. Thank you!

Vaibhav Dighe

Vaibhav Dighe

Software Engineer at PLG Works
Pune, maharashtra