Coding With Style

Royce Ayroso-Ong
3 min readOct 31, 2020

--

Of course I am referring to my third entry into this years Hacktoberfest where I decided to be a little bit more ambitious and check out a larger repository. What I found was a project under the name of dna.js — according to their README.md, “dna.js is a lightweight easy-to-use UI library enabling developers to rapidly build maintainable JavaScript applications.”

Since I knew a little bit of JavaScript I decided to checkout their issues to see if their were any that I could take on. Luckily, one was opened quite recently and it was a good first issue to get me into the project, they simply wanted me to change the object method definitions to ES6 shorthand. I commented to see if they would allow me to take it on, and sure enough I got the all clear. Right away I forked the repo, cloned it onto machine, and created a separate branch named after the issue number — this is where I began going through all 1500+ lines. But before that, I followed their Contributors section found in the README.md that states I have to run a test before and after I make any edits, which I did. Overall I made the edits in two commits, for the first commit I changed only the run() method as per his request in his issue. He only mentioned to change the run() method, but I found this odd so I sent another comment asking for clarification — did he want all object methods or only the run() method? With the first commit done, and still awaiting his response, I decided to go ahead and also change the rest of the methods. Using Ctrl+F to find all instances of the old styling, I went through each of the 44 lines and changed them to shorthand. Soon after, he responded and said he wanted all methods to be done in shorthand and edited the original issue to clarify that misunderstanding. Since I already went through and changed them all, I decided to review my work, run their tests once again, and push to my repo. Here I created a pull request, where I stated the changes that I made and referenced the issue. As of writing this I am still waiting on my pull request to be validated but I am confident that this will go over without a hitch.

I think in this entry I’ve learned that bigger repos aren’t any more “scary” than the smaller ones. You still have to talk to people and they still have to evaluate your edits regardless of the amount of contributors. That being said, I feel like I am more confident in working on larger repos. In addition, I’ve learned to look for repos with active members, ones where they are actively handling the issues and pull requests since it makes for a smoother experience.

--

--

Royce Ayroso-Ong
Royce Ayroso-Ong

Written by Royce Ayroso-Ong

Student at Seneca for Software Development. Stay awhile, and lets learn something new together!

No responses yet