Achievement Unlocked: Submit a pull request to a public Github repository

Oct 19, 2014 23:01

A couple of hours ago there was a Hacker News story about SimpleCPU.com, which gives a nice, simple, introduction to what a computer does at a low level, in about 10 minutes, with cool things to click on.

I played with it for a bit, noticed that the scrolling of one piece didn't work in Firefox, and that it didn't correctly cope with an overflow of the program counter[1]. I reported both of these as Issues on the Github repository, and then realised that I could probably fix the latter one myself.

So I browsed through the source code for it on Github, discovered it was nicely organised, found the line of code I wanted to change, forked the code[2], created a branch[3], made the change on it[4], and then submitted that change back to the person who owns the original code[5].

Three minutes later they accepted the change and merged it into their version of the code.

And shortly after that they pushed the latest version of the code up onto their site, and now it's live, with my fix in it!

I've never done this before, and now I'm sitting here feel very cheery that it went as smoothly as it did.

If you have a few spare minutes, and an interest in how computers work, I recommend taking a look.

[1]If anyone is actually interested in what that means, ask in the comments.
[2]Basically, made a copy of it that includes a pointer back to the original version it came from.
[3]A split from the master version of the code that contains the change you want.
[4]Oh, and I also pulled a copy of the code onto my machine and tested my change actually worked. Because there's nothing makes you look stupid faster than saying "This change is so simple it doesn't need to be tested."
[5]This change submission is known as a "pull request", because that nomenclature maximises confusion. Apparently "change submission" was too easy to understand.

Original post on Dreamwidth - there are
comments there.
Previous post Next post
Up