First Public Code Contribution

The Problem

Today I was following a guide to get Blinka installed on my Raspberry Pi 4. There is a Python script to get all the dependencies installed. I noticed in the process that the script did not check for the Python3 module RPi.GPIO which is required by Blinka. Not sure if it's because I use Raspberry Pi OS Lite or what but RPi.GPIO isn't included by default and Blinka needs it to run properly.

The Solution

Initially I figured I would just go over to GitHub and create a new issue. I just learned how to do this the other day and figured someone could easily get it fixed. I mean I could probably fix it... That is when I realised that I could probably fix this issue. I took a look at the script and figured out all it really needed was one extra line.

shell.run_command("pip3 install --upgrade RPi.GPIO")

That's it, that is all that is needed to check for and install the library if needed.

Making Changes

OK, so this is an easy fix (I think). Now how do I submit the proposed change to the maintainer for consideration? Well after all I have been doing at the Adafruit tutorials lately I remembered seeing a guide on how to submit changes to their repo's. I was needing a little break from my I2C Pico project today so why not learn something new. I followed the guide, made my tweak to the script and submitted my pull request. I was a bit nervous, I was worried my change wouldn't fit the style or that I had made a mistake somewhere and this change wasn't even needed or that for some other reason I would be the subject of Jon Ronson's next book. 2 Minutes latter I got my answer. My commit had been merged into the code. My contribution is now part of the code base. I am a contributor to a licensed software project!

Made Better

My change is minor, incredibly minor. It's a very simple check/install command. This simple check could make a big difference for someone who is just getting started with programming and may not be as comfortable reading error messages. Hopefully this change will help someone out without them ever knowing about it. But by making the change instead of just telling someone about it hopefully I have saved the people maintaining the project some time and effort that they can apply to other more important issues that I am not able to fix.

Two weeks ago tomorrow Lisa and I took an unexpected trip to Micro Center because they had one of these newfangled Raspberry Pi Pico's. Little did either of us know what a huge impact this $2 micro-controller would have. 2 years ago a Bible study on purity led to an opportunity to use technology to spread the gospel around the world. 9 years ago an unpaid internship led to a 9 year career with my current employer. 12 years ago an mp3 player (that I returned in less then a week) led to me going to school for electronics. 20 years ago a brief conversation with Lisa kept me from dropping out of high school. It is amazing how God can use these seemingly small things in our lives to change them forever. I need to remember that God can use the smallest things for big change.