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

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 พ.ย. 2024

ความคิดเห็น • 293

  • @TheCherno
    @TheCherno  3 ปีที่แล้ว +71

    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 3 ปีที่แล้ว +2

      Are you making code review for projects on Java or other languages?

    • @erionan
      @erionan 3 ปีที่แล้ว

      Hi cherno. Is it too late to leran C++ at age 32 and get a job?

    • @aqua_coder
      @aqua_coder 2 ปีที่แล้ว

      @@erionan It is never too late to do anything

    • @ZettaiKatsu2013
      @ZettaiKatsu2013 5 หลายเดือนก่อน

      ​@@erionanno it is not.

  • @marcspecter
    @marcspecter 3 ปีที่แล้ว +498

    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_ 3 ปีที่แล้ว +21

      I don't even use C++ but I still find these videos to be super valuable and helpful tbh.

    • @knishkrinkle6485
      @knishkrinkle6485 3 ปีที่แล้ว +4

      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 3 ปีที่แล้ว

      agreed

    • @enshk79
      @enshk79 3 ปีที่แล้ว

      I can’t even code hello world and I love these videos

    • @nobytes2
      @nobytes2 3 ปีที่แล้ว

      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?

  • @lionkor98
    @lionkor98 3 ปีที่แล้ว +115

    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.

    • @perelium-x
      @perelium-x 2 ปีที่แล้ว +3

      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 ปีที่แล้ว +2

      @@perelium-x 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).

    • @perelium-x
      @perelium-x 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 ปีที่แล้ว +2

      @@perelium-x 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.

    • @perelium-x
      @perelium-x 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

  • @Clover4568
    @Clover4568 3 ปีที่แล้ว +72

    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! :)

  • @mr.anderson5077
    @mr.anderson5077 3 ปีที่แล้ว +63

    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 3 ปีที่แล้ว +218

    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 3 ปีที่แล้ว +18

      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 3 ปีที่แล้ว +4

      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 3 ปีที่แล้ว +3

      Innecesary. The game logic is irrelevant

    • @netoskin
      @netoskin 3 ปีที่แล้ว

      @@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 3 ปีที่แล้ว +3

      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 ปีที่แล้ว +7

    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...

  • @szaszm_
    @szaszm_ 3 ปีที่แล้ว +14

    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.

  • @jaredw43
    @jaredw43 3 ปีที่แล้ว +6

    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,

  • @Hiimstring3
    @Hiimstring3 3 ปีที่แล้ว +3

    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!

  • @DJenriqez
    @DJenriqez 3 ปีที่แล้ว +30

    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.

  • @netoskin
    @netoskin 3 ปีที่แล้ว +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

  • @benjaminclehmann
    @benjaminclehmann 3 ปีที่แล้ว +113

    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 3 ปีที่แล้ว +14

      Still impressive non-the less and thanks for sharing so we can all learn.

    • @TheCherno
      @TheCherno  3 ปีที่แล้ว +18

      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 3 ปีที่แล้ว

      @@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 3 ปีที่แล้ว +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.

    • @CharleyWright-w1y
      @CharleyWright-w1y 3 ปีที่แล้ว

      Instead if #IFNDEF... in your header files, you could use #pragma once

  • @TheAxeForgetsTheTreeRemembers
    @TheAxeForgetsTheTreeRemembers 2 ปีที่แล้ว +3

    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"!

  • @edu_rinaldi
    @edu_rinaldi 3 ปีที่แล้ว +44

    Can you make a (mini) series on how to setup a C/C++ project using Cmake ? Thank you!

    • @DJenriqez
      @DJenriqez 3 ปีที่แล้ว +11

      mainly linking another libraries because in this field im always lost

    • @msx47_
      @msx47_ 3 ปีที่แล้ว +3

      @@DJenriqez he has made them in the past. check the c++ series and the opengl series

  • @rrutter81
    @rrutter81 2 หลายเดือนก่อน

    one of your best reviews that ive seen yet. As a developer from another language, i learned a lot about c++ memory management in this.

  • @IsaacC20
    @IsaacC20 2 ปีที่แล้ว

    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.

  • @niklasmikkelsen4701
    @niklasmikkelsen4701 3 ปีที่แล้ว +1

    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!

  • @sparkequinox
    @sparkequinox ปีที่แล้ว

    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.

  • @Bobbias
    @Bobbias 3 ปีที่แล้ว

    Honestly, these are some of the best videos on TH-cam. 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 TH-cam seem to have certain idiosyncrasies which may violate industry standards or best practices as well.

  • @notposhsan
    @notposhsan 3 ปีที่แล้ว +9

    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 3 ปีที่แล้ว

      double speed + pause when necessary is the way to go

    • @TheCherno
      @TheCherno  3 ปีที่แล้ว +6

      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!

  • @1u8taheb6
    @1u8taheb6 3 ปีที่แล้ว

    Cherno content can never go too deep. Even when i don't understand what you say, I still enjoy listening

  • @supercool3865
    @supercool3865 3 ปีที่แล้ว +2

    Im addicted to your channel man !!

  • @visintel
    @visintel 3 ปีที่แล้ว

    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!

  • @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.

  • @asandax6
    @asandax6 3 ปีที่แล้ว

    Thanks Cherno watching your channel especially code reviews has given me the confidence to help out others with their code.

  • @OptimoosPlays
    @OptimoosPlays 3 ปีที่แล้ว

    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!

  • @AlmightyFSM
    @AlmightyFSM 3 ปีที่แล้ว +1

    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.

  • @umadbroyo2388
    @umadbroyo2388 2 ปีที่แล้ว +1

    I would actually enjoy even more deeper reviews!!

  • @nicolaschampagne8988
    @nicolaschampagne8988 3 ปีที่แล้ว

    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.

  • @AntoniGawlikowski
    @AntoniGawlikowski 2 ปีที่แล้ว +1

    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! :)

  • @MrKDevs
    @MrKDevs 3 ปีที่แล้ว

    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

  • @DevlogBill
    @DevlogBill 2 ปีที่แล้ว +1

    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.

  • @AntonioNoack
    @AntonioNoack 3 ปีที่แล้ว +1

    Really enjoyed this :), am typically coding in Kotlin, and it's nice to learn more about C++.

  • @artyomdanilov7831
    @artyomdanilov7831 3 ปีที่แล้ว

    Keep on doing them, man! The longer, the better! Thank you!

  • @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!

  • @santiagotorres6929
    @santiagotorres6929 3 ปีที่แล้ว +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!

  • @Robert-bw6jk
    @Robert-bw6jk 3 ปีที่แล้ว

    Superb, keep this up please. Long videos of this kind is super fine.

  • @_general_error
    @_general_error 3 ปีที่แล้ว

    This was a good one. Keep going into details, that's how one learns from another.

  • @reynster123
    @reynster123 3 ปีที่แล้ว

    This was great, would love more in depth things like this in the future in C++ or other languages

  • @mitchellcampbell2775
    @mitchellcampbell2775 3 ปีที่แล้ว +5

    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.

  • @johanrojassoderman5590
    @johanrojassoderman5590 3 ปีที่แล้ว +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.

  • @klex3905
    @klex3905 3 ปีที่แล้ว

    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!

  • @G5STU
    @G5STU 2 ปีที่แล้ว

    Love these vids as a c# guy learning cpp . These are invaluable to me .

  • @Czteryry
    @Czteryry 3 ปีที่แล้ว

    Cool, I'd love to see more of code reviews like this!

  • @ViniciusMiguel1988
    @ViniciusMiguel1988 2 ปีที่แล้ว

    Great format continue doing those!

  • @samas69420
    @samas69420 3 ปีที่แล้ว

    this is the best format about programming video i love it

  • @brianpurdy2966
    @brianpurdy2966 3 ปีที่แล้ว

    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!

  • @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++

  • @shredsheets5477
    @shredsheets5477 3 ปีที่แล้ว

    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.

  • @DesignCell
    @DesignCell 3 ปีที่แล้ว

    Very interested! Watching your debug process is very helpful!

  • @b.blokzijl1189
    @b.blokzijl1189 2 ปีที่แล้ว

    Please continue your indepth analysis 🙏. Don't mind longer videos!

  • @unityecsdev
    @unityecsdev 2 ปีที่แล้ว

    Code reviews are really good for learning good practices!

  • @deez_gainz
    @deez_gainz 2 ปีที่แล้ว

    Thanks! Love those reviews!

  • @eduardomachado2897
    @eduardomachado2897 3 ปีที่แล้ว +1

    I love this series, I learn a lot from it

  • @kmint1331
    @kmint1331 3 ปีที่แล้ว

    Yayyyyy, I LOVE code reviews!!! We can just learn so much from these videos!!!
    28:52 lollll

  • @jonohiggs
    @jonohiggs 3 ปีที่แล้ว

    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 3 ปีที่แล้ว +1

      And then I watched to the end of the video

  • @gr3yknigh1
    @gr3yknigh1 3 ปีที่แล้ว +1

    22:32 - definitely interesting!

  • @TheDuerden
    @TheDuerden 3 ปีที่แล้ว

    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 !

  • @mrboblox4444
    @mrboblox4444 3 ปีที่แล้ว +1

    lovely video as always!

  • @khoda81
    @khoda81 3 ปีที่แล้ว +1

    This series is great im learning a lot. I would personally be ok with longer videos.

  • @kursatyakupkukul7670
    @kursatyakupkukul7670 3 ปีที่แล้ว

    I really like your code reviews cherno 👌

  • @conradlewis5689
    @conradlewis5689 3 ปีที่แล้ว +2

    22:20 Personally, I could listen to code reviews for hours. Go as slow and in-depth as you like!

  • @nothingiseverperfect
    @nothingiseverperfect 3 ปีที่แล้ว +1

    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 😭😭😭😭😭

  • @worzell5169
    @worzell5169 3 ปีที่แล้ว

    42:45 is such a mic drop 🎤 I love these videos

  • @chalkchalkson5639
    @chalkchalkson5639 3 ปีที่แล้ว

    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.

  • @Mystixor
    @Mystixor 3 ปีที่แล้ว +7

    Hey, you might have answered this before but I wondered what your stance is on coding language bashing. In the last couple years I received a lot of hate over "still" supporting C++ and not switching to Rust already, and similar stuff.
    Cheers!

    • @qvindicator
      @qvindicator 3 ปีที่แล้ว +4

      @@DaleDix id laugh but I find Rust so much harder to read and understand than C++. I think people use it because they are excited there’s finally another no GC systems programming language backed by somebody noteworthy (Mozilla) and always wanted to abandon C++ at all costs. It definitely is easier to get up and running than C++ with its build system, cargo, and it’s not bloated with multiple features that do the same thing (like C++20’s two ways of using other files or libraries: “#import” and “include”), but when it comes down to reading or especially programming, I find C++ a lot easier to work with which is why I prefer it.

    • @lycanthoss
      @lycanthoss 3 ปีที่แล้ว +4

      Use whatever language your job requires you, if there is no requirement use whatever you like. Rust is a very nice language, but it doesn't change the fact that C++ has a gargantuan community and far more support/use than Rust. It will take decades to phase out C++ and so far C++ offers far more opportunities than Rust.

    • @ShivamJha00
      @ShivamJha00 3 ปีที่แล้ว +2

      While I would avoid using C++ at all costs until I absolutely have to use it, I think this "hate" around "still" supporting C++ is beyond stupid

    • @TheCherno
      @TheCherno  3 ปีที่แล้ว +6

      There will always be a group of people talking down on certain tools and technology - those people are usually more concerned with the tools they use rather than the products they produce (very "meta"), which is something I personally am very much not into. It's like being overly obsessed with which brand of screwdriver you should use instead of just screwing in screws and actually building something. C++ is fine.

    • @Mystixor
      @Mystixor 3 ปีที่แล้ว

      @@TheCherno That's a nice metaphor, thanks a lot man.

  • @virtualfi
    @virtualfi 3 ปีที่แล้ว

    Nice, keep em videos comming!

  • @mahabat23
    @mahabat23 2 ปีที่แล้ว

    going deeper would be awesome, thanks for videos

  • @ISKLEMMI
    @ISKLEMMI 3 ปีที่แล้ว

    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.

  • @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.

  • @The88Cheat
    @The88Cheat 3 ปีที่แล้ว

    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

  • @prashkd7684
    @prashkd7684 2 ปีที่แล้ว

    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 ?

  • @justtrim
    @justtrim 2 ปีที่แล้ว +1

    I'm late to the party, but I AM interested in hours and hours of code review lol

  • @codedecode1498
    @codedecode1498 3 ปีที่แล้ว

    I needed this. A lot

  • @gillywild
    @gillywild 3 ปีที่แล้ว

    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.

  • @fmdj
    @fmdj 3 ปีที่แล้ว

    The long format is cool.

  • @monstercameron
    @monstercameron 3 ปีที่แล้ว +1

    dang, very entertaining code review...I guess I'm getting old to have enjoyed this.

  • @powerclan1910
    @powerclan1910 3 ปีที่แล้ว

    i like the very in depth reviews, just ebcause even advanced programmers sometimes have a bad habbit they don't know about

  • @mitchellcampbell2775
    @mitchellcampbell2775 3 ปีที่แล้ว +1

    I unliked this video just so that I can like it again. The Cherno is an absolute machine.

  • @ahmadalastal5303
    @ahmadalastal5303 ปีที่แล้ว

    For debugging memory leaks I would go with Heap Profiler rather than doing performance profiling with memory box checked

  • @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.

  • @annaklos4041
    @annaklos4041 3 ปีที่แล้ว +1

    Memory leak and optimisation are top priority, obviously. But I bet if you check the asm code, most of this optimizations are already taken care of by compiler. But it depends, for sure. Even compilers do bad sometimes and insert unnecessary instructions.

  • @Asdayasman
    @Asdayasman 3 ปีที่แล้ว

    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."

  • @WouterStudioHD
    @WouterStudioHD 3 ปีที่แล้ว +2

    21:39 here there can also be a memory leak when the exception is thrown

    • @TheCherno
      @TheCherno  3 ปีที่แล้ว +1

      Good catch - I never use exceptions so I didn't even notice! But either way, definitely better to do it in the same function that allocated the memory instead of passing ownership over to another function.

    • @WouterStudioHD
      @WouterStudioHD 3 ปีที่แล้ว

      @@TheCherno Agreed, but if you did want the function to take ownership, you’d use a unique_ptr. If you do use exceptions, you have to use RAII, because otherwise there is no way around memory leaks.

  • @_yannis2707
    @_yannis2707 3 ปีที่แล้ว

    I also started programming in Java, mainly Minecraft plugins for my server.

  • @mgtigris
    @mgtigris 3 ปีที่แล้ว

    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.

  • @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.

  • @graceoverall
    @graceoverall 2 ปีที่แล้ว

    25:05 It would have been nice if you gave a quick example of how an `assert` would look in place of a `throw`. Just a thought.

  • @greob
    @greob 3 ปีที่แล้ว +1

    22:20 I don't mind you taking the time to parse through everything.
    Another great video, thanks for sharing!

  • @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...

  • @mattwilliams1844
    @mattwilliams1844 2 ปีที่แล้ว

    Im not familiar with Windows, but doesn't find_package(Threads) for std::thread work just fine from the C++ standard?

  • @FreeDomSy-nk9ue
    @FreeDomSy-nk9ue 3 ปีที่แล้ว

    Awesome. I love it

  • @KnightofWine
    @KnightofWine 3 ปีที่แล้ว

    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.

  • @Tkap
    @Tkap 3 ปีที่แล้ว

    These videos are great

  • @LienKim-ry4bc
    @LienKim-ry4bc 3 ปีที่แล้ว +2

    Oh ho ho ho 14:36

  • @GabrielSouza-of7kt
    @GabrielSouza-of7kt 3 ปีที่แล้ว

    There is not compile time plugin or library for genering serialize/deserializer for C++? why do by hand when another languages or do it in runtime (not great for performance) or at compile time (like Kotlinx.serialization and Moshi in Java/Kotlin world)

  • @ucheachay5885
    @ucheachay5885 3 ปีที่แล้ว

    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

  • @hugoqueva
    @hugoqueva 3 ปีที่แล้ว

    nice video! keep it up