Best ChatGPT Prompts to Learn Coding (the ULTIMATE method!)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in the olden days before chachibiti was round learning coding were a new technical thing meant having a million tabs of stack Overflow open staring at your code for hours not knowing where the bug is coming from until you finally realize it's because you brought a semicolon instead of a colon these days I haven't used stock overflow for months I don't stare at documentation anymore I also don't stare that much at my code anymore trying to find a bug especially I'm honestly so jealous of people who learn how to code with Chachi BT so in this video I'm going to share with you guys my favorite Chachi PT study tips for learning technical things so much faster and do stay till the end of this video because I'm going to show you guys a supercharged method where you're combining all these tips together to produce something even more powerful finally before we get started I just want to make a plug for my newsletter called boobs keyboard it's about learning it's about coding it's about self-studying and AI tips and it's completely free so you should check it out over here also linked in the description alright let us go so my favorite charging Beauty self-study tip is definitely what is called the gameplay prompt so I'm I'm going to show you guys what that is so pulling up Chachi B2 over here I'm going to copy in a prompt that we have let us look at this so it's called The Prompt is called let's play an interactive visual game to Learn Python using Naruto because it's my favorite anime um I should have to write python to navigate through the game so as you can probably tell by the prompt it's a way of learning python coding using Naruto so it's so much more entertaining than your traditional way of doing it and it's interactive alright let's embark on an epic adventure through the hidden Leaf Village in the world of Naruto using python so here's the background story you wake up to find yourself in the mystical ward of Shinobi where Ninjas possess magical abilities you're in a hidden Leaf Village it plays brimming with aspiring Ninjas the villagers have heard stories of a mysterious artifact that holds the power to print prosperity to the Village or Doom it to an eternal curse damn a prophecy states that a stranger from another world you is destined to either secure the artifact to the good of the Hidden Leaf Village or unleash a cataclysm cataclysm bad no we do not want cataclysms as you're getting your bearing your spot to Naruto is a marquee training near the entrance of the village he seems excited to meet you as he has heard the prophecy too Naruto wants to join you on your quest to find the Arctic hat artifact all right okay so it's an interactive text-based game so it's setting things up over here you can have your inventory and you can also check your location and you can help help if you have a hint so right now we don't have anything in location to Hidden Leaf Village entrance so there are some options that you can do so we can have these different choices accept Naruto's help and ask them to join you visit a ninja tools shop to see if there's anything useful start exploring the village without Naruto's help because you're an independent person as an Naruto about the artifact and its history please write a python code to choose what you want to do so let us actually try this out so let's say our choice is going to be equal to oops I did it wrong the choice is equal to four it's called The Leaf of Ages it's said to be a leaf that never wilts and has inscriptions in the First Hokage damn so if you do want to try out this prompt yourself and potentially play the game too check out the link in the description where you can get access to this prompt as well as the other prompts I'm going to be talking about uh throughout this video as well second it's actually Beauty tip for helping you sell study technical things so much faster is by using it as stack Overflow especially if you need to do something specific chadbt is really help for that so let me show you guys an example say you need to do something in your python code that takes a nested list like this so it's like a nested list with food carrot mushroom candy and another list with animal cat dog and elephant and turn it into a dictionary so take the first element like food and the key and the make the rest carrot mushroom candy into the values so something like that right you can ask Chacha PT to write you the code to do this press enter certainly you can achieve this by iterating through each of the sub lists in the nested list and it will actually write the code for you to do this super helpful next tip for using chapter to self-study coding and technical things is by using it to generate different ways of solving a problem so let's jump back to chapter BT so we're still going back to the this example over here right where there is a solution that's being given um but what's really helpful when you're learning something is by understanding how you can approach and solve the same issue or same problem with different ways that allows you to have a deeper understanding of what it is that you're trying to learn so you can ask Chachi PT something like can you give me three different approaches to solving the above problem also provide a description and breakdown of the efficiency of the method so from this example here's three different approaches to convert a nest to listen to a dictionary each with its own characteristics and efficiency first one is the example that was shown earlier which is looping through the list so your it tells you what it is that it's doing and also gives you the time complexity o of n as well as space complexity and it has the code over here so the next step that I have for you for self studying at technical things with chat2bt is by using chatty BT to help you make projects so I feel like for a lot of people when you're first learning technical stuff and you're just like learning it it's hard to come up with projects that are interesting to you and relatively unique um and just like is able to help allow you to use the skills that you want to be practicing well Chacha beauty is really great for this um and here's a prompt to illustrate what I mean so here we have act as an expert coding tutor and make a python project for me as if as if I'm someone who just started coding and is especially struggling with object oriented programming so I'm able to provide more detail about where the emphasis should be I want to be able to do this project in less than five hours because I don't want to be spending forever coding and it should be about obedo fighting Naruto which is clearly what I'm interested in and you press enter alright since you're a beginner Target object oriented programming I'll keep this project simple I'll guide you through creating a mini textbooks game where Obito finds Naruto hope Naruto wins Naruto better win let's break her down into steps and it has classes for characters and it tells you what to do oh it actually shows you what the code is in this case if you are learning though I don't recommend you actually look at the code I recommend giving an attempt first and then referencing the code that's being provided to see what mistakes that you've made how it is that you can improve stuff so so it also says it gives you an explanation for what's happening and then finally this project should be a good starting point for you to get familiar with object working programming in Python you can expand this project by adding more characters more complex AR Logic for the opponents special abilities Etc as you become more comfortable with coding happy coding so this is a way of coming up with exciting projects that you're interested in doing the next tip that I have for you on how to use Chachi BT to self-study things faster is by using it to comment code this is especially helpful if you're pasting a code snippet in and you're like I don't know what this code is doing and instead of just like figuring out line by line and just copy pasting it into Google and looking at stack Overflow you can get tragic BT to annotate the code and explain to you what it's doing step by step really really helpful tool on chappie GPT we can write and then we can copy the code here so in this case I have a Fibonacci function declaration so let's see what it does so we have over here is definition of Fibonacci and it tells you okay this is a little bit hard to read over here but it says Define a function that name Fibonacci that takes a single parameter n um and then we can see that for each line if the input number n is less than or equal to zero then you return an error message stating that the input should be a positive integer and then it talks about the input number n is equal to one blah blah then it does this so it goes through it explains step by step what the code is doing also here recursively calling the Fibonacci function turning some of these two calls if you're learning a recursion for example this would be really helpful in understanding how recursion is being used in this instance I especially like using this to say like I'm like reading through documentation or something like that and then sometimes they would have like example code Snippets about to illustrate like how it is that you can use a certain API I'd like to copy that into chattybt and ask me to explain to me what's happening in the example that was provided so for example what you can have here is you have a post request that's here for the YouTube API and then you can write can you comment in line the following code about what it's doing and then it says this code represents the HTTP root post request to add a video to a playlist on YouTube via YouTube's data API and then it breaks it down for you oh apparently there was a small mistake in the provided Json payload as well well thank you Chachi PT this is an example of how chachapita can identify areas in your code as well um yeah so this is really really helpful I find that instead of just like screening through documentation if I just put the examples that are provided it helps me learn a lot faster what it is the code is supposed to be doing so if the song goes on to the next study tip so say like wrote some code and it's producing it's not producing the results that you want maybe it has an error in it so you can use chat GPT as a way of debugging your code pointing out what the errors are and then fixing it please fix this code for me so there's syntax area in your code due to non-ascii character before the last return statement also in the second entire statement you're trying to concatenate a string an integer which will cause a type error so it explains to you what's wrong with your code and it fixes it and also gives you some very intelligent suggestions on what else to do um from here and kind of adding on to this as well you can also ask it to give you commentary about what he thinks about your code how to optimize your code as well this is again really helpful because essentially like having a much more experienced programmer point I do code reviews for you and point out where it is that you can be improving and this is so huge because so much of like learning to code it's hard to like learn by yourself and improve by yourself because you don't know what you don't know right so you don't know how to optimize certain things but cha gbt really helps you do that because it just it's like a coach it points out to you where it is that you can be optimizing can be improving it's a game changer it's definitely a game changer the next tip that I have for using chapter to learn how to code in other technical things is to use it to translate between different coding languages so say say for example you already know how to code in Python for your learning Java as another coding language and you come across something that you want to do in Python that you know how to do and you want to be able to do that in Java as well so what you can write in chapter is like translate this python code into Java and you can paste a code over here in this case it is a function for reading a file so it's reading a file returning its content as a string and it goes on to do that and it's a full it also has like errors over here with exceptions and then it's this is which has become a chatpt came up with the following Java code accomplishes the same task as the python code provided it reads the contents of a follow returns as a string the file is not found in terms and error messages any other exceptions occurred turns a different error message with details of the exception so it's able to do all of this damn this takes me back probably it has been a real public static void main this has been a very long time since I wrote Java code um but yeah this is an example of how you can do this and also gives you a nice explanation for the translation of that code for your new thing super super helpful the next tip that I have for tattoo BT to self-study so much faster is by asking you to use analogies and examples especially when you're learning technical things what can be really helpful is understanding by using analogies of stuff whereas it's kind of like abstract and hard to understand and also examples when you see full examples for how things work in a practical sense that helps a lot solidify Concepts that you're learning here's an example of going to Chacha Beauty and jumping in here act as an expert coding tutor and explain to me dynamic programming using analogies and examples so this part over here is called the Persona pattern and it's part of some of the tips I use for prompt engineering so if you do want a guide about using prompt engineering like prop engineering crash course one-on-one do let me know in the comments and I can do that but it's this dynamic programming is a concept that has baffled me for ages do I truly understand it now no I don't think I truly grasp it even now but say like you know when I first started learning I was like so confused I didn't get it and I can use Chachi PT to help me understand the concept better by asking to explain to me using analogies and examples so it's telling me certainly dynamic programming is a technique used to solve complex problems breaking them down into smaller manageable sub problems and then storing the results of these sub problems that they can use them later let's use an analogy and then dive into some examples so analogy is that you're imagining you're trying to climb a flight of stairs and you can either take one step or two steps at a time you're curious about how many different ways you can climb to the top so it goes through this full analogy over here and then it also goes through an example such as using Fibonacci Sequence and a coin change problem and it gives you a brief summary I think something else that would be really helpful as a follow-up is can you write the dynamic programming code Solutions versus [Music] not using dynamic programming so here's like a follow-up question that you can ask okay so fibrology is a community recursive approach over here and then it goes the memoization for dynamic programming this is how it is how it would work since I have a classic example that we're giving over here hopefully you can see how useful this technique is when you are trying to understand like certain Concepts in any technical subject really or pretty much I would say like in any subject in general but I think especially helpful in technical subjects the next tip that I have for you guys is for when you start learning a little bit more uh technical stuff then you start needing to look at other pieces of Technology other pieces of software and then being able to interface that with whatever it is that you're building usually through an API of some sort as you're doing this usually there's like a lot of documentation that just like showcases the way that you're able to do these API calls how it is that you're interfacing me personally I don't have the patience when I sit there and read documentation I'm just like uh you know not not my thing it's like so there's usually like a lot of documentation available so for example here is the documentation on openai in order to use their API for the open AI models um so as an example you can see there's like a lot of stuff going on over here it's like all these things oh my God all the stuff that you can do right so I am not the kind of person that has the patience to read through documentation uh this is the completions endpoint so instead of reading through all of this this would be really helpful in helping me figure out what's actually happening over there so for example here can you please do it for this documentation and as it's providing the results what's also helpful is after you you tell it what the documentation is then you can ask it to start creating uh what you need to do for that specific API quality how do you actually use um what's being written in the documentation and be like okay given that this is the documentation how do I write the function to do this so this is also super helpful okay uh so it does all of this you know shortens it a lot and it says documentations for opening as API endpoint that generates text completion for a given prompt you can make a post request find this to use the service here to parameter so let's see all the parameters and gives you a brief synopsis of that this API employees useful for tastic chatbot responses condo generation M1 provide providing a problem and having a model generate appropriate textual completions so really helpful when you're learning how to use a new API we're just trying to understand um some new Concepts that you have instead of reading through all the things okay guys are you now ready for the ultimate supercharged method of combining all of these tips hacks and typing together to create something that is even more powerful okay so we have all these tips and techniques that are available um and you can copy those prompts in to do like the things that you want it to do which is really nice really convenient um however save your learning something generally you'll be using a lot of these techniques and tips consecutively where at the same time even so while you're doing this it gets a little bit annoying because you have to keep inputting the context that you have every single time and then inputting the prompts as well and then if you talk with like cha GPT for a little bit longer what ends up happening is that sometimes it forgets what the context of what you're doing is so what I want to show you guys here is how to create essentially like a version of an AI tutor that's able to do a lot of things that we talked about previously so I'm gonna go through and break down the prompt now so your name is your LGBT a personal coding tutor that has the personality of jiraya from Naruto do you guys think that Uriah is a better Sensei or Kakashi you first say hi to your student that is again in that is you then ask them what they want to learn you can tell them to input any of the following so I put three different ones over here as an example but you can also put in extra techniques as well so the first one I have is called variations number topic the second one is make a game for learning topic and explain topic and I'm gonna go through each of these and explain how that works so when the user writes make a game for learning topic play an interactive game to learn topics you're giving an instruction when the user types that you're making a game specifically for learning that topic the game should be narrative Rich descriptive and the final result should be pieced to get piecing together a story describe the starting point ask the user what they would like to do the story unravels as we progress step by step the next command I can give it is variations number topic when user writes variations number topic provides variations determining the underlying problem that they are trying to solve and how they want to how they are trying to solve it list number alternative approaches to solve the problem with compare and contrast the approach with the original approach implied by my request to you so this is an example of what we were talking about earlier how it's really helpful sometimes to have multiple ways of approaching and solving a problem it's really helpful for Learning and the third thing that we have here is explain topics so when user has explained a topic then it actually gives an explanation assuming that the user has very little coding knowledge and then ask you for a first task and it also shows that cap stock are placeholders for quanta inputted by the user so what is really happening here is that you're creating this AI tutor for yourself called Girard GPT because you know have a little bit of personality and you're getting it to have a menu options of different things that you can do and you're telling it like for each menu option how it is that you can enter it and then what it's supposed to do when you enter that menu option this is really helpful because it's like this ultimate prompt that you can also add on like additional menu options as well and from doing this you can interact with it and then you don't have to like repeatedly type in something that you wanted to do where like it forgets the context of what you're talking about and then you have to input again uh the contact so it's all like written here and then using this you would get the response here hello young it is a pleasure to meet you the name is Girard GPT but you may know me as the toad Sage of the coding Mountain I'm here to help you harness the chakra of the coding Arts so tell me what Scrolls of knowledge are you seeking to master today in my young ninja Apprentice uh let's do like explain object oriented programming is the topic so ah object oriented programming where oop that is often known this is one of the fundamental jutsu's new coding are seeing has personality imagine you're a Shinobi creating ninja tools for your mission in object-oriented programming you create objects which are like different tools each with their own abilities and attributes exciting classes and objects imagine classes of open for creating a ninja tool so it's like different types of tools I could connect all make sense the quinine itself is an object created from this blueprint a class defines what attributes such as size material and methods like throw or conceal your kunai can have and object is an instance of this classic kunai crafter according to the blueprint makes so much more sense now doesn't it oh yes it actually writes out the class in Python code over here encapsulation um yeah and it goes ahead and talks about all these different things as well which are the tenants of object oriented programming and traits about it like polymorphisms and things like that you can do this and then say you want to have like variations you can also like make a game for learning this topic if you're trying to learn object-oriented programming so there you have it The Supercharged method of creating your own personal AI tutor using chat TPT if you're interested in getting this problem and also on other problems again like check out the link in the description okay so I also had a question for you guys would you guys be actually interested in watching me build out in full like personal coding tutor this is the like more crude version of it in the form of a prompt yeah I was actually thinking about building out this version and actually hosting it so you guys can use it and not just have to like copy paste it over here and there would also be more functionalities that I wouldn't be able to put in as just the prompt so let me know in the comments if you'd be interested in the video about that all right so that is all that I have for you guys today I really hope this was a helpful video for you do let me know in the comments what you think about these problems if you try out these prompts and also any other like techniques and self-study tips that you have for using chat gbt I will see you guys in the next video or live stream
Info
Channel: Tina Huang
Views: 46,652
Rating: undefined out of 5
Keywords:
Id: IaA-3FdWFm8
Channel Id: undefined
Length: 21min 16sec (1276 seconds)
Published: Sat Jun 24 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.