LEARNING C++ with Java/C#/Python Experience // Code Review

  Рет қаралды 145,554

The Cherno

The Cherno

Күн бұрын

The first 1,000 people to use this link will get a 1 month free trial of Skillshare: skl.sh/thecherno10211
Patreon ► / thecherno
Instagram ► / thecherno
Twitter ► / thecherno
Discord ► / discord
InkBall Code ► github.com/bclehmann/InkBall
Send an email to chernoreview@gmail.com with your source code, a brief explanation, and what you need help with/want me to review and you could be in the next episode of my Code Review series! Also let me know if you would like to remain anonymous.
This video is sponsored by Skillshare.
Chapters:
----------------
0:00 Today's Project
7:38 How to use Git Submodules
10:30 Compiler-specific Errors
14:15 Running the game
16:48 General program architecture
17:50 Binary deserialization
25:45 Debugging memory leaks
29:10 Caching resources better
32:47 Passing objects by value/reference into functions
39:50 Fixing game freezing during mouse move
43:05 Additional notes
45:05 Deleters and SDL lifetimes
46:28 Conclusion
#CodeReview

Пікірлер: 290
@TheCherno
@TheCherno 2 жыл бұрын
Hey all, hope you enjoyed the video! Another long one today, so I've filled it with chapters to make it easier to navigate. ❤️ Also don't forget that the first 1,000 people to use this link will get a 1 month free trial of Skillshare: skl.sh/thecherno10211
@RawFish2DChannel
@RawFish2DChannel 2 жыл бұрын
Are you making code review for projects on Java or other languages?
@erionan
@erionan 2 жыл бұрын
Hi cherno. Is it too late to leran C++ at age 32 and get a job?
@aqua_coder
@aqua_coder Жыл бұрын
@@erionan It is never too late to do anything
@ZettaiKatsu2013
@ZettaiKatsu2013 25 күн бұрын
​@@erionanno it is not.
@marcspecter
@marcspecter 2 жыл бұрын
Rest assured, code review videos are MOST interesting and best way to learn. The clash of minds between the coder and reviewer is incredibly insightful. I would watch any long deep dive code review you chose to do.
@kuroodo_
@kuroodo_ 2 жыл бұрын
I don't even use C++ but I still find these videos to be super valuable and helpful tbh.
@knishkrinkle6485
@knishkrinkle6485 2 жыл бұрын
I 100% agree. These videos are the reason I started to get a away from OOP a little bit and started HTML, CSS, and JavaScript.
@olivander5171
@olivander5171 2 жыл бұрын
agreed
@enshk79
@enshk79 2 жыл бұрын
I can’t even code hello world and I love these videos
@nobytes2
@nobytes2 2 жыл бұрын
I literally learn tons in this reviews. Also one question you mention don't use exceptions, can you explain how would you handle it instead?
@Clover4568
@Clover4568 2 жыл бұрын
Just stumbled on this video by mistake, and I was really blown away by the amount of effort you put into this code review series. I've actually been coding C++ professionally for a few years, and your notes were insightful and spot-on. The only thing I felt that was missing was mentioning best C++ design practices such RAII and better resource management in general. Looking forward to see more of your videos! :)
@lionkor98
@lionkor98 2 жыл бұрын
I'm an experienced C++ developer, I've been using it professionally for a few years, and I really, *really* enjoy these videos. They're relaxing, they're fun, they feel like listening to a coworker and I agree with most of what you say, so it's quite fun to go "oh, does that also bother him? let's see". I love the in-depth stuff, just as much as the not-so-deep stuff, so do whatever you enjoy, please.
@SkySentry7
@SkySentry7 2 жыл бұрын
Bro I don't know anything I have learned the basics of almost 4 languages .... Java , C, C++, C# (didn't enter univ yet)... but maaan are you self taught or have you finished computer science. Can someone know to this extent by being self taught... i really need advice bro lion
@mordofable
@mordofable 2 жыл бұрын
@@SkySentry7 Yes, you can learn most things self taught with enough digging. I'm completely self taught, roughly 15 years writing javascript (majority regular web stuff, but have written a bunch of webgl projects. made a gameboy color emulator in javascript lol). moved over to game dev in the last couple years and learning c++ and c# as I go. my career has been entirely based on development that has come from self taught knowledge, though later working with groups of people - some of my knowledge is acquired through interaction with others though I wouldn't say a significant amount. The big thing for me is regularly challenging myself with different projects. I think of a type of task/program/game etc that will require something I don't know how to do yet, and set out to make it. I also try and pay attention to how others write their code to find good practices and patterns. Find chat rooms (discord etc) where people are regularly asking questions about the language you're interested in. Stick around, ask questions, interact with people. Some of the projects I did to help learn came just from those conversations (e.g. I wrote an R tree library in javascript because a conversation came up about how to handle many 2d objects quickly).
@SkySentry7
@SkySentry7 2 жыл бұрын
@@mordofable Thank you so much Bro... U helped me a lot just because of this reply. Ow and yeah I think I'm getting a hang of C++ and some nifty data structures... now I'm stuck in Dijkstras Shortest Path Algorithm...I will be on it the whole day. Like you said I will try and find discord communities and help eachother out. Peace!
@tratbagd4500
@tratbagd4500 2 жыл бұрын
@@SkySentry7 being self taught doesn't mean you shouldn't also get a proper education in CS. CS != Programming, and if you can get into a decent and good school, you'll learn a lot of things which you'll probably miss if you rely on the self taught route. So do both.
@SkySentry7
@SkySentry7 2 жыл бұрын
@@tratbagd4500 Ofc bro This will be my first year to university; will start after a month or so. I'm gonna learn either Software Engineering or Computer Science(Which do u suggest)..... and wish me luck! Thnx
@mr.anderson5077
@mr.anderson5077 2 жыл бұрын
Cherno, great job as always. please continue teaching the c++ series on different vivid topics we are yet to cover. Thank you sensei!!!
@koungmeng
@koungmeng 2 жыл бұрын
For me, I think you should go more in-depth than this. Like maybe explore the game's logic, control, collision detection, loading resources, and stuff. Overall, this is a great video. Hope you are doing more of these code review.
@yearswriter
@yearswriter 2 жыл бұрын
Agree, as long as he is personally interested in explaining things, it is worth watching. If it is just not that interesting to explain (for cherno) than I understand why he speeds up through some things sometims though.
@doomfsea
@doomfsea 2 жыл бұрын
It would be a great series that focus on reviewing classic open source game engines. Especially the more concurrent ones like the Source engine, Doom 3 engine etc. Everyone says it's best to learn from real life code projects but almost none review them in video format similar to this series.
@elturco9573
@elturco9573 2 жыл бұрын
Innecesary. The game logic is irrelevant
@netoskin
@netoskin 2 жыл бұрын
@@elturco9573 I agree is less about the game itself, is about the Quality and portability of the code, learning about good practices that are useful in any project
@iXmerof
@iXmerof 2 жыл бұрын
I definitely agree, please don't go the fast way as there's already a ton of yt videos like that, giving really not that much value. Please split the review if you feel comfortable with as bugfixing, game logic, game physics/math, patterns and tricks etc. or make separate videos in bigger, universal topics like deserialization and by that I believe we''ll get the best value from them, what do you think? 1 hour for a review video is fine.
@cazino4
@cazino4 2 жыл бұрын
Your Intuition is usually spot on when it comes to detecting errors, memory leaks etc.. which is, no doubt, down to your extensive experience. An entertaining watch as ever...
@edu_rinaldi
@edu_rinaldi 2 жыл бұрын
Can you make a (mini) series on how to setup a C/C++ project using Cmake ? Thank you!
@DJenriqez
@DJenriqez 2 жыл бұрын
mainly linking another libraries because in this field im always lost
@msx47_
@msx47_ 2 жыл бұрын
@@DJenriqez he has made them in the past. check the c++ series and the opengl series
@jaredw43
@jaredw43 2 жыл бұрын
10/10 would love to see more videos like this, and appreciate however deep you dive into something. I'm a Python developer working on learning C++ now,
@DJenriqez
@DJenriqez 2 жыл бұрын
Nice video could be about integrating c++ to other languages (and vice versa), for example binding c++ in pybind, or calling java from c++ , calling c++ from java , integrating lua / javascript to c++ code, so many options.
@szaszm_
@szaszm_ 2 жыл бұрын
11:30 Yes, designated initializers have been available as a GCC extension since forever, and they were standardized in C++20. 19:15 I think fopen is in text mode by default. It just converts CRLF to LF on Windows, but it's the same as binary mode on unixes. 19:40 I would mention std::byte there. It's relatively new as a C++17 addition, but it's meant to model raw bytes without accidentally also modeling integers and characters.
@benjaminclehmann
@benjaminclehmann 2 жыл бұрын
First of all, sorry about the build difficulties, I was aware of git submodules but for whatever reason I didn't think to use them here. As for the gcc specific stuff, I had no idea that typeof was a compiler extension. I was aware of decltype but I thought that was just for lambdas where you can't specify the type any other way. I had never had such poor performance, I got in excess of 1000 FPS last time I ran the game whether the mouse was moving or not. Glad it was a simple fix at least. As for the memory leak, yeah, that's embarrassing, I had been pretty diligent about using smart pointers until I got to fonts and then the apathy kinda kicked in :/ I thought that the STL collections were all resource handles, so passing them by value was fine as it doesn't copy the backing array. Same thing with std::string. As for opening the font every frame, I think that might be from my inexperience with game-making more than my inexperience with C++, but I agree, caching that is such an easy optimization.
@Smilezlol
@Smilezlol 2 жыл бұрын
Still impressive non-the less and thanks for sharing so we can all learn.
@TheCherno
@TheCherno 2 жыл бұрын
Performance was always fine for me (~1ms per frame for me too), it was the way you were calculating delta time (39:50) that caused the balls to not move (since they move based on delta time which was 0 in those cases) when SDL events occured. Did you not have that issue?
@benjaminclehmann
@benjaminclehmann 2 жыл бұрын
@@TheCherno I'm not sure, I never ran into the issue but it's possible I changed it chasing another bug I had where the user could trigger a ton of events (for example by moving the window) which would allow them to phase through walls. I think I fixed the issue by having it interpolate through the intermediate points if the timestep ever got too big
@dariuszpys9307
@dariuszpys9307 2 жыл бұрын
@@benjaminclehmann > I thought that the STL collections were all resource handles, so passing them by value was fine as it doesn't copy the backing array. Same thing with std::string. There are two key concepts in C++ you should be aware of, to be comfortable with it. Those are object's lifetime and object's ownership. It seems that concept of lifetime is obvious to you. The concept of ownership wraps around the answer to the question: "who is responsible for freeing up the resources allocated by that object?". If, for example, std::vector will only be a dummy handle to the memory containing some elements, the responsibility of freeing up that memory will not lay on it, it will lay on someone else (maybe the programmer) - because the std::vector object won't be an owner of the memory, it would only points to someone else's memory. That's not the case in C++ standard libs. Most of the containers are designed to be owners of the memory they're using. It's their duty to free the memory up. Some exceptions are std::span or std::string_view, which are specifically designed to be non-owning handles.
@user-fh7ki5bv5x
@user-fh7ki5bv5x 2 жыл бұрын
Instead if #IFNDEF... in your header files, you could use #pragma once
@netoskin
@netoskin 2 жыл бұрын
I found incredible how you make the corrections using theory about the language and programming in general and fix this severe bugs, puts in perspective how much we can ignore important stuff just to get the project done
@niklasmikkelsen4701
@niklasmikkelsen4701 2 жыл бұрын
Really great video, as usual. I love that these are long and you're just exploring the code. Thanks for taking your time doing these!
@Hiimstring3
@Hiimstring3 2 жыл бұрын
No one else on the internet is doing what you do here, in such a digestible format. Learning so much from the series, thank you!
@WheatMillington
@WheatMillington 2 жыл бұрын
I love these videos and the format - I don't find this too long at all, and would even love to see some longer form code reviews in the future.
@Bobbias
@Bobbias 2 жыл бұрын
Honestly, these are some of the best videos on KZbin. You do an excellent job of explaining and showcasing a lot of the smaller but important details. Most programming videos deal strictly with code that the video creator wrote themself. If the creator already knows best practices, you rarely see any code that violates them. On the other hand, if the author is not aware of the best practices, you will just see bad code and consequently not learn best practices. And many programmers on KZbin seem to have certain idiosyncrasies which may violate industry standards or best practices as well.
@artyomdanilov7831
@artyomdanilov7831 2 жыл бұрын
Keep on doing them, man! The longer, the better! Thank you!
@nipplesniper
@nipplesniper 2 жыл бұрын
authentic programming at its best. Great job as always Cherno!
@supercool3865
@supercool3865 2 жыл бұрын
Im addicted to your channel man !!
@visintel
@visintel 2 жыл бұрын
You can go as in depth as humanly possible in these videos and I would still enjoy watching them. These are honestly my favorite series to watch!
@klex3905
@klex3905 2 жыл бұрын
This was a really nice review.. And it's nice to see you going into more depth as the reviews keep coming. This was a really interesting project, a lot of reviews can be opinion based but I think you really have some good feedback and suggestions. You're doing gods work sir!
@asandax6
@asandax6 2 жыл бұрын
Thanks Cherno watching your channel especially code reviews has given me the confidence to help out others with their code.
@vmiguel1988
@vmiguel1988 2 жыл бұрын
Great format continue doing those!
@Czteryry
@Czteryry 2 жыл бұрын
Cool, I'd love to see more of code reviews like this!
@Robert-bw6jk
@Robert-bw6jk 2 жыл бұрын
Superb, keep this up please. Long videos of this kind is super fine.
@nicolaschampagne8988
@nicolaschampagne8988 2 жыл бұрын
it's great that you give more than just objective good programming practice and you give insides on how you like programming your stuff. Great insides, great video thanks.
@sparkequinox
@sparkequinox 11 ай бұрын
I could have you playing for hours as I myself program, its relaxing and I learn a lot. Its interesting to not only see what you do, but hearing how you approach problems is helpful in expanding my own skills.
@brianpurdy2966
@brianpurdy2966 2 жыл бұрын
Loving the code reviews The Cherno. I have recently started my journey back with C++. As my school transitioned to C# for most of its curriculum. I love to see your thought process during these sessions and how you may resolve it. (Side Note) I'm using your C++ playlist - Thanks for all your efforts for all of us out here in the void. Please keep this up and if you go in depth I hope it adds value as to not waste your time. Love your content!
@_general_error
@_general_error 2 жыл бұрын
This was a good one. Keep going into details, that's how one learns from another.
@shredsheets5477
@shredsheets5477 2 жыл бұрын
This was a great video. A lot of the newer devs never have to really think about what's happening in their code. It's a good thing because it opens it up to more people, but it does lead to some meaningful differentiation between skill levels.
@IsaacC20
@IsaacC20 Жыл бұрын
Love this. I watched all 47 glorious minutes. Closing a file pointer, using ref-to-const in parameters, memory-analysis/snapshot tool to debug memory leak, debugging the game screen stuttering, seeing how you read code -- awesome catches.
@romainvincent7346
@romainvincent7346 2 жыл бұрын
Hello The Cherno, About 22:20, as an experienced web developer with junior devs to manage, I am VERY interested in more thorough code reviews! As far as I remember, your advices always make sense to me, there is always some value to retrieve. Your c++ series has been enlightening. I enjoyed several of your code reviews and always thought: "I wish he could explain more"!
@deez_gainz
@deez_gainz 2 жыл бұрын
Thanks! Love those reviews!
@mrboblox4444
@mrboblox4444 2 жыл бұрын
lovely video as always!
@eduardomachado2897
@eduardomachado2897 2 жыл бұрын
I love this series, I learn a lot from it
@reynster123
@reynster123 2 жыл бұрын
This was great, would love more in depth things like this in the future in C++ or other languages
@virtualfi
@virtualfi 2 жыл бұрын
Nice, keep em videos comming!
@AntonioNoack
@AntonioNoack 2 жыл бұрын
Really enjoyed this :), am typically coding in Kotlin, and it's nice to learn more about C++.
@DesignCell
@DesignCell 2 жыл бұрын
Very interested! Watching your debug process is very helpful!
@MrKDevs
@MrKDevs 2 жыл бұрын
YOOOO! I have not kept up with your channel in a while but you have turned me into a coding prodigy because I watched all your videos when I was roughly 16. I'm 23 now and have built so many cool things thanks to you :) Thank you
@greob
@greob 2 жыл бұрын
22:20 I don't mind you taking the time to parse through everything. Another great video, thanks for sharing!
@xKreesherZ
@xKreesherZ 2 жыл бұрын
this is the best format about programming video i love it
@OptimoosPlays
@OptimoosPlays 2 жыл бұрын
I know that some prefer shorter videos, but I'm not one of them. As a novice, I find the way you describe your thought process as you dig into the issues and present options for resolving them to be both interesting and insightful. If anything, I'm with the others who have said that even more would be appreciated, but I understand you've got to draw a line somewhere (punny because InkBall). Either way, love the code review series along with your other content!
@santiagotorres6929
@santiagotorres6929 2 жыл бұрын
I've been learning a lot from these videos, they are awesome. You explain everything pretty good, and make it looks so easy at the time you give your analysis on the code... I'll love to pick up C++ language, but I'm kinda afraid because of the corridor's comments.
@jonxslays
@jonxslays 2 жыл бұрын
I love in depth analysis always looking for things to improve my own code. Ramble on!
@kursatyakupkukul7670
@kursatyakupkukul7670 2 жыл бұрын
I really like your code reviews cherno 👌
@duzehalo
@duzehalo Жыл бұрын
As someone who knows and loves Python, and only recently wrote first hello world in C++ - this was fascinating, motivating and I learned a lot. Good stuff!
@umadbroyo2388
@umadbroyo2388 2 жыл бұрын
I would actually enjoy even more deeper reviews!!
@1u8taheb6
@1u8taheb6 2 жыл бұрын
Cherno content can never go too deep. Even when i don't understand what you say, I still enjoy listening
@G5STU
@G5STU 2 жыл бұрын
Love these vids as a c# guy learning cpp . These are invaluable to me .
@codedecode1498
@codedecode1498 2 жыл бұрын
I needed this. A lot
@unityecsdev
@unityecsdev 2 жыл бұрын
Code reviews are really good for learning good practices!
@khoda81
@khoda81 2 жыл бұрын
This series is great im learning a lot. I would personally be ok with longer videos.
@notposhsan
@notposhsan 2 жыл бұрын
You speak clearly enough (at least for a native English speaker) that double-speeding the video is still completely understandable, so the length of video for double-speed chads like me is less of a concern, and I'd happily watch another 23 minutes of double-speed video to get even more code review, if you actually wanted to spend the time doing it. This is a really solid series. Code review is by far the best way to quickly improve skill with programming. Great job on this stuff.
@user-sl6gn1ss8p
@user-sl6gn1ss8p 2 жыл бұрын
double speed + pause when necessary is the way to go
@TheCherno
@TheCherno 2 жыл бұрын
Thanks! I usually watch these videos at 2x speed (or maybe 1.5x) when editing and I agree - I actually quite like them at 2x speed!
@AntoniGawlikowski
@AntoniGawlikowski 2 жыл бұрын
You wanted feedback, here is mine: This series is great! I'd even risk saying that it's your best one, please don't have doubts about it! :)
@kmint1331
@kmint1331 2 жыл бұрын
Yayyyyy, I LOVE code reviews!!! We can just learn so much from these videos!!! 28:52 lollll
@mihailurmanschi4901
@mihailurmanschi4901 2 жыл бұрын
this is better then MR. Robot, please keep it up, enjoying this videos a lot, even if I do not do any C++
@johanrojassoderman5590
@johanrojassoderman5590 2 жыл бұрын
I'd totally be down watching you give feedback on the projects in depth, including both technical and logical optimizations. Even if the videos become 3+ hours long.
@hugoqueva
@hugoqueva 2 жыл бұрын
nice video! keep it up
@b.blokzijl1189
@b.blokzijl1189 2 жыл бұрын
Please continue your indepth analysis 🙏. Don't mind longer videos!
@DevlogBill
@DevlogBill 2 жыл бұрын
I've been learning programming for the past 4 months. Originally, I was studying on my own Data Science, and I don't know if this could be considered to be a language, but it was what caught my eye into programming and that was SQL using MySQL. Since I was studying Data Science I jumped into Python while practicing SQL. Next, I abandoned Python and jumped ship to learn web development because I became bored with Data Science and now, I am bored with web development, and I figured since the only thing which is consistent is that I love to code. I decided to take this free online CS50 course sponsored by Harvard University. Now I am 2 weeks in learning C and it's the hardest language I ever had to learn. But I am really having fun with it and now I am even more in love with C since you can take the terminal and use it to manipulate your computer? It's an amazing skill to have. Question? I never completed my degree in engineering. I dropped out of college once I reached cal1, but I completed all my algebra. So, I am decent at math. Is it possible to get a job with skills in C, Python, JavaScript and familiarity with using databases? Plus, a decent understanding of complex mathematics. I didn't delve too much into web development because I am not creative when it comes to knowing how to pick colors, but I enjoy coding abstract concepts. What recommendations could you give? I estimate that in 3 months from now I should be finished with this CS50 course. I am in no rush I want to have a solid foundation in coding. What are your thoughts? I would appreciate any insight. Basically, what career options or with the skill set I am developing what would you recommend? sorry for the long rant.
@mahabat23
@mahabat23 2 жыл бұрын
going deeper would be awesome, thanks for videos
@spectrm6014
@spectrm6014 2 жыл бұрын
I love ur videos!! 😃👏
@mitchellcampbell2775
@mitchellcampbell2775 2 жыл бұрын
I've been programming for a few years (mainly in C++) and I decided to study Computer Science. My word, are the programming exams horribly worded and ambiguous🤦. They need some serious review and work.
@chalkchalkson5639
@chalkchalkson5639 2 жыл бұрын
This was a pretty good lesson for me. There is always this arc of "section one: portability issues you should be aware of, section two here is how you can get a grasp of program flow in foreign code, section three: random things about c++". Though I feel like as the series goes on (hopefully) the first two will get redundant and or disappear. Maybe in the nearish future it'll be time to remove the first two sections and go like "Today we have this project [demonstration] and I'm going to take a specific look at [thing] in the code". Wouldn't really require much preproduction, just recording an intro at the end of what you are already doing and cutting to the 'meat' of the episode after the intro. Btw, do you think you might expand to other languages? Your channel obviously has a history with java, c# is super relevant to your content and python is probably the most popular beginner language right now.
@fmdj
@fmdj 2 жыл бұрын
The long format is cool.
@FreeDomSy-nk9ue
@FreeDomSy-nk9ue 2 жыл бұрын
Awesome. I love it
@Tkap
@Tkap 2 жыл бұрын
These videos are great
@gillywild
@gillywild 2 жыл бұрын
Personally I love this series & wouldn't mind at all if the videos were longer. That having said, I only understand a fraction of what you're conveying but, it shows me what I don't know and I find that very valuable. Atb. G.
@AlmightyFSM
@AlmightyFSM 2 жыл бұрын
You asked for feedback on how detailed the code reviews should be.. here's mine: I want to be able to follow along with you. In many cases, I see things that confuse me or aren't clear, and you often will highlight the same thing, or call it out. This is HUGELY useful as it allows me to maintain pace with you as you're going through the code. If I lose cohesion with what you're saying, it becomes word salad pretty quickly. So from my standpoint, the way you do it.. which seems to be a stream of just what you're seeing "as you see it", is the right way to do it, because it makes it possible to follow along in lock step. If you skip over the detail which brought you to a particular conclusion (e.g. "I'm not going to show you why, but this code is wrong"), then (for me) it loses its instructional value. Which seems to be the whole point.
@ucheachay5885
@ucheachay5885 2 жыл бұрын
I just want to say thank you for inspiring me to learn c++ lol still got alot to learn though .... All the way from Nigeria
@worzell5169
@worzell5169 2 жыл бұрын
42:45 is such a mic drop 🎤 I love these videos
@The88Cheat
@The88Cheat 2 жыл бұрын
I got in to computer science a little later in life and never did any previous programing. I think I've REALLY benefited from learning C++ first in college because it has made more modern languages far easier to grasp! lol
@gr3yknigh1
@gr3yknigh1 2 жыл бұрын
22:32 - definitely interesting!
@SpectreFury
@SpectreFury 2 жыл бұрын
LOVE IT
@nothingiseverperfect
@nothingiseverperfect 2 жыл бұрын
Been learning a LOT about compiling projects and stuff and this video helped soooo much It seems so complicated to just get a project to run on another computer, you had to install a bunch of dependencies, libraries, and whole bunch of other stuff! man this shit is complicated 😭😭😭😭😭
@TheDuerden
@TheDuerden 2 жыл бұрын
Feedback = in-depth is good, speed is overrated - taking your time explaining your thought process is far more valuable than 'finishing' - that is my tuppence, nice video - subscribed will look at back catalogue now too !
@powerclan1910
@powerclan1910 2 жыл бұрын
i like the very in depth reviews, just ebcause even advanced programmers sometimes have a bad habbit they don't know about
@prashkd7684
@prashkd7684 Жыл бұрын
I am starting to learn C++ for embedded systems which is a completely different beast then the topics you cover on your channel. Any chance you can make a video on how a "software engineer" would approach these problems like memory management, hardware handling, screen refresh etc ?
@KnightofWine
@KnightofWine 2 жыл бұрын
I'm here to learn a little bit more and if you feel that you have something interesting to say that will give me more knowledge I'm totally fine with it. Of course that if the video is bigger I might watch it during the day, but I don't mind watching big ones.
@justtrim
@justtrim 2 жыл бұрын
I'm late to the party, but I AM interested in hours and hours of code review lol
@monstercameron
@monstercameron 2 жыл бұрын
dang, very entertaining code review...I guess I'm getting old to have enjoyed this.
@Xingchen_Yan
@Xingchen_Yan 2 жыл бұрын
1:40. You learned JAVA and used it for several years before move into C++ Bro I remembered that you're like my age, and I started watching and learning C++ from you like college freshmen. I guess you can proudly apply for those junior dev jobs with 10+ yrs of experience. Jokes aside, great series bro, love it. Keep it coming.
@jonohiggs
@jonohiggs 2 жыл бұрын
A nice way to avoid those memory leaks when working with a c API that returns pointers is to use std::unique_ptr with a custom deleter that calls the free function. The unique ptr will ensure that free call is made when it falls out of scope at the end of the function so no need to remember to call it, or free it early before the last usage
@jonohiggs
@jonohiggs 2 жыл бұрын
And then I watched to the end of the video
@mgtigris
@mgtigris 2 жыл бұрын
I realy like these code review videos because here I can at least see how to fix issues with relatively working code and how to make it better. And also something that I'm qute jelous for is how well you can navigate in visual studio. Have you ever considered making a video about how to use visual studio IDE (shortcuts, handy features like code gen, ..)? For me it would be really helpful and I think for other ppl too who came from other languages. For example I learned Java and Python and I have used JetBrain IDEs for those and I kind of feel frustrated when using visual studio. And to this day I dont know what reShaper C++ does in visual studio.. anyway the point is that C++ is quite challageing on its own and I dont want to pick a fight with the IDE as well.
@tekhiun
@tekhiun 2 жыл бұрын
Hey Cherno, really like your channel and the content you put out. Haver you ever considered trying out Kotlin? It would be interesting to know what someone with your background thinks of the language and its ecosystem. Maybe you could do a video about that if you ever run out of ideas, it could also be an interesting where you try out different languages, maybe even write the same project on various different languages and talk about your experience.
@_yannis2707
@_yannis2707 2 жыл бұрын
I also started programming in Java, mainly Minecraft plugins for my server.
@ISKLEMMI
@ISKLEMMI 2 жыл бұрын
11:09 - G++ allows designated initializers in pre-C++20 unless you set something like -Wpedantic. Designated initializers are one of the small, useful things that I missed when moving from C99 to pre-C++20.
@Asdayasman
@Asdayasman 2 жыл бұрын
Probably good to edit these videos more heavily. After the first few times, we get how you approach an unknown codebase, and don't need to see you chasing function calls around to grok what's what, the vide could easily be an intro like the current one unchanged, then cut out piece by piece "I found something weird here, let's investigate."
@masheroz
@masheroz 2 жыл бұрын
This didn't seem to be a long video. Is there a reference somewhere to all the keyboard shortcuts you're using to travel around the source files?
@kingigzorn7680
@kingigzorn7680 2 жыл бұрын
As a Java Developer I feel a timewarp back to my Pascal times in the 90s. Allocate, free, copy Data, worry about data size...
@Shan224
@Shan224 Жыл бұрын
@TheCherno, thanks for doing these its very helpful! Could you post your code review solution alongside the original? My 2cents: As someone coming from python, I think people like me would prefer more detail and depth over brevity.
@coderdude9417
@coderdude9417 2 жыл бұрын
I would love a live code review
@pup4301
@pup4301 2 жыл бұрын
Thank you.
@typingcat
@typingcat 2 жыл бұрын
Ha, it is funny because the de-facto first programming language I learnt was C++ by reading a C++ book borrowed from a local library. I said "de-facto" because the "Information technology" class of my high-school briefly covered BASIC.
@fahdanwar
@fahdanwar 2 жыл бұрын
After doing C++ in last 10 year and slowly difficulty in finding work in c++ around my location is. I am in reverse boat learning web/JavaScript etc. One think I noted that most of people doing these languages have mindset of seeing output immediately while in c++ in practical things are different.
@conradlewis5689
@conradlewis5689 2 жыл бұрын
22:20 Personally, I could listen to code reviews for hours. Go as slow and in-depth as you like!
@gazoline7093
@gazoline7093 2 жыл бұрын
Hi mate where did you learn how to program C++, Java and python? Which University course did you study? I’m wanting to get involved in programming automotive systems such as the CAN Bus. Thanks
@LienKim-ry4bc
@LienKim-ry4bc 2 жыл бұрын
Oh ho ho ho 14:36
CHESS! // Code Review
51:05
The Cherno
Рет қаралды 227 М.
Understanding Code You Didn't Write // Code Review
27:15
The Cherno
Рет қаралды 66 М.
Can You Draw A PERFECTLY Dotted Line?
00:55
Stokes Twins
Рет қаралды 38 МЛН
Получилось у Вики?😂 #хабибка
00:14
ХАБИБ
Рет қаралды 5 МЛН
PATH TRACER made by 15-YEAR-OLD in C++ OpenGL! // Code Review
36:56
2 Years Of Learning C | Prime Reacts
22:24
ThePrimeTime
Рет қаралды 247 М.
How Senior Programmers ACTUALLY Write Code
13:37
Thriving Technologist
Рет қаралды 1,4 МЛН
I Rewrote This Entire Main File // Code Review
16:08
The Cherno
Рет қаралды 130 М.
I made it FASTER // Code Review
38:46
The Cherno
Рет қаралды 524 М.
Thoughts About Unit Testing | Prime Reacts
11:21
ThePrimeTime
Рет қаралды 209 М.
Game Engine Architecture 101 // Code Review
16:19
The Cherno
Рет қаралды 51 М.
Using Numbers in Your Code is BAD?!? (low level code review)
14:33
Low Level Learning
Рет қаралды 118 М.
All about MEMORY // Code Review
33:42
The Cherno
Рет қаралды 158 М.
SOME UNIQUE C++ CODE! // Pacman Clone Code Review
26:42
The Cherno
Рет қаралды 261 М.
Can You Draw A PERFECTLY Dotted Line?
00:55
Stokes Twins
Рет қаралды 38 МЛН