My Journey and a memorable debuggin experience .

Pius Aaron
2 min readJun 28, 2024

--

Being a software developer can be challenging. Whether it’s battling with backend logic, centering a div, or debugging a web server, each task presents unique obstacles.

My name is Pius Aaron, and I am currently a software engineering student at ALX Africa specializing in backend development and I will be graduating 3 months from now. I am also enrolled in the ongoing HNG internship program (cohort 11). HNG (Help Newbies Grow) is a training platform for newbies in the tech ecosystem to challenge themselves, thereby sharpening their skills and making them job-ready.I have been in tech for quite some time now.

I wrote my first “hello world” program in Python in November 2021, marking the start of my journey in tech.

My Favorite Programming Bug Encounter

Among the several technical challenges I have faced as a developer, one stands out. My partner and I were building a simple shell program, a clone of the Linux shell (sh) in C. The project aimed to strengthen our knowledge of memory allocation and management, system calls, and how programming languages interact with the Linux Kernel.

While testing the application, we encountered a persistent memory leak that was almost impossible to trace.

Initially, we used Valgrind, a memory management tool, to check for leaks, but it showed no signs of any. We then used fsanitize for further confirmation, which revealed the leak but didn’t pinpoint the function causing it. Fsanitize traced the leak from the main function to a system call, providing an incomplete picture but giving us a clue.We had to follow the program flow from the entry point several times, considering edge cases that might trigger the leak. This process helped us locate the function call that allocated the memory, the function that used it, and the function that should have freed it.

The issue felt weird and challenged my understanding of C pointers. The root cause was a triple pointer passed to a function that required a double pointer. Fixing that resolved the issue, and the program ran perfectly.

This experience was tough but ultimately satisfying. It fueled my desire to learn more and improve. That’s why I am at HNG — to learn, unlearn, and push myself out of my comfort zone. I heard HNG is difficult, and that’s one reason why I applied. I have always anticipated being here, and now that I am, may the force favor me.

For more about the HNG Internship, visit HNG Internship, HNG Hire, or HNG Premium.

--

--