Day 2 of My 180-Day Developer Challenge: Building Git, learning about Docker and Go


I came to know about an interesting fact today, Git was created in 5 days!!! I was in awe by this fact that a single person created it in 5 days. The man was none other than the creator of Linux operating system — Linus Torvalds. I was inspired in that moment — It became clear to me that a single person could spark a revolution that changes the world. If I would create a lifetime goal, it would definitely become as good as this man. Git might be just around 1000 lines but it is still a great tool.
Today i created the Git hash-object CLI command. If you want to know what i did before this checkout my previous blog — https://medium.com/@mukeshchoudhary33333/day-1-of-my-180-day-developer-challenge-rebuilding-git-from-scratch-be30274e37ac . I have replicated the command. At first, It took time for me to understand the libraries like crypto, zlib and fs. These are built-in libraries in NodeJs. I was mostly stuck at creating a hash on the content blob <size>\0<content>
. Other than that, everything was fine. I mostly searched the documents for synchronous functions in fs and zlib like deflateSync, writeFileSync, mkdirSync etc. Explored https://wyag.thb.lt/ (write your own git ), good documentation. It used Python for code examples, it was simple and easy to understand. I will try to create tree objects and read tree commands tomorrow.
The main thing i learned was theory of Docker. I have used it before, but never went a level lower or deeper in it. Docker is used for containerization, It solves the problem of “Working on my system but not on other systems”. Docker came into the picture and solved this problem. It would also be useful if I am on new laptop or pc and i don’t have any libraries or package manager installed. In that case, i could just pull an image from docker hub. Start the container from the image and it is ready to use.
On a lower level, it uses three main functionalities — Docker engine, Docker CLI, Docker registry. If anyone wants to master Docker, these are the areas where they could start and build their expertise. Docker CLI is a way to communicate to Docker engine, Which creates containers and manages them. Docker registry is like npm where we could publish our images and pull images. It could also be compared to Github in a sense.
Then i explored the Go language, It is a language I have heard a lot about. I had some curiosity about it. This language is extremely fast. It was memory light, fast, compiles at a good speed too, has a garbage collector on top of that. The syntax was pretty neat. It’s was faster than Javascript and Python. Though C, Rust and Zig are still faster than Go. But simplicity and performance in one package. Then I understood why it was so popular among developers. I will use this for my projects. I am thinking of HTTP servers and redis in this language after i have known it well enough. Comment down your thoughts. Feel free to follow if you found it useful.
Subscribe to my newsletter
Read articles from Mukesh directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Mukesh
Mukesh
Tech enthusiast sharing insights on software development, productivity, and self-growth. Always learning, always building.