DPS909 Fall 2018 Release 0.1
This 0.1 Release was my first project for my Topics in Open Source Development course at Seneca College. In this blog I will be going over what I did and my experiences throughout this release.
Coming into this project, I had used Github before, but only for a project that was made completely by me and team members. This time, I was going to contribute to an already existing project. This ended up being the FilerJS project.
Earlier I looked into FilerJS and its unlink() method, to become familiar with the project and one of its features. The unlink() method allows the programmer to delete a file on the file system.
For my first release, I looked through FilerJS’s tests and decided to pick a test, and then adapt it to the new fsPromises API. This project got me familiar with Github’s standard workflow of forking, editing, and making a pull request. I had already done this during my capstone project at Seneca during Year 3. This time around I was doing it with a real-world project whose codebase was completely foreign to me.
Picking a test
Since I researched the unlink() method earlier, I decided to continue on with that as I was already a bit familiar with it. I looked through the existing tests in FilerJS and found the unlink() tests. I began looking through the file and was surprised to see that most of the code made sense to me, and I was expecting to be more confused. What was really helpful was that almost everything I needed was already contained in this file, so I didn’t have to go looking around in dozens of other files to understand everything. This was what I always expected to happen if I wanted to contribute to open-source projects, and what scared me off. Ultimately I decided to migrate the test for fsPromises.unlink() when trying to remove a directory.
Writing the fsPromises test
This seemed like a very daunting task at first, but was also not as difficult as I imagined. First I began looking through my classmates’ pull requests. Since we were all recreating existing
fs tests into
fsPromises , all of our work looked very similar. After looking over a few pull requests, I was able to understand most of what I had to do to for my task.
I spent a day working on my test and was able to put together something that I thought was complete. I ran the
eslint tests that FilerJS uses to make sure my test works as it should, and finally submitted my pull request.
Shortly after, my classmate Dilan began reviewing my pull request, and pointed out some styling errors as well as some ways to simplify my code and remove redundancies (stuff that I left in from the old
fs tests that
fsPromises solved). I changed my code to comply with his suggestions, and eventually I had a pull request that looked ready to be merged.
Reviewing a classmate’s pull request
After I had finished with my own pull request, I then moved onto offering a review for my classmate. After going the process making a PR and receiving feedback myself, I felt more knowledgeable on the FilerJS project, and knew how to spot simple mistakes that I had made myself.
I found Adam’s pull request, in which he was adding tests for
fsPromises.symlink(), a method for creating symbolic links in the file system. Looking over his code, most of it seemed well done and I could tell that he had done a good amount of research to make sure he wrote his test correctly. I left a code review in which I pointed out some style nitpicks (in regards to whitespace) and one use of the
open() method within his test that he forgot to convert from
fsPromises. Later that day, he made changes to his code to fix what I requested.
Going through this release was a huge learning process, and at the end of it, I feel like I learned a lot about Github and the open source community. Contributing to open source was something that always interested me but I was driven off by what I imagined to be a huge barrier to entry.
I enjoyed this project a lot as I was able to get my feet wet with contributed to a project and learn about it. Making my first real contribution to an open project feels very rewarding, as I know my work will help out people who maintain and use FilerJS in the future. I also got introduced to Node.js which is a very popular tool in the software world today, and I will probably try to get more familiar with it.
I’m looking forward to my 0.2 release in which I’ll be making 5+ pull requests in the month of October as part of Hacktoberfest, and I may even return to the FilerJS project to add more tests and make other changes.