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
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
7 ай бұрын
Have you tried copilot?
@PffScrub
7 ай бұрын
Would've been cool if you did an AI assignment video with a language you're less or unfamiliar with
@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
7 ай бұрын
how many times did you say cat in this video
C++ is temporary but cherno saying, "the video link's up there" and the video not being there, is eternal
@TheAzraf123
7 ай бұрын
Realest shit ever
"Let's program like a beginner, with AI" > Programs like an expert with minimal AI input.
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
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
7 ай бұрын
well, before ai there was stack overflow, which is also copy paste, don't tell me you didn't use that either? ;)
Honestly I enjoy seeing videos like this as your c++ tutorials were the main thing that helped me get through my college assignments
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.
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.
You know it's a great video when cherno posts a video to ease the stress of a first period math test
@rmt3589
7 ай бұрын
I miss math tests so much! Wish I could take it for you.
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.
Would be to super cool to see this tested with a more advanced topic, such a graphics programming. Great video!
I learned something new today! I have never heard of cat cafes before this. That is awesome!
you are unreasonably fast at editing code with visual studio
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
I really like the new lens! The view is amazing!
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.
You know you're early when its stuck at 360p resolution..
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
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.
This is just showing me how poorly taught my C++ class was
Looks like magic, it's hard to believe that we're already at this point with AI
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.
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 :)
@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.
I love how simply adding cats makes it more interesting.
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.
Hi, have you considered sharing the VS theme you're using? It looks great!
@louisrigal7015
7 ай бұрын
Looks like monokai !
@dufy8547
7 ай бұрын
@@louisrigal7015 I don’t think it’s monokai honestly
@aj-jc4cv
7 ай бұрын
Looks like visual assist theme.
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
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.
can you please make a video on APIs
Quigly. Quigly is the guy dissing the OOP here.
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
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.
Imagine he would actually put the link up there, no there. I can't remember.
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!
The videos u suggested werent linked up there 😂
I love chatgpt for ideas but when it comes to accuracy it’s mostly wrong 😅
When are the ray tracing series?
videos arent linked up there!!!!!
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?
What visual studio theme did you use in this video? Please let me know!
"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 😢
13:30 next time you should ask it to make a test cases for you :)
I wish I could visit a cat café. 🥺
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
Supr bro it's amazing notification view attendence
The Cherno in 2025: I used AI to make my new game engine
@Aerthran
7 ай бұрын
The RoboCherno in 2035: The Cherno powers my new game engine
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.
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. :)
I think you could consume negative amounts of treats to create more of them
Why don't you just configure vs in order to do auto formatting?😅
This is a bit freaky, but also funny because of the amount of times you must prompt chat GPT and clarify.
Can u get back to the ray tracing series plz
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
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)
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
7 ай бұрын
@@SOLDAT_MENDES this seems like a chat jippity response
I dedicate my CS degree to AI and my burger flipping job, because no one needs junior developers any more.
@anon1963
7 ай бұрын
obviously false
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
7 ай бұрын
OO is the single worst mistake in programming history
Best.
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.
FP < OOP.
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.
Lmao if my studenst of 1st year, first assignment comes with a transform I would know something is odd rofl.
honestly: OOP is good. IDEK why people hate it so much
How about making Hazel a state of the art real game engine
@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.
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
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
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.
Hey cherno! What you think about new c++ succesors cppfront, carbon? I'm really looking forward to a video about this
😊
do more AI stuff
I see this as nothing more than a threat and a blessing for lazy cheaters.
@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
What!?!
From copycat to cat copy 😏
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.
K&R ftw.
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. 😅
I tried the free game but it's running slow and the materials don't show properly.
14:55 copium
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!
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"
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
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
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
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.
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 !!!
היי
do you know game hacking?can you teach us ?
hehe
I make AI write my regex... i hate regex...
Is it just me or the video does not play?
This is the most beta, soy assignment I have ever heard of.
@kamil_atakan
7 ай бұрын
As is the tradition with every uni assignment.
I absolutely approve AI chats.
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.
رجاء ضيف لغة العربي لترجمة في فيديوهاتك
the goal was to use AI … not show how U want to do things….
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
ok... non hallelujah-post are getting deleted, that much about freedom of speech. unsubscribed - kinda-lika
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?