C++ is challenging because it requires managing memory, pointers, and other low-level details, making it harder to master compared to higher-level languages like Java or C#.
STL is crucial because it provides pre-built libraries for common tasks like creating lists and handling data structures, which are essential for real-world C++ programming.
To learn C++ effectively, contribute to open-source projects, build substantial applications, and use platforms like Topcoder to practice solving algorithm problems and understanding others' code.
Books like 'Effective C++' by Scott Meyer, 'More Effective C++', 'Effective STL', and 'Code Complete' are highly recommended for learning C++ and improving coding practices.
Contributing to open-source projects helps in understanding real-world codebases, fixing bugs, and adding features, which are essential skills for becoming a proficient C++ programmer.
The speaker believes that while C++ is still used, most new applications are developed in languages like Java, JavaScript, or C#. However, mastering C++ can make learning other languages easier.
Topcoder offers algorithm challenges where users solve problems using C++ and compete with others, providing an opportunity to learn from others' solutions and improve coding skills.
Welcome to the Simple Programmer Podcast. Making complex programming simple and fast. With everything from career advice to philosophy. It's the Simple Programmer Podcast.
Hey, John Sonmez from simpleprogrammer.com. I got another question that I was going to answer in this video today about learning C++. How do you learn C++? There's a little bit more to it than just that. This question is from Alberto and I'm going to paraphrase a bit here, summarize this because it's a little bit long. He said that he came across a post regarding whether or not C++ was making a comeback and he's got a simple thing to ask. How did I learn C++?
He basically says that he's been studying at a university to get his BS in computer science and he's been getting stumped on how to actually program in C++. He says the school doesn't offer too much. It focuses on learning the uses and how to create structures and functions on paper, which he's been getting through the course with, but he needs to learn how to actually program and can't find any help.
He's been told by TAs and some faculty members to look up tutorials instead of trying to teach them methods, which makes things harder because you can't look up a section of code and transfer it over because we actually have to define our own library functions based on STL. Basically, other people use STL. If you're familiar with C++, it's a template center, template library or language library.
It shortcuts a lot of things like creating lists and the kind of—what you would see in a lot of Java, .NET framework kind of library functions. He says, "So now I may be looking at this wrong, but in any case C++ is the only language we'll really use until we graduate and I cannot keep skimming by simply on the pen and paper portions of the courses. Is there any advice that you can offer?"
Okay, so Alberto, here's the deal. C++ is difficult.
Obviously, it's a language that I don't really recommend learning today as opposed to C# or Java or JavaScript, but your school is requiring you to learn it. It's not a bad language to learn because if you can do C++ you can program in any other programming language because everything is easier than C++. That should make you feel somewhat good because it's hard and that's why you're having trouble with it.
What I hear you describing is that you're basically learning some of the constructs of C++, how to solve algorithms and how to build structures, but you're not actually learning how to program in C++. You actually want to write an application.
This was something I struggled with for a long time, especially when I was learning C++ is I felt like I could create classes. Sure, I could do that. I can create a function for you if you want that reverses a string or whatever, but how would I actually write a real application using C++? Well, the good news is fortunately for you there
There's not a lot of real applications that you would start today that you would write it from a new application in C++. If you get a job doing C++ work, most likely you will be extending an existing application or supporting it. Some companies do create new applications in C++ today. I know I'm going to get a little bit of hate from that, but I'm just telling you majority and likely you'll be programming in Java, JavaScript, C Sharp unless you specifically are looking for C++.
Here's the thing, if you want to learn it and you want to learn to the degree of being able to build the applications, first of all, you do need to use the STL. When you see example code that's using STL, I know you can't implement it in your classroom, but real world usage,
People don't implement things themselves. They use STL. They use libraries. That's the most important skill. Recognize that that actually is important and that's not a shortcut. You're not really learning C++. That's the first thing. The second thing is you need to actually— What's up, guys? John Sonmez here from simpleprogrammer.com. I want to tell you about my free blogging course that you can sign up for at simpleprogrammer.com forward slash pblog.
Now, this free blogging course is going to tell you how to create a blog to boost your career. It's something that you definitely don't want to miss. Thousands of developers have already gone through the course, the free course that you're going to get by email, and have learned how to create a blog to boost your career, to make more money, and even to grow their own side business. It's something that every single developer should do, especially if you're a web developer. You should have your own blog. I'm going to show you exactly how to do it, how to be successful, how to get traffic,
everything that you need to know about creating a blog and even making money from it, just go to simpleprogrammer.com forward slash pblog to sign up now. Once again, it's simpleprogrammer.com forward slash pblog. Build something of substantial size or contribute to something. I wouldn't recommend just creating your own C++ app.
There are obviously frameworks that you could create a Windows app. Windows 8 supports it or you could create a Linux app or
There are a lot of different platforms. You can even program iPhone and Android using C++ although it's quite difficult. But you might be better served by looking on something like GitHub to see if you can find a C++ project that you can contribute to. Start by fixing bugs. That's what you'll do in the real world, trying to understand the code base.
and then adding some features. If that works out and you're feeling comfortable, then the next step would be to create your own application, to create something simple, maybe a very simple Windows application or Android. Just pick a platform, learn the tools for it. That's going to be the hardest part is getting set up for that application.
Then go through it, but here's the thing about learning C++ in general. It takes time and it's difficult and it's just going to be a matter of writing a lot of C++ code. One of the ways that I really learned C++ best is I use a site called Topcoder and they have all these kind of problems you have to solve and a competition interface if you want to do that. In Topcoder, you solve this algorithm problem and
Other people are competing to do that at the same time. There's a part where you solve these three different problems and you use STL or whatever and you try to solve it. Then after that you come to this round where you try to challenge other people's solutions. You give them bad inputs that will break their program. Well, you get to see their code when you do that. That kind of helped me to learn how other people were doing this that were really good at C++.
That really helped me. I just started doing Topcoder every single week or like twice a week for a while and that really brought my C++ skills up. But yeah, C++ is difficult language to learn. You're just going to have to write a lot of code. The more code that you write and the more code that is actually doing something useful. That's why I say contribute to some kind of open source project.
Start your own project and that's how you're really going to learn it. Yeah, it's a big thing. You need to learn STL as well because that's a real world thing. A couple of books I recommend, Effective C++ by Scott Meyer, that whole series. If you go through Effective C++ and more Effective C++ and I think he has Effective STL.
I used to love those books. Those are really great C++ books. Code Complete is another great book, not necessarily C++, but just in general structuring your code. Hopefully that helps you. Good luck with this.
Don't worry too much. You've got to think though if you're going to become a C++ programmer or not. If you're not, then don't worry too, too much about understanding C++ that much. But if you do master it, like I said, you'll be able to do any other programming language pretty easily because it's much easier once you can manage memory and pointers and all that in C++.
a lot of things become a lot easier. Don't worry. Don't get too overwhelmed. Other people do it. You'll do it just fine. You just got to keep on hitting it. Get your own projects going. Start writing a lot of C++ code and read some really good C++ books like the Effective C++ series. Well, that's it for this video. If you have any questions or comments, leave them below or send me an email and subscribe to the channel. Take care.