I used AI to do a C++ University Assignment

Sign up and download Grammarly for FREE using my link ► grammarly.com/cherno09 - you can also get 20% off Premium!
Patreon ► / thecherno
Instagram ► / thecherno
Twitter ► / thecherno
Discord ► / discord
Hazel ► hazelengine.com
🕹️ Play our latest game FREE (made in Hazel!) ► studiocherno.itch.io/saving-c...
🌏 Need web hosting? ► hostinger.com/cherno
📚 CHAPTERS
0:00 - Hello
1:11 - What assignment are we doing?
15:05 - Doing the assignment
58:21 - Reviewing the experience
💰 Links to stuff I use:
⌨ Keyboard ► geni.us/T2J7
🐭 Mouse ► geni.us/BuY7
💻 Monitors ► geni.us/wZFSwSK
This video is sponsored by Grammarly.

Пікірлер: 125

  • @TheCherno
    @TheCherno7 ай бұрын

    Hope you enjoyed the video! Should I do more AI videos? Also don’t forget you can sign up and download Grammarly for FREE using my link ► grammarly.com/cherno09 - you can also get 20% off Premium!

  • @aj-jc4cv

    @aj-jc4cv

    7 ай бұрын

    Have you tried copilot?

  • @PffScrub

    @PffScrub

    7 ай бұрын

    Would've been cool if you did an AI assignment video with a language you're less or unfamiliar with

  • @TristanWalter

    @TristanWalter

    7 ай бұрын

    Yea I second that. Cause I think you would have been much faster in implementing the Getters/Setters and stuff@@aj-jc4cv

  • @TheRealMangoDev

    @TheRealMangoDev

    7 ай бұрын

    how many times did you say cat in this video

  • @rosiskharel389
    @rosiskharel3897 ай бұрын

    C++ is temporary but cherno saying, "the video link's up there" and the video not being there, is eternal

  • @TheAzraf123

    @TheAzraf123

    7 ай бұрын

    Realest shit ever

  • @obscenity
    @obscenity7 ай бұрын

    "Let's program like a beginner, with AI" > Programs like an expert with minimal AI input.

  • @NNOTM
    @NNOTM7 ай бұрын

    I think for people learning, having it write code for you might be counterproductive, but I think it can be very helpful for answering specific questions you have, be it about some language feature, a piece of code, or why something doesn't work

  • @shn--zj9dl
    @shn--zj9dl7 ай бұрын

    AI is probably great as your personal free teacher, but it would be way too tempting for me to just ask it for complete solution when i just started learning programming. im glad that it became popular much later, so i had no choice but to learn how to think by myself or at least adapt other's solutions and not just copy-paste generated ones

  • @Thadnill

    @Thadnill

    7 ай бұрын

    well, before ai there was stack overflow, which is also copy paste, don't tell me you didn't use that either? ;)

  • @handledegree6736
    @handledegree67367 ай бұрын

    Honestly I enjoy seeing videos like this as your c++ tutorials were the main thing that helped me get through my college assignments

  • @Ketpain
    @Ketpain7 ай бұрын

    BACK IN MY DAY.. we used to write code by hand! ;) once the entire projects are able to be viewed by AI, then I think it'll kick things up a notch since it'll have a more comprehensive view of your entire project.

  • @hawns3212
    @hawns32127 ай бұрын

    Would love to see you do a video like this on graphics programming. I've tried it before and it definitely can produce steps to follow to execute ideas and theory, but it lacks in the code department. Would love to see your take on this and what you think on GPT4's interpretation of graphics programming.

  • @tbmj
    @tbmj7 ай бұрын

    You know it's a great video when cherno posts a video to ease the stress of a first period math test

  • @rmt3589

    @rmt3589

    7 ай бұрын

    I miss math tests so much! Wish I could take it for you.

  • @TristanWalter
    @TristanWalter7 ай бұрын

    I think this stuff might be problematic in terms of "if I don't have the time, maybe I just let the AI do it". Similar to other instant gratification stuff, it kind of messes with your reward system and actual learning. Cause learning is stressful and most people would like to avoid it if possible. Super useful for your day-job, maybe problematic for learning. I would like to think that I wouldn't have let it do all my assignments (mainly out of pride), but you never know. Although it *can* be a great teacher and help you with little things of course. I use it every day as Cherno mentioned (specific questions), but it's an "honor based system" of usage at that point.

  • @verminology9999
    @verminology99997 ай бұрын

    Would be to super cool to see this tested with a more advanced topic, such a graphics programming. Great video!

  • @MichaelHazell
    @MichaelHazell7 ай бұрын

    I learned something new today! I have never heard of cat cafes before this. That is awesome!

  • @unmeinks5907
    @unmeinks59077 ай бұрын

    you are unreasonably fast at editing code with visual studio

  • @NNOTM
    @NNOTM7 ай бұрын

    I actually think if it generates code that doesn't compile that's the least bad problem, because you can very simply tell it the compile error and it will (try to) fix it

  • @phusicus_404
    @phusicus_4047 ай бұрын

    I really like the new lens! The view is amazing!

  • @asdprogram
    @asdprogram7 ай бұрын

    We have been taught and still getting taught oop in java from semester 2 and cpp was only used to teach c in semester 1.

  • @itzdabbzz
    @itzdabbzz7 ай бұрын

    You know you're early when its stuck at 360p resolution..

  • @insu_na
    @insu_na7 ай бұрын

    I found chatgpt to be pretty useful for generating tedious stuff, like a parser for a packed file format. Not much brain power required and plenty of examples in the training data, so an easy task for ChatGPT and a chore for a human developer

  • @kinkkku
    @kinkkku7 ай бұрын

    I use chatgpt to generate stuff like cmake files, arrays, etc. E.g. "Generate a cmake file that contains .cpp and .h files with names "file1", "file2", "file3", "file4" and "file5". It should also copy "assets" folder from root to the destination", or "Generate a hardcoded c++ array containing 100 indices, with random values between 0 and 57". Writing something like by hand is just annoying busywork so I'd generate it using AI in 5 seconds. Also, random google questions that would normally require me to check multiple sources or might not even have a direct answer anywhere. Something like "Are there any benefits in using dijkstra over a* in a maze solving algorithm?". Ofcourse those always require me to think if I can trust the answer or not, but in most cases I can.

  • @_Gecko
    @_Gecko7 ай бұрын

    This is just showing me how poorly taught my C++ class was

  • @markmuller7962
    @markmuller79627 ай бұрын

    Looks like magic, it's hard to believe that we're already at this point with AI

  • @leonm8906
    @leonm89067 ай бұрын

    You could take some code where you think you could do some optimization and try asking the ai if it can come up with anything. I think that would be interesting.

  • @szirsp
    @szirsp6 ай бұрын

    When prompting for catInteractedWith it would be nice to have an option to list all cats to choose from (as a menu) instead of typing the name (and then validating it). On input error the form shouldn't reset (detect errors early and repeat the input request for only that line - and provide a way to cancel and return to menu; or repeat the form with already entered data as default option so you only have to press enter). Inconsistent naming of member functions (getter, setter) Display cat detail is not virtual (for overriding it for extra challenge #1) Errors not printed to stderr (dtd::cerr) No verification for entering negative values (age, treat quantity) Date format verification is incomplete 69-69--420 C-- ;) BTW Getters and Setters where you use code generators (don't even need AI for that). They probably don't forget to make getters const ;) ... and maybe noexcept :)

  • @ultimatesoup
    @ultimatesoup7 ай бұрын

    @TheCherno I was looking through your Hazel code and realized it doesn't export any shared symbols. Do you plan on it always being used as a static lib? It also looks like its currently pretty restrictive on the platforms and build systems that can support it.

  • @happygofishing
    @happygofishing6 ай бұрын

    I love how simply adding cats makes it more interesting.

  • @maqabayker
    @maqabayker7 ай бұрын

    Well, sometimes he can offer some solutions that are really hard to find in the internet. From that aspect, it is great. Also chatgpt tends to correct some part of code with the same logic and more clear version. So it is a win win. You really can learn a lot with it unless you are based "copy-paste"ers.

  • @dufy8547
    @dufy85477 ай бұрын

    Hi, have you considered sharing the VS theme you're using? It looks great!

  • @louisrigal7015

    @louisrigal7015

    7 ай бұрын

    Looks like monokai !

  • @dufy8547

    @dufy8547

    7 ай бұрын

    @@louisrigal7015 I don’t think it’s monokai honestly

  • @aj-jc4cv

    @aj-jc4cv

    7 ай бұрын

    Looks like visual assist theme.

  • @Einygmar
    @Einygmar7 ай бұрын

    When it comes to transformers used specifically with LLMs it's pretty well established that the architecture is fundamentally poor at modeling time series and long-range dependencies. This is why the models have a history of losing track of the conversation or whatever you use them for. Transformers are incredible at learning grammar rules, but they outright suck at sequential data because the architecture design intentionally removes any concept of sequence or input order. The designers did this explicitly to remove inductive bias of things like convolutions and will only continue to cause problems with chat bots and such. When it comes to programming it seems to follow the patterns from online tutorials and other curated data. When I asked it to implement a Red-Black tree the output was extremely similar to some tutorials I found online and no matter what I tried it didn't get nowhere near the implementation from libs like libstdc++ or EASTL. What I'm trying to say is that GPT based chat bots are good for something short and simple but by design they don't have the concept of abstraction needed to solve complex problems with code.

  • @SOLDAT_MENDES

    @SOLDAT_MENDES

    7 ай бұрын

    Well, transformers do have their strengths and limitations. While they excel at learning grammar rules, they can struggle with modeling time series and long-range dependencies. Their architecture lacks explicit sequence information, which can lead to difficulties in maintaining context. In terms of programming, GPT-based chat bots may be helpful for basic tasks, but they may not possess the necessary abstraction capabilities to tackle complex coding problems. It's important to consider the specific use case and explore alternative approaches when needed.

  • @webpoint4737
    @webpoint47377 ай бұрын

    can you please make a video on APIs

  • @ChloeCake
    @ChloeCake7 ай бұрын

    Quigly. Quigly is the guy dissing the OOP here.

  • @user-rj1hm2vy5i
    @user-rj1hm2vy5i7 ай бұрын

    I am a university student and I use AI to ask questions/examples and to see why my code is not working. Is this approach okay or should I stop doing it? I feel like I've become quite dependent on it.

  • @tommyliu7020

    @tommyliu7020

    2 ай бұрын

    Basically, are the stuff you’re asking it to do something that you could’ve done by googling (even if it takes longer)? If so you’re probably on safe ground.

  • @PostNoteIt
    @PostNoteIt7 ай бұрын

    Imagine he would actually put the link up there, no there. I can't remember.

  • @MrJvlake
    @MrJvlake7 ай бұрын

    It'd be cool to see as a last step on the video, the prompt "Can you find any errors or improvements for this code: {paste in whole program you just wrote}", I wonder if it would have found that incorrect dateOfVisit/dateInput variable. I really enjoy your channel!

  • @bukharikibuka6781
    @bukharikibuka67817 ай бұрын

    The videos u suggested werent linked up there 😂

  • @cppuser82222
    @cppuser822227 ай бұрын

    I love chatgpt for ideas but when it comes to accuracy it’s mostly wrong 😅

  • @user-iy5ek1jh6c
    @user-iy5ek1jh6c7 ай бұрын

    When are the ray tracing series?

  • @theappearedone
    @theappearedone7 ай бұрын

    videos arent linked up there!!!!!

  • @valentoMundrov
    @valentoMundrov7 ай бұрын

    That was fun watching! Intersting, you said, "I don't do this outside a video..." - so you aint' up to actiually using this bot in your GE-code?

  • @user-wv4br9oq6z
    @user-wv4br9oq6z6 ай бұрын

    What visual studio theme did you use in this video? Please let me know!

  • @LongestYardstick
    @LongestYardstick7 ай бұрын

    "needs to know what OO is before they can go on to hate it..." -- I skipped all that and just started out by hating it -- this happened the day that my professor made a Point object with an x and a y member and then wrote getters and setters for them. this hatred was further reinforced the day I realized no one uses objects for this and that's the beginning of my love story with Rust and structs. (I also really enjoy using c++) edit: k cherno, I been watching your videos for years, how I didn't realize you put the fkin open brackets on a new line 😢

  • @Saturate0806
    @Saturate08067 ай бұрын

    13:30 next time you should ask it to make a test cases for you :)

  • @SuviTuuliAllan
    @SuviTuuliAllan7 ай бұрын

    I wish I could visit a cat café. 🥺

  • @gsestream
    @gsestream7 ай бұрын

    well are your tools usable enough to deliver, most producing is just copying, which chat-gpt4 is a master of, and universities make people do that also, how fast copying goes dull tho, meeting requirements only

  • @user-jb9ix9yj5l
    @user-jb9ix9yj5l7 ай бұрын

    Supr bro it's amazing notification view attendence

  • @tanishqtak
    @tanishqtak7 ай бұрын

    The Cherno in 2025: I used AI to make my new game engine

  • @Aerthran

    @Aerthran

    7 ай бұрын

    The RoboCherno in 2035: The Cherno powers my new game engine

  • @Emyrus17
    @Emyrus177 ай бұрын

    I am weird, I wouldn't want an AI to do my assignment, I would rather it help me learn how to do my assignment.

  • @gabrielsandstedt
    @gabrielsandstedt6 ай бұрын

    Programmers that do not utilize newer language models will fall behind. This is the new reality like it or not. Personally I like it because it enables me to get more done in a shorter amount of time. Great video by the way. :)

  • @CatzHoek
    @CatzHoek7 ай бұрын

    I think you could consume negative amounts of treats to create more of them

  • @insulastudios
    @insulastudios6 ай бұрын

    Why don't you just configure vs in order to do auto formatting?😅

  • @Jeff--vq4zb
    @Jeff--vq4zb5 ай бұрын

    This is a bit freaky, but also funny because of the amount of times you must prompt chat GPT and clarify.

  • @anonymoussloth6687
    @anonymoussloth66877 ай бұрын

    Can u get back to the ray tracing series plz

  • @theladyjaiproject576
    @theladyjaiproject5767 ай бұрын

    I have only in the past few months become aware of AI bots that can do this sort of thing. This was interesting and informative. I think you may be a bit overly critical because of your vast experience in programming. I agree that generating a compiler error is a bid disconcerting, but it did correct itself, sort of. I'm 75, started programming in 1981 on an 8080. I've bounced around with Assembly, C, Java, Python, PHP, and perl..... and this tool would have been invaluable learning those. Thanks for the video.

  • @khiyabarrett1459

    @khiyabarrett1459

    6 ай бұрын

    there will be a weird period where people like cherno use ai like a novice and new programmers are overly dependent on ai but are extremely good at using it. I think ultimately being a novice with these tools will be a bigger disadvantage as they become better over time than being overly dependent on it however (as long as people are still learning something as they use it)

  • @jarvijarvson3319
    @jarvijarvson33197 ай бұрын

    As someone new to C++ and relatively new to programming in general, AI's are great for helping me to fix a problem and get over a bump. But for deep-level knowledge and learning, I still prefer The Cherno.

  • @anon1963

    @anon1963

    7 ай бұрын

    @@SOLDAT_MENDES this seems like a chat jippity response

  • @aj-jc4cv
    @aj-jc4cv7 ай бұрын

    I dedicate my CS degree to AI and my burger flipping job, because no one needs junior developers any more.

  • @anon1963

    @anon1963

    7 ай бұрын

    obviously false

  • @chrismaloney5448
    @chrismaloney54487 ай бұрын

    Coming from C# I always hear the hate for Object Oriented programming. I get it, there are many times I hate having to create classes for everything. I would love to see something like this but in a form of "all you OO guys, this is how you can do it without OO". I guess you've proved that I can probably just ask chatgpt but it's not the same. Thanks for the videos.

  • @zaftnotameni

    @zaftnotameni

    7 ай бұрын

    OO is the single worst mistake in programming history

  • @videathapi
    @videathapi7 ай бұрын

    Best.

  • @ryan-tabar
    @ryan-tabar7 ай бұрын

    There’s a new feature coming out with GPT4 where you can upload photos and it’ll interpret that image. I’m wondering if you can give it a flowchart or a diagram of a program to write. That would be interesting to see.

  • @IlliaZhdanov
    @IlliaZhdanov7 ай бұрын

    FP < OOP.

  • @xeridea
    @xeridea7 ай бұрын

    I like OOP, but not in the strict sense. Setters and getters, unless you have specific need to make them, are asinine, and a complete waste of time. Also don't feel everything should be shoehorned into object stuff just because, so coding style varies project to project.

  • @anthonysteinerv
    @anthonysteinerv7 ай бұрын

    Lmao if my studenst of 1st year, first assignment comes with a transform I would know something is odd rofl.

  • @TheRealMangoDev
    @TheRealMangoDev7 ай бұрын

    honestly: OOP is good. IDEK why people hate it so much

  • @jcx5750
    @jcx57507 ай бұрын

    How about making Hazel a state of the art real game engine

  • @SOLDAT_MENDES

    @SOLDAT_MENDES

    7 ай бұрын

    That sounds like a cool idea, Creating a state-of-the-art game engine like Hazel would require a lot of time, resources, and expertise in game development. While I can't make it happen myself, it's definitely a possibility for game developers in the future to create advanced game engines like Hazel. Keep dreaming big.

  • @GavinCawley
    @GavinCawley7 ай бұрын

    For an academic assignment, getting a LLM to write code for you (even for you to adapt) *is* cheating. The aim of the assignment is to see if the student has the understanding and problem solving skills to write good quality code. If they submit code written by an LLM they are not meeting the learning requirements and passing off code that they didn't write as their own (potentially plagiarism/collusion). LLM look like a great tool for expert programmers, but I think they are likely to make it more difficult for beginners to learn to program by giving them too much help. Students shouldn't be using LLMs to do something that they can't do themselves (and not at all for assignments unless it is specifically allowed). IMHO - naturally ;o)

  • @khiyabarrett1459

    @khiyabarrett1459

    6 ай бұрын

    You can still give the students exams to check they actually learned stuff. I think it’s unrealistic to assume 90% of students won’t use llms as soon as there stuck. LLMs will be integrated into google search soon

  • @GavinCawley

    @GavinCawley

    6 ай бұрын

    @@khiyabarrett1459 exams are not a good way of testing programming ability compared to getting them to write programs. I know this as I have been teaching programming for over 25 years and have used both. Of course some (if it is 90% then there is something deeply wrong with modern student culture) students will use LLMs, I am pointing out that this harms their development as programmers.

  • @Maikl498
    @Maikl4987 ай бұрын

    Hey cherno! What you think about new c++ succesors cppfront, carbon? I'm really looking forward to a video about this

  • @GreyHatz
    @GreyHatz7 ай бұрын

    😊

  • @tahir2443
    @tahir24436 ай бұрын

    do more AI stuff

  • @blastygamez
    @blastygamez4 ай бұрын

    I see this as nothing more than a threat and a blessing for lazy cheaters.

  • @blastygamez

    @blastygamez

    4 ай бұрын

    And if u need something that is too big and hard to implement ur self, u just need to use a library cuz these days there are libs for almost everything

  • @xthomas7621
    @xthomas76217 ай бұрын

    What!?!

  • @markmuller7962
    @markmuller79627 ай бұрын

    From copycat to cat copy 😏

  • @kamau6988
    @kamau69887 ай бұрын

    I feel the "cheating" sentiment.. kind of feels like chatgpt gives you all the answers amd at some point it can feel like magic which in my experience is never good. I think students should avoid it as much as they can but also be aware it exists.

  • @treym2k
    @treym2k6 ай бұрын

    K&R ftw.

  • @davidtbalfour
    @davidtbalfour7 ай бұрын

    Cherno, you really need to stop the scrolling so much on video mate, or at least reduce the cut/sensitivity of the scrolling. My brain is going crazy with it. 😅

  • @lucian6172
    @lucian61727 ай бұрын

    I tried the free game but it's running slow and the materials don't show properly.

  • @kateBeatriz
    @kateBeatriz7 ай бұрын

    14:55 copium

  • @rmt3589
    @rmt35897 ай бұрын

    5:55 Do I need to update grammerly for this? After the first grammerly ad, I added it to chrome. (Then got bombarded by the ads, so I normally ignore the ads) Still using the free version, but it helps me every day. Like on Twitch, so I can just spellcheck without leaving the tab. And it got me the same grades in seconds that the Writing Center got me in an hour. Never used any ai stuff from it, but would love to try if it's free!

  • @fosteredlol
    @fosteredlol7 ай бұрын

    I started learning C++ is my first programming language in March, and I use chatgpt a LOT. Not for code, but for answering questions. "Rust is big and people talk about the borrow checker, whats that? I don't understand, is there something like that in C++? Could you explain what shared and unique pointers are? Give me an example that would show the advantage of smart pointers"

  • @infinitivez
    @infinitivez7 ай бұрын

    Is there really any such thing as "cheating" when learning? If you have gaps in your knowledge, you haven't learned some of the underlining things, but you're still learning something. It'd be hard to use this as a tool to write an entire program without learning it. And even if you did, then you're not cheating, you're just having something else write a program FOR you.

  • @GavinCawley

    @GavinCawley

    7 ай бұрын

    It becomes cheating when you use it to solve summative university assignments, which are a test of *your* knowledge and understanding, not ChatGPT's understanding. What is the difference between getting ChatGPT to write code for you and getting another (better) student to write it for you?

  • @khiyabarrett1459

    @khiyabarrett1459

    6 ай бұрын

    @@GavinCawleyat some stage solving it without ai is the same as solving maths without a calculator. Testable in a exam to check understanding but otherwise a waste of time.

  • @GavinCawley

    @GavinCawley

    6 ай бұрын

    @@khiyabarrett1459 you are making my point, use a calculator one you have demonstrated that you understand arithmetic. Use LLMs in programming once you have demonstrated that you know how to program for yourself. Programmer needs to understand the code generated by the LLM (which has no understanding of the code), so they do need to understand programming for themselves in order to be able to safely use an LLM.

  • @ChrisM541
    @ChrisM5417 ай бұрын

    Autotune tools e.g. Antares/Melodyne in the music industry has existed for the last 20 years, and unfortunately, today, it is the most abused tool ever. Anyone can get a hold of these tools and, with the minimum of learning, sell to the unaware public, 'singers' who could never, ever get away with a live performance. Are 'AI' tools such as GTP going to get abused to the same extremes as those tools in the music industry? 100% YES...of course !!!

  • @ilanelbaum7605
    @ilanelbaum76057 ай бұрын

    היי

  • @jieqiyuejie8277
    @jieqiyuejie82777 ай бұрын

    do you know game hacking?can you teach us ?

  • @TopConductor
    @TopConductor7 ай бұрын

    hehe

  • @karlohlen9320
    @karlohlen93207 ай бұрын

    I make AI write my regex... i hate regex...

  • @Lixt_C
    @Lixt_C7 ай бұрын

    Is it just me or the video does not play?

  • @thinkmore8024
    @thinkmore80247 ай бұрын

    This is the most beta, soy assignment I have ever heard of.

  • @kamil_atakan

    @kamil_atakan

    7 ай бұрын

    As is the tradition with every uni assignment.

  • @Infamore
    @Infamore5 ай бұрын

    I absolutely approve AI chats.

  • @cprn.
    @cprn.7 ай бұрын

    I get that GPT4 was the easiest way to make this video but if you're really interested in assisted coding I suggest running your own LM locally on your GPU with something like llama cpp - it can serve the OpenAI protocol so most existing IDE plugins can be used by simply changing URL to localhost. Also, it's completely free.

  • @alaalmekhlafi5497
    @alaalmekhlafi54977 ай бұрын

    رجاء ضيف لغة العربي لترجمة في فيديوهاتك

  • @Alperic27
    @Alperic274 ай бұрын

    the goal was to use AI … not show how U want to do things….

  • @Finkelfunk
    @Finkelfunk7 ай бұрын

    Yo Cherno, I really love your videos and you are a cool dude. But the parenthesis on the next line over? Objectively wrong choice and disgusting to look at. Sincerely, Someone living outside of the Microsoft Ecosystem

  • @guruware8612
    @guruware86127 ай бұрын

    ok... non hallelujah-post are getting deleted, that much about freedom of speech. unsubscribed - kinda-lika

  • @NicosoftNT
    @NicosoftNT7 ай бұрын

    Hi Cherno, you are not that much surprised by AI then, in fact you were expecting it to be better, you don't fear it let alone panic like other developers. I understand then that you think in the future we are going to work with highly capable AI, and it's going to be normal? What would you say to developers that fear automation in terms of its impact in employment, do they have a reason to be scared?