Why C++?
Hello, I know what you are thinking. Why is this post about C++ when all of the other posts have been about Go? Why has it taken so long to get a new post? It has been awhile and for that I apologize. I have been spending quite a bit of time on my job which has me learning and using C++ on a daily basis. Now I wasn’t always a huge fan of C++. To be honest I spent a lot of time trying to avoid the language. Not because I hated it, but because the language, in my eyes, was difficult.
Let me tell you a story about my first ever time learning how to program. Back in 2015 I realized that I wanted to learn how to program. I had spent some time as an IT techniciain and wanted to learn more about designing software. Specifically I wanted to learn video game development. I went on the hunt for some materials to learn just that. I found books, articles, YouTube tutorials etc. for content to learn video game development. During my journey I came across a course on Udemy that taught Unreal Engine and C++. Now this course was meant for someone like myself. Someone that had never built a game or even a program before. I was going to learn how to build games, I thought. I was going to learn C++ and Unreal Engine. After all the games I played the most at that time were built in Unreal Engine. It only made sense to learn the engine and the language that was used right? Wrong. C++ is a language that you could learn as your first language however it definitely would be better to start with another language. I would say JavaScript or even Go as they both have C like syntax that is similar to C++ and will help you along the way. But back to what I was saying. I was struggling to learn C++. The syntax was unfamiliar to me. I had no idea what the programming concepts were that this course was talking about. Although the course mentioned it was for beginners I was completely lost. I thought to myself that I would just keep going and things will evenutally make sense. Practice makes perfect. But I found myself struggling even more, trying to understand what the programming concepts were on top of remembering all the symbols and everything the language used for it’s syntax. I told myself that I would stop for now and learn another language and then try to come back to C++ when I could.
Well I would use C++ off and on for a few years. Learning game development with Blueprints and Unreal Engine and building out small console based applications with C++ to get a feel for the language. I am finally in a state where I enjoy using C++. It took a little bit of time but I really do think the language is worth learning. The rest of this post is going to explain why I am learning C++ and why, if you are in a similar predicament, you should too.
Building Games
The number one reason to learn C++ for me was to become a video game developer. I have now accomplished that goal. I work for a video game company and get to work on some amazing features for games. It has been amazing so far. I am only one month in, however I am loving every minute of it. Using Unreal Engine and C++ has been really great. I was intimidated at first because it’s a language that I didn’t really have much experience in using in previous jobs as I was mainly working in the web development world. In my spare time I have used Python, JavaScript, C# and Rust to build video games. With Python Pygame is a very popular game framework that allows you to make some very interesting 2D games. JavaScript has Three.js as well as Phaser to build both 3D and 2D games that run in the browser natively and then as a desktop application using something like Electron. C# of course uses Unity to build both 2D and 3D games as well. I know you are probably thinking, “That’s great Jon but why are you telling us about these other languages and engines when this post is supposed to be about C++?” Well I’m glad you asked. I went through plenty of tutorials and built quite a bit of differnt games in different languages and frameworks/engines but none of them felt as satisfying as building the games I have done in OpenGL and C++. There was just something really cool seeing my Timber Man clone working on my Surface Laptop at the time. I felt so accomplished. It felt amazing. I felt like a real game developer as I was using a language that most AAA companies used in game development. So yes you can make games in a variety of differnt game engines and languages but for me nothing felt more satisfying than when I was able to get a game working using nothing but C++ and OpenGL.
Database Development
Now I know this isn’t as glorious as video game development however knowing that you are able to build your own database with C++ that could maybe one day rival MySQL or SQL Server, two of the most popular relational databases used today, is actually kind of cool to think about. Maybe you are a small indie game development studio and SQL Server is too bulky for you and MySQL too clunky and you need feel that you need to develop a new relational database that will help you store inofrmation pertaining to your game or the user’s that will play it then you can with C++. Now there are a few other databases out there that were built with other languages and I am not trying to say that C++ is the best language for database development and you should use it and only it. Go is a great langauge and has been used to create the very popular CockroachDB, however if you did want to see what it would be like to create your own database there are a lot of tutorials out there that will help you develop one of your own using C++.
Compiler
This is another great piece of software that there are of course other languages out there that don’t use C++ as the compiler. Go is one of those langauges. Go’s compiler moved out of C++ and into well Go and became faster. So there’s that however if you did want to build your own programming language and use a compiler C++ is a great choice for that as well. You can find a few tutorials on it pretty easily for C++ as well.
Emulators
Emulators are great. They let you play old school games on your PC that you can’t find anymore. Not all of them run that great though and if you have run across some of them you might want to figure out how to build your own. C++ is going to be a very great choice for that as there are already a ton of resources and tutorials for you to use and you can of course branch off from there. I have seen some tutorials crop up involving Rust but there are definitely more of them for C++.
Operating System(OS)
If you aren’t a fan of Microsoft Windows, or you don’t want to pay the absurd price for an Apple computer, and you have never heard of Linux or you have and it scares you to no end, then you might be interested in creating your own Operating System so that you can have the features you like from Windows and Mac without the need to pay a hefty price point or use a device you aren’t that fond of.
Conclusion
At the end of the day there are a few reasons to choose C++ as your langauge of choice. I would recommend the language as a good starting language now with all the new standards that have come out making things a bit more simplified. However if you already know a language and are looking to learn a new one and looked at C++ but weren’t sure what you could really use the language for then I hope this post helps you better understand that with C++ the only thing holding you back from developing anything you want is the lack of C++ knowledge you might have.