Release 0.2, My first Big Contribution

Mohammed Ahmed
2 min readOct 22, 2020

--

Before Hacktoberfest started, I wanted to try and get a taste of how contributing works around GitHub.

I looked for big projects that might need some help in terms of Python code. That and C++ are really the two languages that I feel the most comfortable in. I found Mozilla’s OpenWPM project, and I found some issues that I felt really comfortable with. I’ve already contributed in terms of cleaning up some code, but I wanted to really get into the issues. Thankfully, someone who’s a contributor gave me a task that I felt was very intriguing.

The Issue I was assigned

In this case, we needed to create an Object that holds the status of OpenWPM. The current system sends a Tuple[str,str], but it’s very hard to even track where the Tuple came from to begin with.

My idea was to have the Status stored into it’s own object, for easy reference. Originally, I thought “Oh, easy money”, but looking at the code that I was revamping, wow. It was pretty messy.

This snippet of the code shows how the status queue is passed and read. This was very confusing, and lead onto a very.. odd function that I needed to implement.

Medium really doesn’t like formatted code, so unfortunately I have to provide screenshots.

The Status Object

The Status object I’ve created does the following: Stores the status name (i.e, CRITICAL, OK), Stores the Exception Object, and Traceback. For backwards compatibility, and parsing the Tuple, I made a function called “Raw Tuple” that will grab the old tuple and push it into the object for pickling.

Well.. does it work? I’m unsure. With a recent update to my Mac, it completely broken my dependencies for one of my packages in Python (Thanks, XCode….) I have to reconfigure gcc & g++ before I continue, but thankfully the person I’m working under was very kind enough to help me debug as I fix my issue.

Will I continue contributing? Of course! This is just the beginning!

  • Mo

--

--

Mohammed Ahmed
Mohammed Ahmed

Written by Mohammed Ahmed

0 Followers

Transit Enthusiast, and Games Enthusiast

No responses yet