5 "MUST KNOW" Tips For Using ChatGPT-4 EFFECTIVELY With Your Code

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video I'm going to be sharing with you five must-know tips with chat gbt when you are programming and this is applicable to python as well as to any other programming language that you are currently working with now the first one is more of a personal tip something you will learn real fast when you are programming with chat gbt and that is that if you ask it to create a project that is far too big or you ask it to generate far too many lines of code it might start to freeze at a certain point and if you ask it to do the same thing again it's going to start from the beginning so what's very important to do in this situation as tip number one is to ask it to finish the remaining code not to start from the beginning but to continue from where it left off and as you can see if you just specified in this wording you'll be able to continue with that script so you can get the full code back without having to wait for it to regenerate all of that and it's actually a massive tip because I've had to wait many times with Chachi pt4 because sometimes you just ask it too much and it does have a limit so it looks like it just gets stuck there and because of that you're going to have to ask it to continue where it left off tip number two has to do with learning programming before you start using chat gbt I do not recommend to use chat gbt to learn a programming language because a lot of the information it gives back to you is just not accurate it might teach you that parallelism and concurrency are the exact same thing you never know what you're going to get back from Chachi BT so as a rule of thumb learn the programming language before you start using chat GPT because what it gives you back might not be that easy to edit unless you have prior knowledge to how the programming language works and you can create full projects you can make great projects with chat gbt as long as you have a preliminary understanding on how the language you you are working with actually works and that also goes with architectures and so on you need to know what you're going to make before you start asking chat gbt to make it because sometimes it will give you a lot of code back that might not work on the first run but if you literally remove or add a single line of code you might have a full working app just because you knew exactly what it did wrong tip number three maybe you have an app that you've already created and all that you're missing is some documentation for it well with chat gbt you can copy and paste in that code although for this example I actually asked chatgpt to create the code first such as create a fully functional currency converter in Python it managed to do that with no problem and a very good tip for this section is asking it to create a read.me file and this is perfect for GitHub because it's going to go through the code that you generated or the code that you've copied and pasted in and it's going to give you a very nice readme message so it's going to tell the user that this is a simple command line based currency converter for example okay which uses this API over here then it also mentions the dependencies and how to install it then also how to run the bash command and maybe this isn't formatted in the best way so you are going to have to copy and paste in some of these sections but as you can see it's writing all the documentation for you so this is a massive Time Saver when it comes to your projects because I mean obviously we can write it ourselves but if you need an outline for the project you just shared on GitHub this is the way to go because this will give you the perfect template for continuing with your documentation tip number four which can really improve the way you program is asking chat gbt to create some test cases so right here I asked it to write test cases in Python for the following function and the function I provided is quite ridiculous it is a function that take say text and returns that text so it does nothing but just return the text that you write but what's so great about gpt4 right now is that it generated many test cases for that function so this function could have been more complicated of course but with chatgpt took care of was creating all of these test cases and we can actually copy this code paste it in testing and I'll make this smaller since it doesn't really matter how big it is but you'll see that it's going to import unit testing and it's going to test this function in all the ways possible it's going to assert that each input is equal to the output so if we run this class and we run all these tests all of them are passing which is great and that saved us a lot of time from having to write these test cases ourselves now as with everything gpt4 generates it is good to go over the code that it does generate because sometimes it might generate something that doesn't make sense even if it's going to generate a lot of useful code so again gpt4 is really good for brainstorming but you might be missing a test case in here such as what happens if you insert an integer it didn't really test those other cases of inserting elements or types that are not compatible with the string function so there are some things that are missing here but for the most part it saved us a lot of time the final tip is to use gpt4 to explain Concepts in a way that a child can understand or in a way that just makes it a lot easier for you to grasp because maybe you started learning the difference between concurrency and parallelism but it's still very confusing so one thing that chat GPT can help you with is understanding the basics so that after that you can go back to the complex explanation in the documentation and you'll grasp it much easier for example here we can ask what is the difference between concurrency and parallelism in programming explain it so a child can understand and maybe it would be nicer if we added an age such as a 10 year old child so now Chachi PT is going to try to explain this in terms that a child of 10 years old can understand so now I'm going to let this generate and I'll get back to you as soon as it's done generating so Chachi BT generated this simple explanation that tells us the difference or explains to us the difference between concurrency and parallelism so I'm not going to read what it wrote all I can tell you is that it did get it quite correct and it did simplify it significantly you're more than welcome to pause the video and actually read this if you are curious to see what it says but this is something that can really help you with understanding concepts in programming especially if you're new to programming I don't see anything wrong with using this approach but it's still very important that you do check the official documentations and possibly watch some YouTube tutorials to make sure you're on the right track because Chachi BT does confidently give you wrong information sometimes but for a majority of cases if you already know what is wrong and what is right all it does is speed up your daily productivity with writing boilerplate functionality that you yourself do not want to write but anyways I hope you found these tips useful do let me know in the comment section down below if you have any other tips for Chachi BT because there are a lot of things that you can use in chat GPT to actually improve your productivity and the possibilities as always are endless but anyways with all that being said as always thanks for watching and I'll see you in the next video
Info
Channel: Indently
Views: 2,769
Rating: undefined out of 5
Keywords: pyton, pyhton, pythn
Id: RejroGopseg
Channel Id: undefined
Length: 7min 51sec (471 seconds)
Published: Sat Mar 25 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.