Week 13: Progress on Projects

Lemmy

It’s taken a lot longer than I expected to contribute significantly to Lemmy. I think my enthusiasm for learning Rust overshadowed my ability to realize that maybe such a huge project in such little time was not the best way to learn. I would say, a lot of the fault in the little progress I have made stems from my fear of approaching the project.

So far, I’ve really just stuck to documentation fixes.

My PR Made an Issue Which I Got 2 PRs Out Of: Stonks

I came across my first opportunity to contribute when I was perusing the docs for something to work on. I saw that the project manager had used some sort of online graphing tool (I suspect Desmos) to draw up the graph explaining his ranking algorithm.

Now, as an engineer, I think graphs are mad cool. It hurt me a bit to see that they were using such a haphazardly put together graph. So, I thought why not spice it up with Seaborn.

And, this is what was birthed:

Sure, nothing ground breaking, but it had labels, coloring, and a legend. I was content.

They seemed to be hosting their images on imgur and so I uploaded my graph on imgur and submitted a pull request. But, that led to this conversation:

One of the maintainers opened up an issue and I jumped on trying to fix it:

As the two references show, I messed up on the first attempt. But, in doing so, I learned a really cool git thing that I never thought I had needed: sub-branches.

To summarize what needed to happen for the issue to be resolved was:

  1. Upload images to repository
  2. Link the docs to images in repository

But, the first needed to happen and merge before the second could be implemented. I wanted to do this right so I wanted to test both of those things before even merging the first one.

First, I made a branch of the master like I usually make branches git checkout -b my_first_new_branch. I couldn’t test out the linking part on this branch, because I planned on using this branch to make a pull request.

So, I needed a second branch that had the changes of this first branch. Clearly, making the second branch the usual way wouldn’t work because it would just fork the master branch and not have the changes from my_first_new_branch.

This StackOverflow thread taught me about sub-branches, which is exactly what I needed:

After doing so, I was met with a cool network graph where it showed my second branch forking out of my first branch instead of master.

My Initial Attempt was Ugly

Really this bad PR experience taught me the importance of having clearly defined branches for different issues. In trying to fix the documentation issue, I had accidentally pushed some (untested) backend code into the documentation pull request. Of course, it failed the Travis-CI check. Ugly fumble.

But, you live you learn.

Other News

I didn’t get to make much progress on Movinyl. I played a bit of Stardew Valley. Re-learned virtual memory for OS. And I spent an obscene amount of time on a side-project instead of doing homework.

Written before or on April 26, 2020