Why Learn C?
Our industry has changed a lot in the past two years. We, the software engineers, pretty much stopped writing code. We still produce code–a lot of code!–but writing it manually, as we used to do for all these years, is not something we do often these days. So, if this is the case, why would I suggest that you learn C, and why did I create this website in my free time?
There are several reasons for that; let me go one by one.
C shows how computers work
Many people these days start their programming journeys with languages like Python or JavaScript. Don't get me wrong: both are very popular languages, and, by the way, I wrote both the frontend and the backend of this website in TypeScript, which is basically JavaScript with types. But there is one very problematic aspect of using either of these languages to start working in software development.
The modern languages hide the complexity. In Python, you can assign a number to a variable, and you can compare two variables:
a = 42
b = 42
if a == b:
# do something
pass
and you can do the same thing with strings:
s1 = "test"
s2 = "another"
if s1 == s2:
# do something
pass
The problem here is that the language completely hides from you the fact that comparing two integers is a trivial operation, while comparing two strings requires iteration; no processor implements such an instruction as "compare two strings". How are these strings actually stored in memory in Python, the regular Python developer does not know and does not care.
This is just one example of the modern languages hiding the complexity of the real computer from the programmer. There are many more. As a result, you write code and it works, but you never think how complex the code you wrote actually is.
C, on the other hand, is very close to how processors actually work. You cannot compare two strings in C without either an explicit iteration comparing each pair of characters, or using a library function strcmp. The language does not hide any details from you; quite on the contrary, all these details are painfully present: you must know exactly how your data lives in the memory.
Thinking about these things actually makes you a better programmer.
You cannot vibe-code without understanding
You might ask, why do I need to know all this, when Claude or any other LLM agent will just write all the code I need?
This is not very accurate. Agents are, indeed, very good in writing code, and I use them a lot both in my work and for my hobby development. The backend of this website is written with agents (but not the texts! all texts are written by me, no LLMs here). But the main prerequisite to being productive is agents is knowing exactly what you need to do.
For projects that are not that important, or that need to be implemented really fast, we tend to "YOLO" the code: whatever the agent generated, if it works, we use it. Unfortunately, this approach is unsustainable: the more "YOLO" code appears in your project, the harder it is to add features, fix bugs, and make the agent do what you want. However smart the LLM agents might be, they still need a human who understands what they want to get.
Now, how to obtain that level of understanding? Well, you need to write code, manually. Compare this to learning math: calculators exist for ages, and Wolfram Alpha can evaluate any integral you might see in your calculus course, but they still teach you how to differentiate and integrate on paper. Learning C is similar to that.
C is fun
Writing the code in C brings me joy. It's like building from the very basic Lego pieces, where you define what you want to get, and you build it. Try solving any Advent of Code problem in C: you don't have sets, maps, or hash tables, in your standard library, so if you need something, you go and implement it, and that extra work brings you some amazing freedom.
Will learning C immediately raise your software developer salary? I don't think so.
Will it eventually make you a better programmer who enjoys the job, even if the job is to steer a bunch of LLM agents who actually write code? For sure.
Start this journey with me right here! → Introduction