I used AI to do a C++ University Assignment

Поділитися
Вставка
  • Опубліковано 29 тра 2024
  • 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.

КОМЕНТАРІ • 126

  • @TheCherno
    @TheCherno  8 місяців тому +22

    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 8 місяців тому +1

      Have you tried copilot?

    • @PffScrub
      @PffScrub 8 місяців тому +2

      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
    @rosiskharel389 8 місяців тому +119

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

  • @obscenity
    @obscenity 8 місяців тому +81

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

  • @NNOTM
    @NNOTM 8 місяців тому +7

    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--zj9dl 8 місяців тому +14

    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 8 місяців тому +1

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

  • @handledegree6736
    @handledegree6736 8 місяців тому +3

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

  • @Ketpain
    @Ketpain 8 місяців тому +4

    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.

  • @TristanWalter
    @TristanWalter 7 місяців тому +6

    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.

  • @szirsp
    @szirsp 7 місяців тому +1

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

  • @hawns3212
    @hawns3212 8 місяців тому +7

    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
    @tbmj 8 місяців тому +18

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

    • @rmt3589
      @rmt3589 8 місяців тому +1

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

  • @verminology9999
    @verminology9999 8 місяців тому +1

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

  • @MichaelHazell
    @MichaelHazell 8 місяців тому +1

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

  • @insu_na
    @insu_na 8 місяців тому +3

    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
    @kinkkku 8 місяців тому

    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.

  • @itzdabbzz
    @itzdabbzz 8 місяців тому +2

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

  • @phusicus_404
    @phusicus_404 8 місяців тому

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

  • @asdprogram
    @asdprogram 7 місяців тому +1

    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.

  • @markmuller7962
    @markmuller7962 8 місяців тому +1

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

  • @happygofishing
    @happygofishing 7 місяців тому

    I love how simply adding cats makes it more interesting.

  • @ultimatesoup
    @ultimatesoup 8 місяців тому

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

  • @_Gecko
    @_Gecko 8 місяців тому +2

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

  • @NNOTM
    @NNOTM 8 місяців тому +1

    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

  • @unmeinks5907
    @unmeinks5907 8 місяців тому +2

    you are unreasonably fast at editing code with visual studio

  • @maqabayker
    @maqabayker 8 місяців тому

    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.

  • @MrJvlake
    @MrJvlake 7 місяців тому

    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!

  • @LongestYardstick
    @LongestYardstick 7 місяців тому

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

  • @Einygmar
    @Einygmar 8 місяців тому

    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 8 місяців тому

      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.

  • @leonm8906
    @leonm8906 8 місяців тому

    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.

  • @PostNoteIt
    @PostNoteIt 8 місяців тому +1

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

  • @CatzHoek
    @CatzHoek 7 місяців тому

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

  • @gabrielsandstedt
    @gabrielsandstedt 6 місяців тому

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

  • @user-wv4br9oq6z
    @user-wv4br9oq6z 7 місяців тому

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

  • @valentoMundrov
    @valentoMundrov 7 місяців тому

    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?

  • @dufy8547
    @dufy8547 8 місяців тому +1

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

    • @louisrigal7015
      @louisrigal7015 8 місяців тому

      Looks like monokai !

    • @dufy8547
      @dufy8547 8 місяців тому

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

    • @aj-jc4cv
      @aj-jc4cv 8 місяців тому +1

      Looks like visual assist theme.

  • @Jeff--vq4zb
    @Jeff--vq4zb 5 місяців тому

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

  • @user-rj1hm2vy5i
    @user-rj1hm2vy5i 7 місяців тому

    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.

  • @ChloeCake
    @ChloeCake 8 місяців тому

    Quigly.
    Quigly is the guy dissing the OOP here.

  • @user-iy5ek1jh6c
    @user-iy5ek1jh6c 8 місяців тому

    When are the ray tracing series?

  • @theappearedone
    @theappearedone 8 місяців тому

    videos arent linked up there!!!!!

  • @gsestream
    @gsestream 8 місяців тому

    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

  • @SuviTuuliAllan
    @SuviTuuliAllan 8 місяців тому +1

    I wish I could visit a cat café. 🥺

  • @chrismaloney5448
    @chrismaloney5448 8 місяців тому

    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

  • @bukharikibuka6781
    @bukharikibuka6781 8 місяців тому

    The videos u suggested werent linked up there 😂

  • @Saturate0806
    @Saturate0806 8 місяців тому

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

  • @xeridea
    @xeridea 8 місяців тому

    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.

  • @webpoint4737
    @webpoint4737 7 місяців тому

    can you please make a video on APIs

  • @TheRealMangoDev
    @TheRealMangoDev 7 місяців тому

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

  • @cppuser82222
    @cppuser82222 8 місяців тому

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

  • @IlliaZhdanov
    @IlliaZhdanov 8 місяців тому

    FP < OOP.

  • @user-jb9ix9yj5l
    @user-jb9ix9yj5l 8 місяців тому +3

    Supr bro it's amazing notification view attendence

  • @insulastudios
    @insulastudios 7 місяців тому

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

  • @videathapi
    @videathapi 8 місяців тому

    Best.

  • @Emyrus17
    @Emyrus17 8 місяців тому

    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.

  • @GreyHatz
    @GreyHatz 8 місяців тому

    😊

  • @anonymoussloth6687
    @anonymoussloth6687 8 місяців тому

    Can u get back to the ray tracing series plz

  • @ThatTanishqTak
    @ThatTanishqTak 8 місяців тому

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

    • @Aerthran
      @Aerthran 8 місяців тому

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

  • @jcx5750
    @jcx5750 8 місяців тому +4

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

    • @SOLDAT_MENDES
      @SOLDAT_MENDES 8 місяців тому +1

      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.

  • @blastygamez
    @blastygamez 5 місяців тому

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

    • @blastygamez
      @blastygamez 5 місяців тому

      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

  • @tahir2443
    @tahir2443 7 місяців тому

    do more AI stuff

  • @anthonysteinerv
    @anthonysteinerv 8 місяців тому +1

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

  • @ryan-tabar
    @ryan-tabar 8 місяців тому +1

    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.

  • @aj-jc4cv
    @aj-jc4cv 8 місяців тому +2

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

    • @anon1963
      @anon1963 8 місяців тому

      obviously false

  • @kamau6988
    @kamau6988 8 місяців тому +3

    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.

  • @ChrisM541
    @ChrisM541 8 місяців тому

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

  • @xthomas7621
    @xthomas7621 8 місяців тому

    What!?!

  • @theladyjaiproject576
    @theladyjaiproject576 8 місяців тому +2

    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)

  • @GavinCawley
    @GavinCawley 7 місяців тому +1

    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.

  • @jarvijarvson3319
    @jarvijarvson3319 8 місяців тому +5

    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 8 місяців тому

      @@SOLDAT_MENDES this seems like a chat jippity response

  • @treym2k
    @treym2k 6 місяців тому

    K&R ftw.

  • @kateBeatriz
    @kateBeatriz 8 місяців тому +1

    14:55 copium

  • @infinitivez
    @infinitivez 8 місяців тому

    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.

  • @ilanelbaum7605
    @ilanelbaum7605 8 місяців тому

    היי

  • @jieqiyuejie8277
    @jieqiyuejie8277 7 місяців тому

    do you know game hacking?can you teach us ?

  • @davidtbalfour
    @davidtbalfour 7 місяців тому

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

  • @markmuller7962
    @markmuller7962 8 місяців тому

    From copycat to cat copy 😏

  • @fosteredlol
    @fosteredlol 8 місяців тому

    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"

  • @Lixt_C
    @Lixt_C 8 місяців тому

    Is it just me or the video does not play?

  • @rmt3589
    @rmt3589 8 місяців тому +1

    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!

  • @lucian6172
    @lucian6172 8 місяців тому

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

  • @TopConductor
    @TopConductor 8 місяців тому

    hehe

  • @karlohlen9320
    @karlohlen9320 8 місяців тому

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

  • @alaalmekhlafi5497
    @alaalmekhlafi5497 7 місяців тому

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

  • @Maikl498
    @Maikl498 8 місяців тому

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

  • @thinkmore8024
    @thinkmore8024 8 місяців тому

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

    • @kamil_atakan
      @kamil_atakan 8 місяців тому

      As is the tradition with every uni assignment.

  • @Alperic27
    @Alperic27 4 місяці тому

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

  • @Infamore
    @Infamore 6 місяців тому

    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.

  • @guruware8612
    @guruware8612 7 місяців тому

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

  • @Finkelfunk
    @Finkelfunk 8 місяців тому +1

    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

  • @nicosoftnt
    @nicosoftnt 8 місяців тому

    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?