Reflecting on 15 Years of C++: A Guide for Aspiring Programmers
A Journey Through Time
While sorting through some old digital archives, a habit born from a paranoia of needing them in the future, I stumbled upon a relic. Among old college assignments and tutorial code, I found what is likely my first-ever compiling C++ file, dated June 23rd, 2008. That’s over 15 years ago. This discovery prompted a reflection on my extensive journey with C++, a language I use daily in my professional career as a game developer.
The Great C++ Debate
I often see discussions online where new programmers are advised against learning C++. Critics label it as problematic, outdated, and a potential source of frustration that could lead them to abandon programming altogether. While I acknowledge that the language has its imperfections—no language is perfect, especially one as general-purpose as C++—I believe this advice misses the point for beginners.
If you're just starting, the nuances and historical baggage of a language are not your primary concern. You don’t even need to worry if the language you’re learning today will be the one you use a year from now.
What Really Matters When You Start
The most crucial thing is to start writing code. Focus on getting something to appear on the screen, on manipulating files, or whatever task you've set for yourself. The process of doing, of learning, of hitting a wall, finding errors, and figuring out how to debug them—that is the foundational experience of a programmer. Any language that facilitates this is time well spent.
For instance, a first C++ program is often as simple as this:
#include <iostream>
int main() {
std::cout << "Hello, World!";
return 0;
}
Seeing that simple message appear is the first step in a long and rewarding journey.
The Trap of "The Right Way"
When I was starting out, I became fixated on whether I was learning things "the right way." I looked up to accomplished programmers and thought their path was the only one to success. This mindset was counterproductive. I spent more time worrying about writing "magical bad code" that would permanently stunt my growth than I did actually programming.
The Power of Writing Bad Code
In retrospect, I would have benefited immensely from writing bad code more often. Discovering what constitutes "bad code" through hands-on experience would have saved me a lot of time and accelerated my learning. It’s through making mistakes that we truly understand the principles of good design and practice.
Ultimately, my journey worked out. There’s no end-of-the-world scenario in learning to program. If you are interested and think you might enjoy it, the best thing you can do is open your IDE of choice and write some code.