Yay! My app got its 7th feature with me doing nothing or very little!

Tony Vu
4 min readOct 2, 2020

It was Friday afternoon when I realized I need to catch up with school after spending most of the week tailoring my resume and cover letter for Co-op applications. I went to the channel to see what people have updated for their releases. Surprisingly, most of the posts were about the ongoing Hacktoberfest. Some students seemed to be ahead of the game and already made a few PRs. At that moment, I was thinking “I should start soon or all the easy issues would be taken up”, but I needed to finish this blog for lab 2 before I can do that. So here we go!

Welcome to week 3 of my open source journey! I have slowed down a bit compared to the last two weeks despite having added a couple new features to my URL Checker, but I did nothing for my HTTP Status Code API due to time constraint. I hope to ship out something soon as I have a partner now for the project. With that being said, I still managed to add a feature to Isabella’s repo allowing the user to pass glob pattern like *.txt when reading directory for certain file extensions. I have always wanted to add this feature to my own app, but decided to add it to her app first. To begin I raised an issue suggesting to add a new feature to her app.

Raising an issue

The first step in my approach was to have a read through of how she coded her app to get a hold of her styling and code structure. After that, I tried to think of a way to alter her code with minimal chance to create any conflict with her code for existing features. Eventually, I decided to add a flag option using GO built in flag package, so I can do something like the following:

If globFlag{

//Code for new feature

return

}

By doing this way, I would ensure that anything I implemented in her app would tie only to the flag option. It took me about a couple of hours to implement the logic as I needed to spend sometimes researching about a third-party package called “github.com/mb0/glob” to deal with glob pattern. I have also updated the README with documentation for the new feature to keep everything consistent. After doing a last check to ensure there was no typo and everything worked without issues, I made a PR to her repo and the wait began.

create a PR

It took her a couple of days to merge my PR and she did not leave any comment. I took that as a positive sign that my code might fit her code perfectly so there was nothing more to discuss. What I have learned from contributing a new feature to someone’s repo is that you need to understand how they code their program as well as the flow of their logic so when your PR gets merged, the application works. Additionally, I got a chance to practice my git skills and understand Github better.

Thanks Phil for contributing! You are the man!

Phil was one of a few students who communicated with me through out release 0.1. For lab 2, he continued helping me to make my app better. He raised an issue to add new feature allowing user to send a custom User Agent string in the header. This seems to be a small feature but it could prove significant later on as the app grows.

(Phil raised an issue)

I took sometimes to review it and got back to him with a request to make some change to his contribution. What I wanted him to alter is how he set the new flag option for custom User Agent so it is consistent with the other flag options. He fixed it and updated the PR a couple hours later. I thanked him and merged new feature into my repo. You can check out the new feature here. This brought my app’s total number of features to 7!!! Isn’t it amazing???

Communication on PR

And that’s it for this week. I hope to have a breakthrough in my HTTP Status Code API and Hacktoberfest next week so I can give you another TL;DR kind of blog.

Thank you for reading.

Tony Vu

--

--