DEV Community

Oliver Pham
Oliver Pham

Posted on

My First Baby Steps in Open Source

After building my first prototype of a static site generator (SSG), I asked the open source contributors in a Slack channel to test my program. I was taken aback by what happened after that.

The first issue

After sharing a link to my repo in the channel, a kind developer accepted to review and test my code. I also took the opportunity to test his work in progress. Although I've already exposed my code to the public for a while, I was extremely nervous since it was the first time [someone on the Internet tested my prototype].

Not long after he started, the first issue was found. As expected, all I could say was:

image

To my surprise, neither a heated argument nor "code shaming" occurred. In fact, we worked together to figure out the cause instantly: I forgot to set the file encoding when opening text files. "How can it work on your machine?", you may ask. Well, I'd only tested the prototype on MacOS, whose default file encoding happened to be correct, but that's not the case for Windows. Therefore, having a fellow developer test my software and review my code is absolutely invaluable.

My first contribution

It didn't take me a lot of time to fix the issue, so I decided, in return for his help, to test his program, which was also a SSG written in Javascript.

Despite having worked with a large codebase before, I feared that it would take me a lot of time and effort to understand his code & architecture. Fortunately, I was wrong. In fact, his code was pretty well written and documented. All the core features worked as expected.

Everything looked good until I checked the static file on https://validator.w3.org/. Some syntax was found invalid, so I opened an issue and described my recommended solutions as detailed as possible.

"Maybe I can do something more that that", I thought to myself. After getting familiar with his code, I managed to write a patch for the issue and make my first pull request for the project.

Thanks to my previous experience of collaboration on GitHub, the workflow (opening an issue, submitting a pull request, etc.) wasn't a big problem for me. Nevertheless, I learnt something truly precious from this experience: testing and reviewing code with a partner/team/community gives me more insight and motivation than I'd ever gain by coding alone.

🎉 Let's get more involved in open source contribution.

Top comments (1)

Collapse
 
tuenguyen2911_67 profile image
Tue

Love the meme