How to REALLY learn C++
Vložit
- čas přidán 6. 08. 2024
- Download PVS-Studio ► www.viva64.com/pvs-download-c...
Enter promo code #chernikov in the message field to get a 30 day free trial instead of 7
An Easy Way to Make Money on Bug Bounty (article) ► www.viva64.com/en/b/0660/?pro...
Patreon ► / thecherno
Instagram ► / thecherno
Twitter ► / thecherno
Discord ► thecherno.com/discord
This video is sponsored by PVS-Studio
It's easy, code, fail, stack overflow - repeat. Remember to keep code/failing and learn to like it. We never stop code/failing, it's called learning.
you can't code if you can't learn tho
@@AlexandrBorschchev you learn through coding. You wont learn if you sit down and read a book about coding.
what do you mean by stack overflow?
@@Foodran It's a site where you can post coding questions and read answers on questions other people asked. It's pretty much always going to be the top few results of any coding question you put to Google.
what if u dont know what to code
Man I didn’t know Ed Sheeran knew C++
He is similar to Mr beast.
:)))))))
More like Chernobyl mutated ed sheeren
If ed sheeran and mr. Beast had a child
🤣🤣
"If you want to be a writer, you must do two things above all others: read a lot and write a lot." Stephen King
I wanna be a writer
The answer is the same as it's always been in programming: find something you want to build but currently have no idea how, build it, then find another project that's different enough to push your skills more.
in a nutshell: Use С++, don't just learn it
Ronald Alexander you code
@Ronald Alexander You ask a stupid question, you get a stupid answer.
Avoid C++
It is the worst designed language to ever be invented that wasn't done so deliberately as a joke.
RPM GFX i was just going to write this lol
@@____uncompetative what?
This is amazing advice! I've been doing this subconsciously for other languages and always wondered why my skill in them overtook the first language I ever learnt. I'm definitely doing this for C++
Your advice is actually on spot, a lot of beginner programmers (including me) struggle with what to do next after learning a language and frankly no one ever feels to even address this problem. Great Content, Great tutor keep it up The Cherno !
my phone doesn't have an option for displaying language "C++"
haha it reminds me of a Tinder screenshot where you could set C++ as a language you speak. 100% success guaranteed!!
There are phone code editors to view c++ code
If you want to read source code (just text) on your smartphone just rename the file and modify the extension to txt or something that can be opened by your phone
"some_code.cpp" --> "some_code.cpp.txt"
Lol you can use online c++ compilers loads of then not sure an app exists
You guys are soo stupid. He means he cant change his phones language to c++ like he said in the intro with the german example
Alternative title: How to learn basically anything
Awesome! I was in the middle of watching your c++ series and you uploaded this while I was watching it. I have wanted to apply my c++ skills outside of the text book, but found it frustrating because I never knew where to start. Thank you!
How is it going so far ?
@Isaac L really bad
Dude, you are the best programming content creator I've ever watched on CZcams. Keep up the awesome work!
What was your project
@@ktarunreddy7882 unreal engine 4
I have to agree. Certainly the best beginner/intermediate programmer learning channel on CZcams.
@Kael Hanaman Dani is more entertaining, Cherno is the best teacher
I'd say cherno and chilitomatoenoodle
Thank you man, I have been struggling with this for quite a while now. It's good to know what my next step should be.
This might be just the thing I wanted to hear Today to get me motivated and have a new approach to learning C++ and Java. Thank you :)
something that helped me was just doing it. I just went all in and did something way out of my league and learned a lot.
What did you do?
Can agree, made a game engine, better coder now.
K, I know I made that look meme-y, but like actually I did it, and it was very not planned out, and so much spaghetti code, and oh god I need to refactor again it's only been a year since the last refactor send help pls
Would you mind sharing what you got involved in?
@@arianheight750 how do you even start with something like that?
@@sangramjitchakraborty7845 by looking up what others did to solve the same problem. Each time you do that, you try to both optimize the process and start thinking "is that really the best way to solve this?"
Started from not being able to understand what a server is, to writing APIs and web services for banks.
This is the first time you've come up in my feed since your old game dev tutorials. Glad you're looking healthy. Thanks for the videos.
I was watching your older videos to revise some basics of C++, you've put on some weight.
you're the best, please keep the videos coming!!
Maybe I’m biased because C++ was the first language I learned but...
I feel like C++ is one of a rare OG language that you can “read” as a language... it focuses on programming through explicitly governing the logical operations within the computer. I can look at a C++ file and understand exactly what logic the computer is being programmed to perform. It’s verbose but it’s precise.
what other languages are you comparing c++ to? In higher languages, the logic is much more clearer as it hides more unimportant implementation details. The c++ language tells you nothing about how the electric signals are moving in cpu during execution and you probably do not care about such details. Python vs C++ is basically the same thing only at different level of abstraction. It is only your preference which level of abstraction you deem "precise" communication. At the end, the only precise language (to the best of out knowledge) which could tell you what the computer is really doing would be in terms of quantum field theory. And that would be infeasable, not to mention completely idiotic.
@@michalmaixner3318 I didn’t compare C++ to any language specifically.
And you’re reading too much into it, no one said anything about electrical signals. Read again, I said about the logical operations that the computer’s assumed to be doing... which is right above Assembly’s abstraction level. It’s the lowest you can be while maintaining a fair amount of confidence, given you know C++.
Python is waaay above, even above JAVA... to the point where it’s basically pseudo code, where it tells you what the programmer wants to do. Not what’s happening in the logical realm (not electronic).
So this isn’t subjective preference, it’s pretty objective that when working on code... you wanna know what’s happening in the computer realm not what the programmer wants to happen, hence lower abstraction of C++ is more preferable
@@alphamineron
sorry, i read the sentence
"I can look at a C++ file and understand exactly what logic the computer is being programmed to perform."
and thought you are actually talking about logic, instead it seems you are talking only about instructions.
I do not know why do you care about them so much though. Important thing is first and foremost the logic, implementation comes only as a second and only once efficiency of the implementation is not sufficient for your needs. The logic itself is best described in higher level languages and most programs are implemented sufficiently enough. So unless you are working on resource-heavy software, the instruction level is just useless burden.
@@michalmaixner3318 True instruction level that you talk of would be Assembly.
C++ is at the optimal balance between abstraction level and overall code readability.
The differences i mentioned in the prior comment is important because it makes debugging code much easier and improves the quality of the codebase without seeking online help which is a bad practice when abused by inexperienced devs who simply “copy paste” high level code which simply just works and it’s also unreliable in the long run.
Back to your comment, After using “logic” for electronic logic as it seems from your last comment... you are switching to “logic” as in, human logic? By saying that high level language show that best...? I don’t see what’s your point is...
By the way, you can follow those instructions and get an understanding of what’s happening under the hood. When you have all the pieces of the picture, it’s easy to pull back and look at the whole picture. It’s definitely challenging though, and other constraints make it unfeasible which is kinda obvious why everything isn’t coded in one language... each have their roles
Simply put, high level is like buying one of those ready-to-bake cake packets, where you just add a bit of ingredients like eggs and stuff and you get your cake.
Low level is like buying all the ingredients and making the cake yourself.
@@alphamineron I started by saying "In higher languages, the logic is much more clearer as it hides more unimportant implementation details", meaning I was always talking about logic as logic. And then went on (unsuccessfully) trying to explain that implementation of the logic can be described in many levels of abstraction and C++ is just at one of those levels. And which level you pick as the "holy" one is just your preference (or nature of your work). By itself, it is no more special than any other abstraction level. Objectively there are only two really special ones - quantum field theory being at the bottom, pure math being at the top. Everything in between is distinguished only by your practical needs and this sentence "C++ is at the optimal balance between abstraction level and overall code readability." cannot stand on its own. Might be true for your line of work, but in general it is BS.
In simpler terms, you have to actually USE it to become fluent with it. I got through my OOP class at my university without too much problem, but I didn't come out of there actually knowing how to program. I learned that a semester or two later when I actually had to design and implement my own systems and class hierarchy for a project.
The one piece of advice no one ever gave me, I had to discover it on my own. The only advice I would ever receive from people is: start coding, it's the only way to learn a programming language. And I would simply find myself asking myself, how do I f*** do that! In any case, the point being made is that only when I began reading real life source code did I truly transition from simply knowing the syntax of a programming language to actually using the language. This is good advice.
I was looking for something like that and CZcams recommended this precious information. Thank you for help our dev community evaluates!
this advice of looking at other people's codes was so needed!!!! i wanted to see more of the language but didn't now how or where. thankssss
Rather than starting with Hello World, I started learning C++ by jumping into open source stuff, before I even knew how to code it. I chose open source games and simulators that I actually played/used. It's easy to decipher and learn code when you know how the end product works. Then it was just a matter of adding the syntax. Functions are functions, variables are variables. Jumping into the deep end revealed how much I could figure out on my own, and what I needed to look up and learn more about. Starting with the basics doesn't challenge you to learn, it only teaches you to recite progressively complex code. Cheers!
how much C++ have u learnt?, Like is percentage from 0-100%
i have learnt as of now like 55.7% of C++.
@@TheSpekeyMan You know more than me. But I'm just learning to learn so I don't care how long it takes lol
The book" Ultra learning" by scott young. This guy completed the whole mit computer science degree in a year.math programming everything on his own. The book is amazing and has helped me tremendously. He has also used his technique to learn to speak fluent in other language's in a matter of months.
Went into C# knowing nothing on a friday and then spent the whole weekend (objectively was supposed to be C++ but didnt turn out so) to work on a "launcher" that i've wanted to make for some time, incredibly hard as i knew nothing what arguments i were supposed to use and what not.
I took up a incredibly challenging task and ended up doing what i wanted to do and i ended up learning a big portion of C#.
It all leans to doing something you find interesting thats challenging at the same time, best way to learn and then being in a small chat with a few people who love to just code stuff where we talk about coding and add ideas to what we could do better or how u could code it easier.
By far best way of learning for me. Obviously if i were to go into basics it would be far more easier and it would save me time and would be the way to go. But thats the fun part
TLDR work on something u want to do and find people u can talk about coding who's also encaustic
I think I have an invisible Cherno fairy by my side. This is exactly what I was wondering nowadays after watched your 90+ C++ tutorials! Thank you so much!
This is truly an underrated channel. Finding it makes me feel fortunate.
Keep up creating great learning content! If someone is really interested in a topic, they will learn through daily practice. In the end, this is the only way. Nobody CAN TEACH you anything, but you CAN LEARN from all possible sources.
So, it definitely helps having an experienced professional C++ developer friend nearby.
I just passed my C++ exam with a very good result! Thank you for this great series :)
I really don’t understand when many people say “do projects, something simple like a Mario game.” I feel this type of advice is more for people who have a almost intermediate knowledge in c++. You can’t expect someone who knows nothing about c++ or programming in general to know exactly where to start just by doing projects. If I do a project like that to learn, I’ll feel as if I’m just copying and pasting and not really learning anything that way and wasting a lot of time.
I’m not sure. This is coming from someone who has no clue where to start and only has the most basic stuff down on c++.
Having a project is motivating and even though you copy a lot, you also adapt a lot of code and things slowly sink in. You will feel a bit more comfortable on your second project and so on
That's because this video is for people, who have some knowledge.
Instead of mindlessly copying you should copy thoughtfully. Meaning that not only you just copy someone's solution and change names, but you try to figure out why something's done the way it is done. And if you cant' figure something out - try to break it into pieces and google each piece.
That's a generic approach that works almost everywhere. You learn music by playing others' songs before you can actually write your own album. But as soon as you can play, say, Teen Spirit - you may try to write «your own» Nirvana riff. As soon as you copied some cool looking girl from a comic book cover - you can try to draw something similar.
You also first learn real language by just trying to mimic whatever you hear from parents/relatives/tv/radio etc, but very soon you find out how to ask for food or a toy for example.
He still continuing this series after 3 years
Thanx
Thank you, needed this
I think we need an objective when learning programming...
I first touched c++ when i was 13, but i don't knew what to do with it on my life activities (i regret not continuing, anyway, i learned other things)...
After i began to mess with music, i learned that "music is math", so i decided to learn programming, and when i was learning i really WANTED to do music out of it...
That is when it really began to flow from me... When you have an objective in your mind, that your really really want, YOU DO IT!
Don't just program for the "sake of it", program because you WANT IT... Then, chasing your dreams will naturally make you find solutions to your problems... And it being a dream, it is something you won't surrender (at least, that is what i hope from you)...
Leaving your comfort zone is the hardest thing to do. This applies not only to learning.
That's a really good advice. At one point I thought I could write a small fluid simulation in C++ ... and then I saw OpenFOAM and how crazy the code was. Due to my studies I went towards Python and didn't have time to come back to C++ , but it definitely was a humbling experience.
What programming language is better in computational physics or math python or c++?
Great job! I learned a lot from your videos. Thanks!
I already have learned the basics and can read the fundamentals of any code I see, though when adding things such as other libraries and going past iostream and cmath, I didn’t have a clue, thanks for the advice and I will be sure to try it to expand my knowledge more into the field of c++ I want to take a closer look into!
hi bro i have exposure to cpp to decent extent i can write functions and basic stuff should i focus more on learning a bit more advance concepts and logic building or learn different libraries ?
I needed to hear this. Thank you!
What tips do you have when first looking at a new Open Source project that you're unfamiliar with? Should we start by reading the docs / wiki? Open issues? Dependencies? Preprocessor statements? Main function?
What's your general approach to familiarizing yourself with a new code base?
I would not focus on preprocessor commands or using any outside libraries and dependencies until you learn the core language libraries and functionality. In my opinion becoming a good programmer means knowing how to reinvent the wheel so you don't have to rely on other people libraries and code as a crutch. It is good to know how to read other people code, but my experience with C/C++ has been easy despite what people say about it, it's actually easier than python was for me. If you never programmed anything in your life don't start with Python because it's supposed to be easy, do whichever language that is easiest for you to start off with and gravitate towards harder ones. If you know how to program in C/C++ than any other programming language won't be far out of your reach to learn since the concepts with repeat.
this makes Soo much sense. i am almost ashamed i didnt think of doing this. thanks for bringing up this topic
Thanks Cherno, You' re the best at giving examples
You helped a lot! Thanks man
Cherno : "whtever level tht is"
Me : Legendary
Professional or industry level
*God
Cherno VS John Carmack :-)
Great video! I love how you related natural languages (German, Japanese) to programming. Really cool.
Hi, Cherno! I really love your videos, they are great.
I would really love to see video about copy elision and NRVO. Those thing can really mess up with understanding of your code if you haven't heard about them.
Cheers.
New viewer here! This video instantly gave me lots of hope. You earned yourself a subscriber.
"you are not expected to know everything upon being hired" - oh boy
thanks it really helped widen my perspective
now i might be able to learn cpp in a better way
i m starting today with first lecture (as a beginner)
wish me luck!!
I’m learning Python and this is an amazing advice. Thanks
All your videos are good and helpful but this is one of the most important ones.🎉 Thank you for this.
The most important video you've ever made. Well done!
Cherno, Can you do a video on the Stringizing operator (for the preprocessor), or a more in depth look at preprocessor statements?
A great video, I think. Uh as a c plus plus beginner, I didn't know how to learn C plus plus before watching your video. But now I understand how to learn C plus plus in a better way. Thank you.
Very informative video. Thanks!!
first time visiting the channel and found my solution . again wanna say thanks. keep doing the good work bro... :) _____________from Bangladesh
Thanks a lot you are always inspiring me to keep on with C++
I do have a decent exposure to C++ so far and actually really enjoy the language, even though at times some of its concepts are obscure and there are too many! I got involved in an open-source project a few years back and got to a level where I am now struggling with speed issues so, naturally, the next frontier I wanted to explore was GPU programming with C++ Cuda. However, I find the learning curve still quite steep from classic c++ to Cuda, and it is frustrating to me. Any suggestions? thank you!
Such a nice piece of advice dude. have always been learning that way too. Immersion is a key to learn anything.
Thanks friend, very useful advices!
Really awesome and motivating video, thanks!
Would you mind telling me about the song in the background? Can it be found or is it a private piece? :)
Thank you, you helped me a lot, finally I find out the right path of my journey.
that was so beautifully explained!
Great advice, no matter what language you're interested in.
Too many people descend into tutorial/courses purgatory and
never make it out.
I'm not c++ dev I only code python and at a really novice level but IMO a good way to improve at coding or learning things in general is to learn through personal projects which really motivates you !
I 1st learned python during my IT technician course and I was a total trash at it because it was explained through mathematical / algorithmical concepts and it honestly was boring / felt hard to learn.
then ...
a few years after I needed to upgrade some python coded 3d modeling software's plugins of one of my favorite games of my childhood.
I then took the scripts and relearn python through upgrading those tools and managed to upgrade the whole shit and make it display something on screen.
This made me learn A REAL LOT of things about Python programming / hexadecimal files formatting / reverse engineering / 3d models concepts such as vertex positions vertex textcoords ...etc
and I'd say python is probably my favorite programming (scripting :) ) language today !
Learn through your own projects ! You'll get more motivation / self reward by doing so
Yes same here, used my interest in football to create a football scores quiz using python/flask and a json file of football results for an entire premiership year, learned a lot.
Really helpful and inspiring videos.
_Summary_
- Open source contributions
- Bug bounty
- pvs studio for finding errors/bugs in the open source code
Old follower here (before your C++ series started).. when I first started programming I wanted to dive into C++ and build my own physics engine. Yeah... maybe a wee bit too ambitious!
I ended up going into web development instead because it's a lower barrier to entry (Much easier to learn and much faster to start getting paid for).
Anyway, I still learned a tremendous amount from your C++ series, and it made learning Web Development/Other languages WAY easier, and I'm eternally grateful.
Second point is, I will hopefully soon be getting back into the C++ game soon.. and watching this brought back so many awesome memories. Your content is simply priceless. Such clear explanations and great emphasis on what really matters when it comes to programming. You're definitely one of the best programming educators out there.
Thank you so much! I'll be sure to become a Patron ASAP!
P.S. I'm extremely proud of what you've done with your youtube channel beginning with the start your C++ series. It's really impressive/inspiring!!!
If you hang around the barber shop long enough, sooner or later, you are going to get a hair cut.
this makes no sense
@@dionyzus2909 maybe if haircut is included in his funeral package
@@vytasffbismarck7001 I just realized it probably was a joke about his hair size. I was overthinking the comment as if related to C++ learning lol
Its sounds so technically! Thank🙏🙏 cherno
Would it be possible to have a video on socket programming / networking in C++ in the future?
Superb, just like always.
Very much needed video.
Thanks a lot, really helpful.
Which program of programming should I learn after c++?
For me, it makes sense to do what he said but later. First, learn some data structures. Then learn the abstract data types that the structures are suppose to be, implementations off of ADTs. Find out why each implementation is chosen. Then move on to learn different paradigms. I've learned Object Oriented programming first and now I'm studying functional programming. Next up is concurrency and parallelism that functional programming excels at. Then move on to procedural programming with data bases. Boom, I have all of my go to tools for my skill set. Now it's time to for open source projects along with some of my projects. This with some free lance jobs, you'll be right on track for a proper career change.
C++ projects spans a wide range of categories, can u guide us which should I specifically look for, game engine? Embedded ? Drivers?
The Cherno is such a good resource to anyone on the coding journey, so much valuable information
great video!
Just transferred to a school where I have to lean C++ and I have 5 hours a week. All of my classmates have been doing this for 2 years or more already and I feel so behind because I am. Just found this channel and you seem like a good teacher, hope this will help me become better at it.
How are things going dude ? Hope you're doing okay
How did things turn out?
This is good man. Thanks
Trying to learn both C++ and English watching your videos, thank you
Great tip, thanks!
Good video! One tip: can you lower the background music volume a little?
we love you cherno
right now im study your c++ series but i really curies about cmake i see it alot did you create video for it or not yet
This is super informative.
Today, actually, I've done a small homework for a class at uni, no big deal, but it was about litterly googling a sorting algorithm and then writing it in pseudocode, extremely basic stuff right, but the site I found it on I didn't understand the written description at all, but then I read the c++ code and was like "ohh, that's it? Ok that makes sense"... on the class itself tho, we're supposed to start learning c and c++ in a few weeks so that's exciting... will have to go watch some tutorials tho so I could go to those classes like ducks through water haha
And finally here I am at the end of the course. Well i know there is a new video with binary operators ¡great!. I think it's been the first time in my life that i've ended a youtube course completely!!! From now on the journey is on my own. Thank you "The Cherno" but this is probably the best course on internet.
Thank you man!
Hey Cherno, how about making some serious in-depth series about C++11/14 ? That would be great ! :)
I just started diving into ROS Nav2, which is used for robot navigation. I am going really really slow. But I am glad that Cherno approves of this method.
Can you suggest opensource projects for beginners?
How to get in the repo and understand the base lines to contribute?
Thanks in advance.
Hey man I know you play guitar so I thought maybe you could do like a mini series or something about coding with juce framework for audio plugins? Its something a bit different from what you usually do but if you are interested I think it can be cool
Very useful guideline
I have become over the years a professional c# coder and I never EVER needed to be "Tough how" so to say I was only set off with the basics. These are like variables classes... but. After that I was left pretty much alone in the topic. As it turns out it is only ever going to benefit you coding if the first programming language you do you are really only nudged along but defiantly not though. There is a much more of a beauty to it because your mind feels more compelled to do it if you set off on mini projects. It takes away the stress of it being homework or you must do it. If you can' t keep this constant interest up then coding is not for you. Though after a while it becomes addicting. I personally started on a calculator. Now lets talk about why would these tutorials actually help. It is because if you seen one language you seen it all. After you are in that coder mindset It is just learning the syntax and a little more depending on the langue but with one of these 4 hour courses after your first language these are worth it to learn one in whole. So to sum up the title above says it all "really learn c++".
Thank you for this!!! More C++ tips please! lol
Any chance you could do a video on C++17(or20) vs older versions and why one might want to stick to the latest?
Thanks
you are my mentor sir!!!! Not my boring professor's
I really like the part where you said to immerse yourself into the language. I'm trying to learn spanish and I changed all me devices over to spanish a week ago
Will learning a language like SDL or Opengl be a match for the game engines of today? Wonder if its worth the effort.
I'm still somewhat new to programming. Is there a good centralized website where you can find a lot of source codes?