Posts

Showing posts from October, 2020

Git : Rebasing Refactoring Amending

Image
As if I still don't know everything about git. This week learn about rebasing and amending, rewriting git history as the prof described it. So let's say you're writing a word document and you're in the editing phase. You violently mash Ctrl+S every time you make a small fix. Adding punctuation, deleting a word, making a new line, you save again and again and again. Now imagine if you had a log for every time  you save that file, like a git commit. Now that's a lot of entries, and we as coders do this with git commiting as well, but with git saving and tracking each one of those commits, our logs get a bit convoluted and messy. That's why git rebasing and amending is here to save the day. So for this week's lab our prof wanted us to practice these new git concepts by polishing our code and git commiting to our hearts content, since we will be rebasing in the end. So I made my changes and made a couple of commits to the code. Once I was satisfied with the chan...

HacktoberFest Entry No.2

Image
So around last week I found a great github repo of a chrome extension that previews contents of a webpage when you hover over a link. I stumbled upon it after a suggestion from my professor about taking a look at chrome extensions for a possible repo to contribute to. I'm glad I did because this was a chrome extension that was interesting, seemed practical and had a maintainer who was keen on receiving contributions to better his program. The extension is called Survol First I had to install it and test it out first, can't just contribute to a repo meaninglessly just to force a pr. I tested the extension and liked the functionality, it was useful and is well designed. Makes it all the more exciting for me to try and contribute to it. So I read the docs and learned how the extension worked. It uses a javascript file to inject html elements through the dom and uses mousemove event to detect anchor links to request information of a page, and positions and fills the div with conten...

I'm almost Git-ting It

Image
" Ahhhh okay I get it..... I think" is what I say to myself most of the time when I'm watching Prof H's lectures on Git. This week it's about remotes. They're super informative and concise! He clears up whatever uncertainty or confusions you have about the git, granted you have been practicing and experimenting with it out on your own beforehand. This week we're tasked to merge and make a pull request to a repo of one of our peers.... but WITHOUT the use of GitHub. So you mean to tell me we're going to do all this merging, comitting, fetching, etc. all without this helpful UI that still didn't make everything about git clear? Alright fine, in the end, the only thing I can gain from this is more git knowledge and I welcome that. So I picked a repo to work on, forked it, set up an upstream and contacted my lab partner regularly regarding the code. This time I chose me-check-links, a program written by a course mate of mine Jasper Mui. We were to writ...

I Fixed a Typo!

Image
I've done it. I made my first official contribution to the world of open source development. I fixed a single typo. This week's been pretty busy so I haven't gotten around to participating in hacktoberfest, which is pretty much our assignment for this whole month. But this weekend I got around into exploring github and its millions of repos. It's pretty amazing to see all sorts of projects that are hosted on the website, from personal to big projects, from react applications to google chrome extensions, there were a lot that caught my eye. The hard part was picking one that felt like I could contribute to. Ultimately that's the goal of this whole assignment from our professor, dipping our toes into the world of open source and making baby steps in contributing to them.  The 1st of 4 pull requests that I will be making this month consists of a typo. A minor one that I managed to notice by chance whilst I was testing out the app. A lightbulb lit up above my head and I...

Journeying through Git Merging

Image
So this week Prof H's has got us experimenting with multiple branches for our program and merging them altogether. The first part of the task seemed simple enough, the features that were required were not that much of a headache to code. The real challenge here is merging 3 branches altogether that's been coded separately. It just seems like the more you learn about git, the more you realise you barely understand it. And that was the challenge this week with the merge feature. The final merge tree of this whole debacle So I created 2 different branches and went to work on adding the features. I added an option to the CLI program that would output a json array of the URLs and their status' And in the other branch I added another option, of 3 different flags that would filter the url outputs based on their results. Once I was done with these commits, it was time to merge them. Merging the first issue was fine, because it was essentially a fast-forward merge, but a little note...

Pull Requestin'

Image
This week in my Open Source endeavors, our task was to delve deeper in the open source world and try our hand in contributing more by using pull requests. Our professor had tasked us to add a feature to any of one of our peers' programs. Simple enough, except this would be my first time actually tinkering with someone else's code to add an actual contribution, pretty exciting. So I looked through the list of repos of the class and I decided that I wanted to step out of my comfort zone and try out a program in a language different than mine. Currently, I'm taking a web development class using ASP.NET and wanted to polish my skills in C#, so I found a perfect repo for that from a coursemate, Zayed. CheckLink  [ https://github.com/abuZayed15/check-link ] I thought "wow that sounds pretty similar to my program..." so it must have been the perfect fit right? Regardless, I was already quite interested in trying out C# programming and so I read and I learned. My previous...