Week 4 - Git Exercise; Browser Extension Presentation
This week, we practiced the basic commands in git in class, and presented the extensions we made for Mozilla Firefox. Click ‘READ MORE’ to see my thoughts!
Git exercises
This week, we learned about the basic concepts and commands in git and practiced them on our toy projects. After starting to use git, I’ve been thinking about the mechanism of git. Some of the thoughts that occurred to me this week are:
- some concepts in git are very similar to those in a transaction system, for instance, “commit”. None of the operations made in a transaction system is applied to the global database until the commit point has passed, and so are the changes we made in a repository. We can stage them or unstage them, but they are not really a part of the history of repo.
- however, git is also fundamentally different from transaction systems because it allows multi-branching and reverting to previous versions.
- intuitively, git can be very expensive as it needs to track the changes of all the files in the repo. I was assuming it will be many times larger than the file itself but after checking the memory and file numbers of my repo, I realized it isn’t. Linus Torvalds must have done a marvellous job to make git so efficient (and that’s why he has astounding 227k followers on github).
- lastly, I was thinking how git can track images, videos, or audios, because it seems the unit of history tracking in git is the lines in each file. However, these media do not have lines. I searched this problem online and it turns out git struggles with binary files.
Browser Extension Presentations
On Feb 12, all 10 teams presented their browser extensions in class. The complete list of projects can be found here. Here are some of my reflections:
- I was so amazed by the creativity of all the teams! I was worried that I could not make a useful browser extension within 2 weeks as I’m not very fluent in HTML and JavaScript. The worries turn out to unnecessary. After watching my classmates’ presentations, I realized the project does not have to be complex or comparable with those published to Firefox extension store, and creativity is all that matters. I enjoyed the moments when I laughed at the cat memes, the Trump sticker, and ‘No Code of Conduct’.
- All the teams are very organized in collaboration. I watched the presentations while checking their repos, and I noticed the contributions to each project is split almost evenly among the team members. I believe this kind of collaboration facilitates a good atmosphere in open-source communities.
Takeaways
I reflected on our group work and other teams’ presentation and have the following takeaways:
- I believe the current workflows of the projects are not very scalable, if people want to adopt the same method to develop an enterprise-level application. The structure of a project should be determined in the first place, and different people are supposed to work on different branches for different sections of the branch s.t they do not interfere with each other’s work.
- Moreover, I believed compact commit history is important for tracking the history of the repository. It is often the case that my repo (or someone else’s) has too many commits, and each commit only contains very little change. I believe commit squashing should be performed on a regular basis, if a project needs very frequent updates.
Written before or on February 13, 2025