DEV Community

Cover image for Hacktoberfest 2021! My first contribution
MizuhoOkimoto
MizuhoOkimoto

Posted on • Updated on

Hacktoberfest 2021! My first contribution

Hello October! Hacktoberfest is here!
I would like to share with you my first memorable contribution to an open source project.

Up until now, I've been doing school assignments and getting scores/grades according to the instructions given by the professors. However, the open source development course(OSD600) by David Humphrey at Seneca gave me a great opportunity to actually contribute in the real world. My first contribution was a very small start, but I would like to work up to something bigger for my 4th contribution!

First, some background on this open source project, the issue and the pull request.

Project

Artificial Brix created a artix-component-library (repository URL) which provides UI Components like Buttons, Cards, Inputs, etc. to build web applications.

Issue

"Make a better getting started readme file and also a contribution readme file" (Issue #63 URL)
This issue was about modifying the README.md file and adding a CONTRIBUTION.md file. I posted a comment before I worked on it, and one of the repo's owners got back to me and assigned it to me very quickly.

Pull Request

"Added details to README.md and created CONTRIBUING.md file" (Pull Request URL)

Second, I would like to mention what I learned from this pull request.

yarn...?πŸ’­

When I tried to run the project, I encountered a problem where I couldn't install yarn. I have never used yarn on my project, and I always use npm instead. I asked David and he gave me a detailed explanation.

What is yarn?

It was created by the Facebook developers. There was a time when developers using the NPM Registry took a very long time to update and fix bugs in the npm tool as the code size of billions of lines of JavaScript and the number of engineers increased. Facebook was dissatisfied with the pace of things and wanted to fix it for the internal team and created Yarn, which is compatible with npm but much faster.

How did I install yarn?

I had to do $npm install yarn -g on the command line to install.
When I installed node, I got npm by default. On the other hand, yarn tool has to be installed separately.

Was it okay to install it globally?

Yes, since it’s not really a dependency, in the same way that git isn’t a dependency: they are tools to build/develop the project.

Why should we avoid to install dependency globally?

It's better to avoid installing dependency globally because many projects specify the version and we don’t want to have the wrong version installed for a given project.
If you only work on one project, installing globally might be OK. But if you work on lots of projects, you might have dozens of different versions of the same dependency being used by each project. It’s always better to install to a local node_modules/ folder rather than installing globally.

I installed yarn, but yarn and yarn start didn't work! 😱

Error message I had another problem: I opened power shell in administrator mode and entered Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted to change the PowerShell execution policies.

I finally worked!

However, it took extra time... I thought this issue: modifying README.md file and adding CONTRIBUTION.md was easy one. Since I didn't create this project, it was hard to make description for it and how much I could modify. I have decided to add a step to install yarn, License, and Contributing sections. Luckily, my professor explained about CONTRIBUTING.md in his lecture, and I created the file with references to it.

Time to push and make a Pull Request!

Although I was worried how much to improve, I finally pushed and made a Pull Request.

Merged! Accepted πŸŽ‰

Another repo's owner got back to me and requested to add more detail to the CONTRIBUTION.md file. After I modified and pushed it, the person accepted my pull request! Moreover, the person gave me kind words and comments.
Message from contributor
I was impressed that the open source community is great place to contribute and gain experience, and many supportive people!

Conclusion

I was very happy that I could contribute to a project which was outside of school! I still don't have confidence to contribute to a big project, but I would like to take more time to find one and look more deeply into it. My contribution was small, but I acquired a better understanding from this first pull request.

In addition, I learned some useful features on GitHub. On a repository:

  • Ctrl + Shift + .: Opens a repository or pull request in the web-based editor
  • Ctrl + Shift + T: Activates the file finder

Lastly, I really appreciate the support from my professor and the contributors at Artificial Brix πŸ’“ Happy Hacktober πŸŽƒ

Top comments (0)