Can ChatGPT Actually Teach You How To Code?

Can ChatGPT Actually Teach You How To Code?

Show Video

it's no secret that chat GPT is pretty impressive but can it actually teach you to code entirely on its own well today I'm going to put that to the test using just chat GPT I'm going to attempt to learn the C programming language now even though I do have some experien programming I'm going to act like a complete beginner and I'm only going to do exactly what Chad GPT tells me to be honest with you I have no idea how this is going to go so stick around to find out now let's just be honest here if you want to attempt this on your own you're going to need to know a bit about how chat gbt actually works now fortunately HubSpot has a great free resource called using chat GPT at work which breaks down exactly how to use chat gbt as effectively as possible it's a bundle that gives you a comprehensive overview of how the tool works it also gives you some best practices and expert insights now I've left a link to it in the description and you can check it out completely for free this guide contains a decision flowchart templates for set and clear guidelines an AI generated content refinement guide and even an AI adoption checklist it really breaks down how to best utilize this tool and make the most of its capabilities to increase your efficiency and your processes and if that wasn't enough there's over a 100 prompts that you can start using immediately personally my favorite part of this resource is the guide that shows you how to supercharge your workday with chat gbt which is a game Cher for daily productivity this resource and tons of others are provided for free by HubSpot a massive thank you to them for making all of this available and for sponsoring today's video so first things first we're going to need some kind of plan or road mapap I don't really know anything about C or how you're supposed to learn it so let's see if chat GPT can help us with that okay so I just asked it hey I'm looking to learn the C programming language act as though I'm a complete beginner and give me a road map or guide on how I can learn this language so this is pretty straightforward but let's see what it gives us for this and I want kind of my goal for this video to be to create an entire project using C and again I'm just going to do whatever chat GPT tells me I'm going to act as though I'm a beginner and I'm just going to follow along with all of its instructions and see if with good prompting it will actually get me in the right direction and we can kind of achieve that goal so it's giv me a bit of a road map here but as I'm reading through this it's extremely vague for example you know what is programming basic computer architecture how computers understand and run programs mean I don't know if we really need to learn that to understand C I install a c compiler okay that's good it's giving me a few options here but it doesn't say how I'm able to write compile use the compiler what a compiler is learn the syntax and basic concepts okay I guess that's good dive into more complex topics overall it's super super vague and it's not really giving me any actionable things to actually do so I'm going to try again and ask it to adjust it to kind of like a checklist of topics so I have something a little a little bit better to follow along with because right now if I was a complete beginner and I just had this I would already be pretty lost all right so I just asked it to revise this and give me a list of topics in some logical order so that I can kind of follow along with those step by step I think that's a little bit easier and then we can just tackle each step at a time so let's get it to finish this list here and then we can start learning these in this order all right so that is a much better list here and what I've done is I've just taken it and put it here in a Google doc just so it's a bit easier for me to follow along and keep track of my progress so what I'm going to do is just go through this step by step let's begin by seeing if chat GPT can show me how to accurately set up a compiler and how to use that and kind of get started on my computer okay so next step we're going to get set up with our C program programming environment so I just asked it to walk me through that and assume that I'm a complete beginner now it tells me there's different steps Windows Mac Etc on Mac it says open the terminal type this follow the onscreen instructions so let's copy this command here now we'll assume that we already know how to open the terminal but if you're a complete beginner you may not even know how to do that or what the terminal is however I'll bring the terminal open on the right side of my screen let's paste that in and move this to the left and let's see what we get it says xcode select error command line tools are already installed okay so I'm going to copy this and ask chat jbt what to do about that because if I was a beginner I may not actually know and also I'm assuming that for this command to work you need xcode to be installed which I already have installed if you didn't have it installed I think this probably wouldn't work and already you would be stuck so I'll just say hey I'm getting this error in the terminal can you help me okay so let's see what it says about this so it pretty much told me here that this is good news because it means I already have them installed so I'm going to skip the rest of the steps here but the fact that is giving me all these new commands again that could be confusing for a beginner who might just want to copy and paste everything that's inside of here anyways I know that these are already working so that's fine so let's move on to step two which says choose and set up a text editor or IDE so it says vs code go to visual studio code website and download the installer okay I've already done that run the installer and then install the extension so let's open up vs code and install that extension so vs code is open here obviously I know how to use this but as a complete beginner I would assume that you would have no idea what this tool is how you use it or even what an extension is or how to install that so let's ask chat gbt how to install the extension how do I install the C C+ extension in vs code remember I've never used this before let's see what it gives us with that all right so fortunately it's giv me some pretty good instructions here and it tells me how to access the extension View and then to search for this extension so let's go ahead and do that c/ C++ okay by Microsoft let's go ahead and install that so the extension is installed let's go on to the next step here which is to write compile and run a simple program so we're going to create a new file let's assume that we can figure that out so let's go here and make a new file we're going to save this as hello.c okay I'll just replace I was doing this for let's copy this code and paste it inside of here so now it says to compile our program we're going to need to open up the terminal and we're going to type the following command so Mac OS okay let's copy that now I'm going to go through this as if I know how this works but I know for many beginners first of all they're not going to understand you actually need to save this file which I just did they're not going to know how to open or create a new file and they're not going to know how to open up the terminal or the command prompt with inv vs code or navigate to the correct directory so it's skipping over a ton of different steps for the purpose of this video and not to drag it on I'll just go with how I know how to actually do it but for 90% of people that are just starting out there's no way they're going to be able to follow this uh without some more detailed instruction or knowing to ask the right questions so anyways let's type this here and see if that actually works okay so it looks like it did however I didn't get any output so what does it say here run your program after the compilation type do /hello okay and are we going to get some output here we did we got hello world okay so Step One is complete we've been able to write our first program so let's check that one off the list here let me just make this green let's move on to step number two all right so as we move on to step two here I'm realizing there's going to be a lot of prompts and a lot of output so in the nature of not boring you I'm going to fast forward through quite a bit of this go through these steps on my own and we'll see how far I can get without any significant issues so I've got to a point here where I'm asking it about operators and already I'm noticing a huge issue that I think I'm going to keep running into as I go through this so I've just asked it to explain to me the basic operators which was this step in my road map and as I've done that here it started throwing me a bunch of code that I've never seen before and it's not really building upon what we had before for example now we're doing a comma so like multiple variables in the same line it doesn't explain that I'm not sure what that is we're doing a declaration without actually assigning a value and now we're even using IF statements and we're evaluating the results of different conditions and it hasn't talked about that at all so yeah it's intuitive I guess what's going on but as a complete beginner I have so many questions I guess I could ask chat GPT that but ideally it shouldn't be showing me a bunch of code that I've never seen before already so early in my journey so we've moved over here to scan F and getting user input however I keep running into the same issue with Chachi where it's throwing a lot of stuff at me that it hasn't explained at all for example we're looking at character arrays which I guess in CR strings I don't even know because it hasn't explained that we're looking at using this Ampersand which is getting the pointer or the address of this variable now I've asked it some questions about that but the same issue keeps popping up where it keeps throwing really complex explanations using a ton of terms that I just know many beginners wouldn't understand obviously I can understand most of this because I know how to code already but even some of the things it's mentioning to me an experienced programmer are quite confusing and really overwhelming so I'm going to change my prompt style a little bit and see if I can get it to give me kind of little Snippets of information so I can work through it a bit slower and not get overwhelmed with so much code all right so I've adjusted my prompting style a bit and I've told it to really focus on giving me bits of information and then asking me if I understand it before we proceed now it's kind of done that it's definitely doing a better job now and let me show you kind of the output that I'm getting so it gives me a small bit of information quick example a little bit of an explanation and then it tells me okay try this so some kind of exercise which is definitely better than what we had before and then it also asks me if it's good and if we can move forward to the next step now I don't like the fact that it just automatically gives the next next piece of information I'm sure I can tell it not to do that but at least it's giving me little logical sections that I can read and Approach at once this is significantly better than what I had before what I'm realizing already is that you have to be really really detailed with the way you ask chat GPT and even within a lot of these explanations for example we get into things like a switch statement it talks about a fall through so where's that yeah from falling through the next case but it doesn't explain what that is so in anytime you see information that hasn't yet been explained you have to ask it to elaborate which is what I did with the switch statement so explain fall through and then it will give you a really good explanation but you can't really rely on it to explain all little details you would need to understand to get good at program so just to give you quick update on my progress here I've made it all the way up to recursion so I've just learned of a functions now I'm doing recursion honestly I don't love the order in which it's giving me all these things this is not how I would teach this if I was going to teach to complete beginners but we're using chat GPT and we're following along with what it says so we've just written a Fibonacci function we just looked at what was the other one it showed us um calculating a factorial it's getting us into even some algorithm type stuff already before we even understand things like arrays or other compon components within programming but we're following along with it so let's see how far we get so another small note for you guys I'm looking at pre-processor directives which to me seems like a pretty complicated thing quite early in my learning uh anyways as I've gone through here it's shown me a few examples for example like using the this if L if else so I just assumed okay I can just you know throw this outside of my program right like I can just put it up here and say if debug print something out but that started giving me an error so trap gbt was able to fix that error for me it told me why I was getting that issue what I'm really noticing is that it's not being very specific and it's not explaining any prerequisites where I need to put the code it's just kind of assuming that I'm going to figure it out so in this area where this is something that I've actually never seen before I've never used it already I was a little bit confused on where I use this why I use it how I would actually end up using it yeah I can figure it out but it's taking me a little bit longer just because it's kind of misguiding me are giving me some information that's not really in the correct context so it's been a few hours now I've been messing with C I've been learning with chat jbt I did some exercises I did a few mini projects and I feel somewhat comfortable with the link which I've learned some of the new features like the pre-processor directives structures dynamic memory address allocation macros all those kinds of things however the order in which I was taught it was definitely very strange and I had a lot of uh kind of bumps and issues while I was trying to learn these topics so at this point what I want to do is share with you what worked well here what didn't work at all and what my tips and general advices for using chat GPT to learn a language or to learn really any programming concept so first of all let's just get this out of the way the only reason I was somewhat successful here and could learn even some of these new C features is because I already know how to program I'm a very experienced developer I've worked in many different programming languages I've seen a lot of these features before or at least similar features with different maybe syntax and that's why I was able to pretty quickly learn a lot of these new topics however I can tell you as someone who teaches a lot of beginner programmers this skips so many prerequisites assumes so much knowledge and really very quickly jumps you into a lot of advanced topics without obviously knowing if you understand them or even breaking down the fundamental concepts that allow you to understand those so yes for me this was okay for someone who's an experienced developer sure you can learn in this format but if you're a complete beginner and you're using something like chat GPT there's no chance that you're going to be able to pick up everything you need to actually move on to those more advanced topics and not get overwhelmed and confused now with all that in mind let me share with you what I think this is actually really good at so the First Advantage that I found is that this is extremely fast I don't think I've ever learned stuff as quickly as using something like chat GPT and that's simply because I'm already experienced enough that I don't need like a long drawn out explanation I don't need to watch a whole video or a long tutorial series I can just instantly ask a question and get the answer very very fast so that's the first thing that I appreciated it's just super quick it spits out anything that I want immediately and it's a single source that I'm using I don't need to go and look at all these different resources online I don't need to find a really good course or curriculum I don't need to scan through documentation and with that in mind even if it doesn't give me what I'm looking for right away I know how to adjust the prompt in the question to get what I want so I can ask it to give me a different example to give me a code snippet to copy in to walk through the code line by line if I have a question or a doubt there's an area that I don't understand I can immediately have that solved and have a new explanation or a new example whereas if I was using something like a course or document ation whatever is there is all that I have access to yes I can go search for something else but that's going to take me quite a bit longer and jumping between 10 15 20 different resources just isn't efficient and it's going to kind of lead you along like a path where you're just going back and forth zigzagging and finding all different kinds of information from all different kinds of people so that's what I really appreciated here just the speed at which I can get information all I have to do is just come up with a decent question and then I can really focus in on one area and get any doubter question question I have answered immediately now with that in mind let's talk about all of the negatives so if you are someone who doesn't really know where to start you don't already have a curriculum or a road map and you go to chat GPT you're going to be brought in so many different directions and it's not really going to guide you very well on what you should learn and in what order we saw already here that I asked it for two different versions of a road map for learning C they had some good topics but the order was really weird it's a non order that I personally would ever recommend for learning a l anguage it was showing me some Advanced features after I just learned about if statements or functions for example we're getting into recursion before we even talk about arrays or strings or we've even ridden a sampled program it's showing me memory addressed pointers and all these Advanced features and assuming that I know them when I've never even written code before at least that's what I was trying to simulate so it was just a really backwards order and kind of a weird way of going through things and you can't rely on that being a good curriculum I think for me that was the biggest realization is that yes it's giving me something that seems good in the moment but if I was someone who's never done this before I wouldn't really want to rely on this and I wouldn't know if it was actually guiding me in the correct direction so it's one of those things where it kind of speaks with complete confidence says yeah this is what you need to do so it seems like the right thing but when you know better you realize that you can't rely on a lot of the information that's being provided to you so with that in mind what you would really need to do is go find some curriculum that's solid that's vetted that a lot of people have followed through with or from a reputable source take that and then use that to kind of guide your journey in chat gbt where you could focus in on more specific topics now even Within These topics though what I realized is that chat GPT is very bad when it comes to assuming knowledge even when I explicitly told it to treat me like a complete beginner that had no prior experience it still assumed that I had software installed that I knew how to navigate my computer that I knew what different programs were I know how to save files open files how to get to the terminal there's just all these different things that you might not think about now as an experienced developer when you're starting out there are huge roadblocks and they're really frustrating so overall the biggest issues I found is that it can be really vague if you don't direct it exactly on what you want it really assumes quite a bit of knowledge that you may or may not actually know and you can't really rely on all the information it's giving you most of the time what it shared was correct but there was a lot of examples that were either misguided not in context difficult to follow along with or they relied on some previous know that I didn't have so with all of that said let me give you a suggestion on how to use chat gbt more effectively if you are learning something first of all don't rely on this as your primary source of information get some kind of video course obviously I have a bunch I have one with course careers you guys can check out or I have a bunch of free ones on my channel go to some kind of documentation just find a reputable resource where you know the person teaching it is actually good at teaching has experience with it and isn't going to skip over fundamental topics use that as your primary source of information where you learn the Core Concepts and you know that nothing critical is going to be skipped over now while you're going through that have chat gbd open maybe on another window and a different Monitor and use it as a personal tutor and something to really quickly give you feedback and answer questions that maybe aren't covered by some kind of asynchronous course for example right if you're watching a video of mine you might have a question I don't cover that's where chat GPT comes in where you can really have a focused discussion and a focused answer on one very fine grained thin you don't want to go to chat gbt and say hey teach me for Loops it might be able to do that but it's just really unreliable and you're going to be brought in all different kinds of directions whereas if you can go in there say hey here's my code it's not working can you help me with that that's a lot more of a detail answer and something chat GPT is quite better at doing so with that said guys I'm going to wrap it up here I hope you enjoyed the video if you did make sure to leave a like subscribe to the channel and I will see you in the next [Music] one [Music] oh

2024-03-13 16:26

Show Video

Other news