Final Thoughts

For my final week I made two smaller pull requests. With final exams coming up and final assignments due I did not leave a lot of time to make two larger pull requests.

For my first one I went back to NodeChat. When you chat in NodeChat you see your avatar, and ‘Me’ underneath. I thought that having your username instead of ‘Me’ would make it easier to remember your name, and would be a nice change. Most chat apps use your username and not ‘Me’ so I figured it would be a welcome change.

This change was fairly trivial, just adding the username from this.state instead of where “Me” was hardcoded in.

You can view this PR here: https://github.com/OTRChat/NodeChat/pull/71

My second and final PR was to Github Desktop, fixing a small typo I had noticed while I was searching through files for another PR I had done.

You can view this PR here: https://github.com/desktop/desktop/pull/6348

All in all I had a good experience this semester working on open source. I learned that it is actually not that hard to make some meaningful contributions to large projects that I use all the time.

I also got more confident picking through a large codebase to find the right files and places in the files where I should make my modifications.

I feel like I have made some decent contributions to different projects and that my contributions were appreciated by the maintainers. I look forward to making more open source contributions in the future.

Week 5

For my fifth week I only ended up making changes to my previous PR from week 4. I was asked by maintainers to modify my code to keep the entire check inside the file where the user avatars are found, in order to not modify the commit object, which could cause problems in the future.

The code is essentially the same, but rather than adding a variable to the commit object, I added it in the avatar check, and accessed the commit parameters from there as well.

This has taught me that sometimes in small edge cases like this, doing things the simplest way, and the way with less impact on the codebase, is the most effective.

The PR has since been merged and closed.

View my updated PR here: https://github.com/desktop/desktop/pull/6281

Week 4

With my 0.3 release complete it is time to start on the final leg of the course. For our 0.4 release we must again make 3 contributions to open source projects, though this time must make the opposite number as last time, meaning since in the last release I contributed twice to internal projects and once to a large open source project, this release I will contribute twice to an outside project and once internally.

This week I made a second contribution to Github Desktop. You can see the issue I chose to take up here:

https://github.com/desktop/desktop/issues/6135

In Github Desktop, you can view the commit history of your repository, and in that history it displays the Github avatar of the commit author, coauthors, and the committer. In a certain scenario, where a coauthor was also the committer, their avatar would appear twice in the list, which is redundant.

In the code to build the avatar list you can see there is a simple check:

if (!commit.authoredByCommitter && !webFlowCommitter)

To see if the commit was committed by the author, which prevents the avatar appearing twice in that case. But there is no check if the committer is a coauthor. What I did was add a check for this, using similar logic to the author check:

this.coAuthoredByCommitter = false
for (const coAuthor of this.coAuthors) {
if (
coAuthor.name === this.committer.name &&
coAuthor.email === this.committer.email
) {
this.coAuthoredByCommitter = true
}
}

The difference being that coauthors are held in an array, and there can be multiple, whereas there is only ever a single author, so the check involves iterating over the coauthor array to check if any coauthor matches the committer.

Then I added the check in to the avatar array build:

if (
!commit.authoredByCommitter &&
!webFlowCommitter &&
!commit.coAuthoredByCommitter
) {

And the bug was fixed! I had to fix some unit tests that failed after adding a prop to the commit object, but other than that everything seems to work well.

You can view my PR here:

https://github.com/desktop/desktop/pull/6281

Week 3

The past week I made 2 more contributions. One was to one of our class repos, the other to an outside project called Github Dashboard.

The class project I decided to work on was NodeChat. I had originally wanted to contribute to the Seneca Student Centre browser extension, but it seems like I was the only one. I decided to change projects so I wasn’t the only one working on it.

NodeChat is a web based chat application built in React. So far it is very simple, you ‘log in’ with any username you’d like, then start chatting. The chat UI is still very barebones but the core functionality is there.

The issue I decided to work on can be found here: https://github.com/OTRChat/NodeChat/issues/33

Right now everyone uses the same default profile picture. I added an upload file button to the chat window toolbar, which users can use to upload an image of their choice, which is then displayed instead of the default picture. This is still a WIP, as other users wouldn’t be able to see this image. The next step would be sending the image to the server so other users can view it, which shouldn’t be a large change.

My PR can be found here: https://github.com/OTRChat/NodeChat/pull/65

Github Dashboard is a project by Github, written in React and using Electron so it can be used as a desktop application. Github Dashboard gives you a nice UI to view all your Github content without using the website.

The Issue I decided to work on can be found here: https://github.com/desktop/desktop/issues/6137

The issue was inconsistent behaviour on a keypress in a small modal in the About section, in one window it would close the modal, in another it would open the first link in the modal. I looked into the code for the working one (closing the modal), and brought that over to use in the non-working one. This changed the modal so that pressing enter would close it.

My PR can be found here: https://github.com/desktop/desktop/pull/6220

Week 2

I’ve decided to work on the Seneca Student Centre browser extension. There are quite a few things that really make it annoying to use, and i’d like to see if we can make it a bit more user-friendly.

So far nobody has added any issues or PRs, most people seem to want to work on the Blackboard extension, so I’ve started off small with a manifest.json, which is all thats needed to create an extension you can add to the browser. Currently it has no functionality other than the ability to open the Github repository the code resides in.

View my PR here

For the upcoming week, I will be looking deeper into specific functionality of the extension, and adding issues into the issue tracker, and hopefully taking on one or more of these issues.

Next Project

Over the next month+ we are required to contribute to 2 (or more) open source projects, one being a major established project (something like Visual Studio Code), and the other being a brand new project that will be (hopefully) completed by our class.

So far I have not decided on which major project I will contribute to, I still need time to look into the ones I am interested in and make a decision. Since I contributed one PR to Visual Studio Code for Hacktoberfest, I know how to make changes and run tests, so it may be a good option to consider instead of learning a new project from scratch.

As for the class project, I am leaning towards working on a Seneca college browser extension, which would add new features and provide better formatting for Seneca Blackboard as well as the Seneca Student Centre. I definitely think the Student Centre in particular could be much better designed and easier to navigate, and hopefully a browser extension can make it much more user friendly.

I have not worked on a browser extension before, and it would be a good learning experience to work on one and see how exactly they work. Maybe in the future after working on this one, I may have some other ideas and create some different extensions.

Hacktoberfest Post-mortem

After a long month Hacktoberfest has finally come to a close. I managed to submit my 5 pull requests over the month to complete the challenge. Here are the links to my 5 PRs:

The biggest thing I learned from this is that the hardest part of submitting a contribution is figuring out what kind of contribution to make. Projects can have many issues but trying to determine if you are able to fix it, and how you could fix it, is very difficult. I also learned that contributions are appreciated no matter how small they are, developers love to see other people contributing to their projects.

For the most part I think my PRs were pretty straight forward. One issue I ran into was when a project wanted to have PRs against a branch other than the master. I should have switched to that branch then created my new branch off it, but instead I created my new branch off master. This created issues when trying to submit a PR because it wanted to submit vs the master branch. In order to fix this I probably could have figured out some git commands to do it, but instead I just redid the fix because it was small anyways.

Next time I would try to get ahead earlier, I ended up having to do 3 PRs over the last week and a half, so I wasn’t able to make bigger contributions as I would have liked. I think Hacktoberfest is a great way to get people started in the open source community and I hope to participate again next year!

My final pull request for October

For my final pull request for Hacktoberfest I added a contribution similar to my 4th. Someone had created a web app about Halloween, and included in this app is a list of Halloween facts. I simply added a fact to this list. Once again this was a small addition, but I was running out of time in October!

This PR was almost identical to my previous once which made it easy. I only had to add a string to an array of other halloween facts.

At the end of this I am glad to have finished Hacktoberfest, and a more detailed post of my experience will be coming very soon.

You can view this pull request here.

My 4th open source contribution

For my fourth pull request I contributed some content to a small app called ‘killed by Google’, which keeps track of a growing list of products or services discontinued  by Google. I found this project funny because Google has a long history of starting new projects only to scrap them a short time later, then starting up something new which does the exact same thing as the last project they scrapped, then scrapping the new one as well! Seeing all these projects that have been killed off by Google really puts this all into perspective.

The app uses a large json file to store data for all the products needed to display. In the json, the project name, start date, end date, a short description, and a link to details about the project are included. I contributed the project Needlebase, which was a platform for easily scraping and analyzing data on the web. This project was acquired by Google and ended 2 years later, with functionality being integrated into Google’s other products.

This was another simple contribution which only really required knowledge of json and how to add new objects to an existing json array.

You can view the pull request here.

My Third Contribution

For my third contribution I went back to Path of Building. There are many small issues in the project (the application is massively complex, it’s not surprising there are so many small bugs with only one main developer!), so it’s easy to pick up a small bug and fix it.

Again this time the bug was with an item displaying wrong stats, it included a modifier which it shouldn’t be, so I removed the mod. This was a trivial fix, especially since I had the repository all ready to go locally from my last fix.

From this PR I learned that making multiple PRs to the same repository is much easier than trying to work through a new one! 🙂

You can view the pull request here.