Month 2, Building a Shell

Month 2, Building a Shell

"A Shell accepts human-readable commands from users and converts them into something which the kernel can understand." Welcome to Month 2๐Ÿ’€


3 min read

Oct 26th โ€“ Nov 17th

The third month in the ALX program, this month marks the end of Sprint 1 in the foundations of the program (insert local man dancing here๐Ÿฅณ). Most of this month was focused on building a capstone project using our programming knowledge of C got in the previous months. In this month, we were to build a simpler version of the shell program (sh).

TL;DR: Learnt about common bit operators and how to do some bit manipulation in code, also had an introductory overview regarding opening files and working on them from a C program. Built a simple version of the sh shell program.

Overview for the month

The goal of this month was to survive simple shell. Students from past cohorts were always lamenting on how challenging the project is, and for a while I also started freaking out.

Then on one of my doom scrolls through Twitter, I saw this tweet written by someone from a previous cohort giving advice on how to pass the Shell project.

And that was basically what I did. When the project started, the concept page was legit my best friend. Had to beg my project partner to give me a week's grace to go through the concept page fully before we started working on building our own version of a shell.

That one week grace had to become two weeks, but regardless, we got it done! And I am super proud of being able to collaborate with someone, to build a program that I found truly difficult to create.

Key Concepts Learnt

Bit Manipulation

  • Went through common bitwise operators and how they work (e.g. OR, AND, XOR, Left Shift, Right Shift, e.t.c).

  • Used bitwise operators to solve tasks that required binary processing.

Collaborating on a Software Project

  • The shell project was a team project. So I had to work with a fellow SE student at ALX to build it out. This was the first time collaborating with someone remotely on a project.

  • Communicating roles and to-dos efficiently, and letting my partner understand any blocker I might be facing and how it can affect the timeline set for the project.

  • Writing code that can be easily understood, and if there is a part that seems quite complex, the task is on you to write comments/documentations that helps your teammate understand your work better.

Our simple shell repository is also on GitHub. Still planning on improving what we built sha, but for now,๐Ÿซถ๐Ÿพ๐Ÿซถ๐Ÿพ.


Working on a project that large was an excellent test of my present knowledge of C.

Saw this on Twitter, and it made me feel a bit proud of what I did. Anyway, I understand that this is just a small program that doesn't even have real-life users (except the testers), but the experience did boost my confidence in my ability to build difficult applications, and I do look forward to building more challenging projects.

And that's a wrap on my mini-documentation for Month 2, thanks for going through my poor attempt at writing (I promise to do better). Bye๐Ÿ‘‹๐Ÿพ๐Ÿ‘‹๐Ÿพ