The One Thing I Never Understood
When I was in college, I took courses in C and C++. I enjoyed programming and did pretty well. I understood variables, functions, loops, and most of the things they were teaching us. But there was one subject I could never quite figure out.
Pointers.
I remember sitting in class, looking at all these asterisks and ampersands, wondering what on earth was going on. The professor would explain something, write a few examples on the board, and somehow I would end up more confused than when we started. It was unbelievable. I could write the code, sometimes even get the right answer, but if somebody asked me to explain what was actually happening, I couldn’t do it.
And that bothered me.
Many years have passed since then. I’ve had a wonderful career in software, working across data engineering, cloud infrastructure, and large enterprise systems. I’ve worked with companies operating at tremendous scale, where the technology supports millions and sometimes billions of dollars in business. I’ve met some incredibly talented engineers, worked on difficult problems, and learned a great deal from the people around me.
But one thing I’ve learned is that no matter how much experience you have, there is always something you don’t know. And sometimes it’s something you probably should have learned twenty years ago!
Lately, I’ve been spending more time studying UNIX and C programming. I’m at a point in my career where I want to understand the machinery behind the software I’ve spent so many years working with. I want to build more of my own tools, understand how operating systems work, and become a better engineer in the process.
I’ve always believed that understanding something is far more valuable than simply knowing how to use it. You can spend years working with a technology and become very good at it without ever understanding what’s happening underneath. There’s nothing necessarily wrong with that. But I’ve become increasingly curious about those underlying mechanisms, and I think there’s tremendous value in learning them.
So I went back to C.
And wouldn’t you know it, there they were again.
Pointers.
The very same thing I couldn’t understand in college. After all these years, they were still waiting for me. I had to laugh.
This time, however, I decided I was going to understand them properly. Not just memorize the syntax or get a program to compile. I wanted to know what was happening in memory, why the language worked the way it did, and how all these different concepts fit together.
There’s an old saying that if you really want to learn something, try teaching it. I think that’s excellent advice. It’s one thing to believe you understand something. It’s another thing entirely to sit down and explain it clearly enough that somebody else can understand it too.
Writing has always helped me organize my thinking. It forces me to examine what I know, recognize what I don’t, and work through the details until things begin to make sense.
That’s what I’m doing here.
I’ve put together a six-part series on pointers, beginning with the fundamentals and gradually working toward some of the more interesting aspects of C programming. There will be plenty of examples, diagrams, and explanations of the little things that finally made these concepts click for me.
I’m certainly not claiming to know everything about C. Far from it. I’m still learning, and that’s part of the fun.
But if you’ve ever struggled with pointers, perhaps this series will help you understand them a little better. And if you already know them well, maybe you’ll find something interesting here too.
I think the best part of learning something is being able to share it with somebody else.
So let’s get started.