A Return to Argparse

Royce Ayroso-Ong
3 min readNov 1, 2020

--

For my last and final entry into this year’s Hacktoberfest, I decided that I want to contribute a little more than just changing the style of some method headers. I wanted to contribute actual content, and luckily I found FlashReads (link to repo). Essentially, it is a website made from the content found in it’s GitHub repository; it allows creators to add content just as if they were to add content to an open source project. Curious but a little skeptical, I decided to try my hand at it. Following similar steps as my last entries, I read the Contributing section of the README.md, forked the repo, created my issue branch, and began thinking about what I would add to their project. From the list of issues, one of them stated that they were looking for short articles related to Python. I decided to go and add a section about something near and dear to my heart — Python’s argparse. Before beginning to write my short tutorial on argparse, I noted that each and every blog follows a specific template. Following this template I wrote a simple program to parse two integers from the command line and use it in a method to calculate the area of a rectangle. See example below.

I created a Markdown file in which I documented the steps, added some example screenshots, and committed my work. I pushed it to my forked repo and then started writing my pull request description. In my pull request I shared my example screen shots, referenced the issue I had in mind, and gave a short description of what I wrote. I noticed that in some of the other pull requests they were missing the template, which I was careful to avoid. As of now I am still awaiting a maintainer to review my PR, but like my last entry (which was eventually accepted) I am confident that it will be merged.

What did I learn through my experience of adding content to FlashReads? Well, that I really enjoy explaining and documenting my process. I think I’ve finally come to like writing, which is odd since I hated English in high school. Overall, I can definitely say that this month of October was a busy month that showed me a lot about myself, stuff that I didn’t realize was possible until I actually stepped outside my comfort zone. I’d like to thank DPS909 — Topics In Open Source Development for starting me on this path of discovery, without this course I don’t think I would’ve grown to be the programmer that I am now.

--

--

Royce Ayroso-Ong

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