The C Programming Language
2 months ago, I finished reading a book that almost every programmer is acquainted with, no matter the language they code in, and personally got to experience what made the book earn its reputation: The C Programming Language by Brian Kernighan and Dennis Ritchie.
Before the Book
Before I started reading the book, I had 2 primitive repositories written in C that exposed all of my flaws to me.
The root problem was me knowing just enough syntax to write simple C code but having almost no understanding of how C was designed to behave.
That reality made me hesitant while writing code manually, and I couldn't trust my own decisions.
Eventually, that hesitation led to a lack of creativity in solutions and robust code, the main reasons why C shines when handled professionally or causes a real disaster when neglected.
Pretty rough realization to bump into, I must say, but these facts were nothing but an opportunity to get better.
Fundamentals
Finishing this book felt like moving from 1st to 2nd grade in elementary school.
If my answer to 5*5 would be "25, I believe?", now it's a firm, confident calculation.
What I love about this is that, on paper, the jump is small but fundamentally important.
Imagine an average 3rd grader attempting to solve 6th-grade problems. Before rushing to solve them, you'd probably tell the student to think about the tools they are missing.
That's exactly what I tried preventing by reading this book.
I wasn't necessarily trying to solve overly complex problems. I was trying to solve them without having the fundamentals to do so properly.
I felt like whatever I was doing in C was no big or complex deal, but as mentioned in the previous paragraph, I wasn't particularly good at even these tasks.
What Changed
One of the biggest changes I've noticed is moving away from brute-forcing every solution with magic-valued, buggy loops just to get the task done.
Nowadays, I first identify the actual problem I'm trying to solve, whether it's:
- finding the cleanest way to represent an arbitrary value as a
struct - simply deciding on the sequence of checks and actions for a new function
and I can think about the solution in the C way of doing it.
This book gave me great fundamentals that I just refused to skip, and I see the fruits of that work frequently nowadays while developing my project that I can't wait to finish and share with you guys.
Appreciation
In the period that I was reading the book and implementing exercises at the end of each subchapter, I kept having the thought:
"The book is so good. I have to give the flowers to the people who made this book possible."
Let this be an appreciation post for Dr. Kernighan and Mr. Ritchie.
Thank you for giving generations of programmers such a damn good foundation.