Community Contributing
It’s almost the end of the month, and being at home is beginning to mess up my biological clock in a way. I’ve been very sluggish, waking up in the afternoon (12:00 pm – 1:00 pm) instead of in the morning, and there are at times that I don’t even know what the date and time is. It’s as if every single day is the same day, like Groundhog Day. But, I’ve been doing more time studying, namely Python again, because the more I started to read news and statistics about COVID-19 and the nationwide lockdown that I started to get more interested in data science and analysis.
To be honest, I never really associated myself with math and statistics. Sure, computer science, programming, web development, and such have ties with math also, but there are some aspects within computer science and programming that I really enjoyed and wanted to pursue further. I don’t know if it’s because I had strict teachers at my former elementary school 1 that I felt discouraged in gaining more interest in math. Even when I moved here in the States, I never really got my interest peaked in math. But everything else that somewhat has ties to math, such as computer science, computer engineering, sciences that involve biology, anatomy, and a little bit Chemistry, and anything that has logic in it is where I felt I have strengths with, even if it was a bit. Regardless, I still hate math, and what’s worse back then, that in order for me to take these introductory courses, I had to have a decent grade in math, so I never really had a chance to take introductory computer science courses back in high school. I was able to take Statistics course, I did decent in them, but I hate word problems. I feel that is the part of math that I’m really bad at.
But, since I finished the Python course in Skillcrush and gave me an introduction to data visualization, data manipulation, and a bit of an intro to data science and machine learning, the subject got me very interested too. Especially now with the unknown and unpredictable outcomes of what’s going to happen to this world with the pandemic still active, the field me made me become a lot more interested.
That’s not to say that I’m no longer into web development. I still would like to develop something that would benefit everyone, but building something turned out to be a lot harder than I thought. Maybe if I can do reports and do some reviews on the data that we receive on anything daily, I would feel a lot more productive and it would help everyone as well.
Rather than talking about what I’ve been self-learning during this time, 2 I’d like to write about my first experience as a contributor of a GitHub project. In this case, helping out building/modifying Techtonica‘s learning curriculum program.
My first contribution completed
This is actually a follow-up to my previous post. From my previous post, I mentioned about making my first open contribution on GitHub by doing a few tasks in building and upgrading the course curriculum for Techtonica, a local non-profit tech education organization to teach tech 3 women and non-binary folk with low incomes. They provide on-the-job apprenticeships for top tech companies for those who qualify in periodical cohorts, as well as providing other services such as career placement, counseling, and more. I attended one of their online meetups for the first time looking for volunteers to update and complete some of their courses for their upcoming cohort this summer (June). I’ve wanted to do open contributions for the longest time, but I never really know where to start, and I always thought that local tech meetups would be a good place to go and contribute something.
For a beginner, especially if you know very little to no coding, there are other ways to contribute. Because I’m still more or less green with coding in general, plus there are a lot of volunteers, I decided to choose the tasks on their TO-DO list that involves reviewing and pretty much documentation, technical writing, etc. I ended up taking a reviewer task4 and a slightly larger task.5 At that time, since there was one reviewer already taking care of the reviewing task, I decided to focus on the bigger task: Recreating/replacing Bash to Zsh for their command line course.
Step 1: Forking and Cloning the Repo
This is the first time that I’ve done open contributions in GitHub, so I had to use my GitHub cheatsheets from my Git course in Skillcrush, which I finished sometime last year6. Just press the Fork button at the top right corner, and then clone the repo. We can do this by either downloading the repo as a zip
file or type the following on your command line 7:
1 2 |
git clone |
Because I was way too excited to work on the task, I deliberately skipped a step or two and went ahead and created a branch. Not following along with the cheatsheet and not really thinking that the steps before creating a new branch and working on the files would cause me some merge conflicts that took me days to fix it 8
Luckily, the conversion just needed to be completed before the beginning of their next cohort in June, and it was still the beginning of April. I was able to get through the steps with my mentor and finally understood what went wrong. But before that, I did go through Googling and searching around Stack Overflow and they all had different answers to my merge conflicts problem. My conflicts cheatsheet also didn’t help me much and still searched around for answers. After having no luck of finding the solution, I gave up and turned to my mentors at Skillcrush to get me unstuck.
It was then that I found out that I did skip steps because I was too excited and went on to work. My mentor was patient enough to guide me through all the steps that I needed to get me back on track. I’ve neglected to add the original repo as an upstream repo.
Never be stubborn with things such as this and never rush things just because you’re excited. Always follow all the steps from the beginning to the end!
Step 2: Add the original repo as an upstream repo.
After forking and cloning, add the original repo, in this case, the Techtonica Curriculum repo, as an upstream repo. This is key because you are contributing your help to the existing content of the repo by adding or modifying and that you’re not creating something new:
1 2 |
git remote add upstream |
Step 3: Syncing your fork with the original repo
This is so your fork can be read by the original repo when you make your changes. All the changes will be saved in the forked repo, and when you start pushing them, it’ll go directly to the original repo on GitHub.
1 2 3 4 |
git checkout master // This will bring your path to the master directory git fetch upstream git merge upstream/master |
Step 4: Create your branch and edit your files on your computer
Finally, time to create your branch. But first, we check to see the existing branches of the original repo. This would also help prevent you from naming your branch that can be a duplicate of another existing branch.
1 2 |
git branch |
Once you finally get to view the existing branches, we can go ahead and create a branch. But before that, we have to be sure that we’re at the master
branch of the repo.
1 2 3 4 |
git checkout master // use this if you're not currently in the master branch git checkout -b (new branch) // replace (new branch) with your chosen branch name |
Once the branch is created, you will automatically be located in your branch instead of the master branch. We can finally work on the files from our computer using our favorite IDE or text editor.
Step 5: Add, commit, and push your changes to your branch
Just like when you start adding, committing, and pushing your files to your master repo, the steps are the same with your branch:
1 2 3 |
git add (files) // replace (files) with the names of the files you were working on git commit -m (commit message here) // describe the changes you made |
Finally, push your files to your branch:
1 2 |
git push origin (new branch) // Replace (new branch) with your branch name |
Step 6: Submit a Pull Request
Let the project heads know that you’ve got something to contribute to their repo. Head over to the repo site and click on their Pull Requests section. From there, you can comment on what you did, the changes you made, etc. Then you wait until the reviewers and others who are assigned to work/check with the issue you’re working on respond through commenting. In my case, my pull request is here. You can read our communication history on what was done right, what still needs to be fixed, etc.
After that, the entire process starts over until everything’s fixed. Once they’re all fixed and approved by the reviewers, they can merge your branch to the master branch, applying all your changes to the previous/original files. Your pull request will be closed and from there, you can also delete your branch.
Merge Conflicts
When I submitted my pull request for the first time, I wasn’t aware that (aside from skipping steps the first time) the files I was working on were moved to a new/different location, therefore my modified files can’t be merged to the original files on the same location. This was where I requested my Skillcrush mentor to help me out and sync my branch to the new location, so I can properly work on what needed to be fixed and merge them. In that way, the reviewers would be able to see my changes and would be a lot easier to merge when everything’s good to go.
It was in this issue that took me awhile to get it fixed. I remembered how I started to panic then because I didn’t want to mess up the original files in their repo. But, eventually I remembered that this is Git/GitHub that I was dealing with, and it is a version control system. I wouldn’t be losing or mess up any of the original files because git can revert the files back to its previous version before I made the changes/mess. Through this experience, I started to understand a lot better as to why it’s important for every developer/programmer from beginners to professionals to have solid knowledge of git and GitHub. They’re a complete lifesaver!
What’s next?
I also want to do contributions also with my other local non-profit group, Tech By Choice (TBC). I signed up to create a course draft on Markdown because I didn’t see anyone suggesting to have this in the currently under development TBC curriculum. I already have a tutorial about Markdown here, but it doesn’t mean I’m going to just copy/paste what I have from there and be done with it. There may be a lot of types of Markdown versions/enhancements that are compatible on certain platforms, like GitHub documentation, blogging, and so on.
I also want to start contributing a little bit for MDN (Mozilla Developers Network), namely on content creation, modification, documentation, etc. I still don’t have confidence with my coding skills just yet, but this would also help me develop some of my non-technical skills that are also essential to working in tech. However, they have certain style guides that they need to keep uniformed throughout the MDN site. MDN has become a go-to documentation site for developers and programmers of all levels that it would feel strange to see any article formats different from the current existing types.
Lastly, I’d like to contribute for WordPress also, but I’m not sure what to do just yet.
Do you have any lists of non-profits and other organizations that need volunteers to finish their online projects? Please share me some names and links.
Thank you very much.
Some Extra Notes...
- It was a private Catholic Montessori school back in the Philippines and math was a complete nightmare to me.
- I started taking online art courses too, so I divide my time between coding/data science and art
- namely how to code
- The reviewer task was to provide reviews and comments on altered content in which the assignee had to convert Python code to Javascript code
- Converting a short Command Line course from using Bash to Zsh (Z Shell), since Techtonica’s curriculum are all based on using Macs and that the MacOS Catalina has switched their shell default from Bash to Zsh
- For Mac, that is. I already finished Git with Windows PC some years ago…
- Be sure that your path is where you want to save your repo at…
- with some help from one of my Skillcrush mentors on Slack.