DEV Community

Tong Liu
Tong Liu

Posted on

Reflect on Pull Request 2

Links

Issue
Pull Request 2

What did I do in this Pull Request?

I decided to try something more complicated in this Pull Request because I can't wait to contribute to the real project that people are actually using. I wanted to try out something related to Android since I wish to put my Android development knowledge, which I learned last semester, into practice. Luckily I found an Android project named Catima. This app is to help users add their physical cards (like gift cards, promotion cards, etc.) to their phones so that users can easily manage the cards they own. This is a project that is relatively manageable for me with the given time frame for the Pull Request. Since they didn't have good issues for me to work on, so I had to find bugs and fix them myself. To start it off, I cloned their repository, and after building and installing the app, I was so excited to start bug hunting. Luckily, I found a bug in the first 2 minutes, which is the bug that when users denied camera permission on the card scanner page, this page will just show a black screen instead of a friendly permission denied message. I created an issue to address this problem immediately, soon after I posted my issue, the repository maintainer allowed me and assigned me to fix this issue.

How did I fix the problem?

To fix this problem, I had to add more layout XML resources to the activity to replace the UI when users denied camera permission, and also, add some logic code to the Activity class to listen to the permission denial event and switch the UI in accordance with the permission state. I was so lucky that the maintainer has a high standard on code quality, which could give me a peak at what should standard code look like. After I submitted my first fix on Pull Request, the maintainer made a lot of fix suggestions on my code, including function naming, hard-coding on permission request code, and some UI changings. We communicated through GitHub's Pull Request comments to make sure we were on the same page, and soon after I realized we were, I started working on the fix. After several rounds of communication, I was so excited to know that my Pull Request was finally accepted and merged into the main branch.

This is the page I added.
BTW, this is the page I added

How has this Pull Request affected me?

From this Pull Request, I found how exciting it is to communicate with someone about my code and, more importantly, I now have fallen in love with GitHub and I will keep contributing to this community not only because of Hacktoberfest and the T-shirt.

Top comments (0)