How to REALLY learn C++

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey what's up guys my name is occiano and today i wanted to answer a question that i get asked very often what do i do next in my c-plus plus learning journey now this is a very common and fair question i've been teaching simple spots on youtube for quite a few years now i've also been teaching students one-on-one privately as well and they seem to get through all of this teaching content rather easily whether it be my videos whether it be cpus plus textbooks or even university courses they have no trouble learning the concepts from all of our content as well as even setting exams but what do you do next what do you do once you've been taught c plus so to speak how do you transition into actually being able to write c plus plus code freely and more or less speak c plus plus fluently if you may i'm going to sum this up in just a single phrase for you right here so it's really nice and simple open source projects you need to start looking at other people's code actual real world c plus code not examples in textbooks not the kind of homework that you get from the your university software engineering course no you need to start looking at actual projects in the real world i mean think about it when you're sitting there in a code interview and the person wants to hire you and you want to be hired what kind of code do they expect you to write examples on how to implement a vector or a list or something like that or actual real-world code that belongs inside their code base well of course they're going to want the latter they'll train you in the job don't get me wrong i'm sure you'll pick up a lot of stuff during your job you're not expected to know everything upon being hired but you need to understand how software is actually written and what real world code looks like now this is actually how i learn at the level that i'm at whatever level that is i like to read other people's code whenever there's some new concept or a new problem or a new technique or a new algorithm or just something that's new to me my favorite way of learning that is to actually look at existing code that's out there because i speak c or i speak programming if you will and so it's a lot easier for me to actually read about it natively in that language rather than hear someone actually want to describe a concept in english because that just doesn't make as much sense to me now for people who aren't quite sure what i'm saying here i like to compare this to real world languages assuming you know english maybe you're trying to learn a language like german or japanese or something like that i mean sure you'll sit down you'll do the course maybe you'll learn about it in university or in high school or something like that you know you've got grammar textbooks you've got little exercises and exams that you can write but you can't live off of that you can't learn the language fluently just off of that kind of material you need to actually start consuming media such as like watching tv shows movies stuff like that in the language that you want to learn maybe even change your phone over into that language so that you're forced to actually learn about all these new words that might have have stuff to do with phones specifically or other media you have to immerse yourself in that world and in fact moving to the country whose language you're trying to learn so moving to like germany or something like that will help you a lot more it stops being about being taught that specific language and it starts being more about being in that environment right and it's the same thing with c plus you don't need someone to teach you c plus after a while once you've learned the basics once you've learned certain things i mean sure you can come back and you can keep learning more about it but after a certain point you need to actually start using c plus plus and actually immerse yourself in a world of c-plus plus you know like work somewhere where they're using c plus plus or if you don't have a job then maybe start looking at open source projects as i mentioned and start contributing to them because if you immerse yourself in the language that you're trying to learn and actually start using it as if you already know the language forcing yourself to actually learn more about it then you're going to do a lot better so what projects should you start looking at well my advice is always to start looking at something that interests you so if you're really into games maybe look for some open source game projects on github something maybe simple like mario to start off with or any arcade games from the 80s they're really good places to start but then you can gradually build that as well maybe you're interested in game engines well take a look at unreal engine or go dot engine or even my engine hazel and if none of that stuff interests you maybe you're interested in actually helping the world in your quest to immerse yourself more in c plus why not check out one of the bug bounty programs these basically pay you money to try and find problems or issues or bugs inside c plus plus code but what stage do i need to be to dive into this kind of stuff now this varies from person to person because i know a lot of people get overwhelmed looking at actual real world projects if it's a little bit too early but i would say don't worry about it just check it out anyway it's usually not gonna do any harm i mean think of it like moving to japan without speaking much japanese you're going to pick it up if you live there that's in fact probably the best way to pick it up now personally i love using a tool called pbs studio who are also the sponsors of this video while i'm looking through all of these massive projects pbs studio is a static analyzer which is going to help point out problems in source code i mean seriously having pbs studio open while i'm looking through this kind of new foreign source code that i've never seen before is a really informative experience because it points out areas that first of all i would never just detect or pick up on but also looking at serious projects even struggling with errors and seeing what they did wrong can actually help improve your code by quite a bit let's take a look at an example project we'll take a look at opencv it's an optical recognition framework that's pretty popular for trying to recognize objects or text from images first let's quickly obtain it and actually build it on our computer so we'll clone it from github and then run cmake to generate our visual studio project files and then finally we can open it and actually give it a build as well as check out what pbs studio has to say about its code base because this is such a huge code base i personally like to just check the current file for errors so we'll find a file that we are interested in and just scan through to see if pvs studio finds any issues with it and as you can see there are plenty now some of these of course aren't huge deals i love the fact that pbs studio actually triages them so we've got these red ones as like really the ones you probably want to take a look at first and take a look at this macro issue here for example pbs studio tells us that this if statement is not necessary if we take a look at it we can see that the macro itself actually includes an if statement so having two if statements two branches like that is totally unnecessary learning from this we now know that it's just something to keep in the back of our minds if you're writing a macro that has an if statement make sure you're not also checking for the condition outside of the macro because the macro takes care of it all of these little things here and there add up to just having more experience in c plus and that's something that's incredibly beneficial to both your own programming as well as to someone potentially hiring you so long story short immerse yourselves in as many c plus plus projects as you can if you want to actually pick up real world c plus plus a lot faster i think it's the perfect next step once you know the basics of the language you know how things work you at least know how to build a project you'll get to see more than just c plus plus code as well and how it's written you'll see how projects actually come together how the build system works why they might be using something like cmake and not just visual studio itself there's so much to learn from experiencing real world projects so definitely check it out now as i mentioned pbs studio is a fantastic companion to have along with you for this journey i'll leave a link in the description below where you can check out a free trial of pbs studio and try it out for free for yourselves i think it's definitely a really useful tool to have and i mean you might as well try it out for free i'll also leave a link to some more information about the bug bounty program and how pbs studio can actually help you out with that as well it's a really interesting read definitely take a look at that in the description below anyway i hope you guys enjoyed this video if you did please don't forget to hit that like button below if you go on to try out some of these open source projects then please let me know how you go and if that helps you out and i will see you next time goodbye [Music] you
Info
Channel: The Cherno
Views: 113,994
Rating: 4.9508219 out of 5
Keywords: thecherno, thechernoproject, cherno, c++, programming, gamedev, game development, learn c++, c++ tutorial, How to REALLY learn C++, pvs-studio, pvs studio, how to learn c++, learn programming fast, efficient learning, effective studying, help
Id: _zQqN5OYCCM
Channel Id: undefined
Length: 8min 12sec (492 seconds)
Published: Wed Sep 23 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.