Fix Any Coding Error in 3 Simple Steps β
Create a Software with AIπ
2025-02-27
Transcript β
[00:00] let me show you a strategy I've been using since I was 12 that's going to be able to solve any coding era you ever receive when using artificial intelligence or just the oldfashioned way this air solving strategy is going to work for any type of coding environment whether that's cursor wind surf anything you are doing when it comes to developing software web apps anything y'all I'm going to show you how to solve all airs sound good let's jump in welcome back y'all in today's video I'm going to give you a three-step process I've been doing since I was 12 en coding then so the logic and everything you're about to see in this
[00:31] video could apply to people that don't use AI to code but if you use AI to code then guess what there's actually a new Step here that wasn't there before when I was coding when I was younger which is pretty cool today's video is inspired by a post from Nicola here asking a question when they ran into an error when it came to the sign in and sign up page using authentication and software so thank you Nicola let's jump in as a side note if you want to join this community to get access to exclusive content ask me questions everything about the board that's the price right there mosto overb description down below let's jump in I went ahead and
[01:01] colorcoded each step here for intensity if you're in the yellow range where you're in one here it's not that big of a deal if you're in red that means that like you have found yourself stuck in a loop and you're just like really hitting your head against a wall so you'll see how to solve that situation one here is going to be pretty obvious but I'm going to give you basically pointers of how to proceed in the context of solving errors in this mode one is AI so this didn't exist back in the day but the idea here is this we need to set up our artificial intelligence chatbot to be optimized for
[01:32] the type of code we're doing so what does this mean first major thing what chatbot are you using are you using the chatbot within cursor are you using the chatbot within winds surf are you using Chad gbt separately are you using Claud whatever you're using each one which you can find in the settings is going to have something called custom instructions obviously depending on the platform it's going to be named differently but the idea behind custom instructions is you're giving context before an output is even given so what is an example of this Corbin I a video showing you how to set up custom instructions within Chad gbt description
[02:03] down below card right there the steps I show here though are going to be the same no matter the IDE or AI chat bot you're using also in that video there's like a free gbt you can use to set up your custom instructions for you purpose here though is you need to set up these instructions to give context on fundamental things so you don't run into dumb errors things like what operating system are you using Mac OS Windows what language are you using in your back end python what language are you using in your front end Js yes react Bas app what providers are you using okay we're using open AI API we're also using Firebase
[02:36] and gcp just very fundamental stuff that you don't want to have show up in the chat later on you're running into an air and you're just like wait hold up just didn't even realize I was using fire base this is why this is fundamental for the first stage here is this is going to circumnavigate you out of just a lot of BS errors but as we know with AI there's something very very wellknown within the community now called a loop where you get an air you pay past it with the AI chatbot the AI chatbot says hey I got the perfect answer use this code you paste over the code it doesn't work give
[03:07] the air again and you find yourself in probably one of the most annoying things with AI development which is a loop we don't like those so how do we solve Loops that's going to bring you over to step two step two used to be step one back in the day but now we could put it as step two because AI is here for step one Google search but let me identify what you're looking for in a Google search so right off the bat a Google search is our second level Insurance when it comes to errors the things we're looking for here are stack Overflow forms Reddit forms YouTube videos that
[03:39] are answering that specific question now this is a little bit more unreliable than using AI correctly but the idea here is that this catches errors that even the AI doesn't understand how to solve I give you one very specific example of this in one of my playlists here I build out an entire back end it's like 2 hours and 30 minutes of free content so you can check that out if you want to see that but on the Firebase function specifically when we create a user for authentication I did a whole lesson on this and one of the very specific things I said in this lesson is
[04:09] that for Firebase functions you need to use a older version of a dependency then what is the newest version that Firebase currently has out so what was happening was this I'm just going to do like f for Firebase and we'll do functions and let's just grab this somewhere else so here was the situation of this right now when it comes to Firebase functions spe specifically in JavaScript the package version is like 6.01 right this is like the most upto-date version of functions if you were just to use AI to build out
[04:41] authentication you would run into a loop because AI assumes that when building out functions you should always use the most up-to-date package for the underlying service you're connecting to such as Firebase functions because it makes this assumption the 6.01 package of Firebase functions when when it comes to on user create and authentication it's just broken it doesn't work therefore strategy two here of a Google search would lead you to the answer of realizing oh wait 601 doesn't work the
[05:13] real package dependency I should be using here is 501 and we're good to go what you realize is that once you deprecate and then go down to 501 run the exact same logic everything works fine so that is a very specific example of why you would use round two here of a Google search here is General pointers of why you're even entering a loop typically of AI situation one assumptions what I just described there was an assumption artificial intelligence is assuming that for every single thing you install throughout your
[05:44] application the most up toate version of that package is the only package you should be using this is an assumption and this isn't always right as I explained in that example keep that in mind if you're running into errors it just seem like what's going on it might be assuming something is shouldn't be second reason we could run into errors old data in other words you're talking to Chad gbt about maybe open AI API documentation but the most upto-date information it has on open ai's API documentation is from a year ago therefore the answers it's giving is
[06:16] just old and is deprecated compared to what you need to do now when solving that kind of issue now lucky for you I actually created a whole video how to solve for situation 2 here so I'll leave a card right there description down below this shows you how to read any API documentation for any context using AI the Assumption one is a little bit harder to kind of find but that is where stack Overflow Reddit discussions all these different community- based resources comes into play so what is the third reason why we find ourselves in AI Loops I'm going to call this rabbit
[06:47] holes when I talk about rabbit holes here I may have like a really quick solution to this but the idea is this you you started your day cup of coffee you're going to go cine out and you start coding and you're in the exact same chair CH you started from 8:00 a.m. all the way to like 2: p.m. so you've been in that chat for hours and you're getting good answers and you keep going down this little rabbit hole but over time you're realizing the answers aren't as effective as they used to be so a real quick solution and what I've shown on this channel is basically start a new chat re-enter the new context of the
[07:18] files everything that's incurring here and just start on a fresh slate sometimes with Chad gbt Claude and these different AI chat Bots you just need to start on a freshl because when you talk a little bit too much to them they start getting confused and they start doing stuff that's just like I know that's incorrect like for example I was setting up authentication in another app yesterday and at a certain point the AI was just like we can do email signin but we can't do Google off and I'm like that simply incorrect new chat new slate so let's say none of that works we did
[07:49] step one we did step two we're still running into errors and we're just like we're lost here is nuclear button we got to get this working that is simplify here's a situation of simplify and this was a go-to for me especially in the early days of development simplify simplify simplify quick little tangent make sure you check out my front end playlist here or just search up my name Corbin Brown Git You need to set up a GitHub or some type of repo where you can set up branches and some type of saving of states of your application if
[08:21] that doesn't make that much sense don't worry just look it up basically this allows you to like if you were typing a ton in Google doc you mess up a ton it's like a history of past versions of the Google Doc that you can roll back to if you really mess up that's a little bit of side tangent but that's just good coding practices where you have your main branch and then other branches that are different versions of your main branch so you don't really mess up the one that's your main prod code beyond all of that though here is why simplifying is absolutely key so let's say we're building an application we're going at it we're going at it you don't have to have 100% competency of all the
[08:53] code that's getting put into it if you're using AI to code it I've done this in videos I've gone over why logic is more important than actually understanding the code for now what you need to understand is that you're building up that application is just not working or a part of it's not working so for example the authentication is not working you've already done step one here you've already done step two here you've been at it for hours I guess like one little get out of jail free card that I can say here real quick is before you jump to simplify sometimes you just need to take a nap sometimes you just need to sleep I've had situations where I've hit my
[09:23] head against a wall for a very specific error hours I woke up the next morning and I solved it in 10 minutes sometimes it just requires a fresh brain but assuming you did that as well and we're still here so I guess that other step will do 2.5 that's a 2.5 step but assuming we're still here you need to basically break down the application to just do authentication remove all other logic everything even as far as starting a whole new project with its sole purpose being authentication that's it when you load all the code into the AI
[09:55] chatbot the only code that should be there is for Authentication obviously whatever your issue is replace authentication with loading the code in right the idea is you need to simplify it so that you remove as much external variables as possible because there's a chance that maybe authentication actually really does work and your code is good but something else in the application is breaking it it is hard to identify what's breaking it in the other parts of the application if your application is too big and you don't even realize that your off code is okay
[10:26] but it's just something else in the situation that's causing the ISS issue the only way we can do that is simply taking the one value point of off and being like hey one app one done that's all I'm caring about what this does is that let's say you bet out a whole separate situation just to get authright once you get off right on this one app then you can take this code and put it towards your more complex app copy paste copy paste and here's the kicker then once you run the complex app if that
[10:57] error still incurs with Authentication it's not an issue with your authentication code something else is happening that's causing that so that narrows down the issue so that covers the three steps you should approach for any error in coding let me give you one last little tip what you'll realize is that any error you face in coding once you solve it the next time that air shows up or there is a similar error you're able to solve it very fast like for example the early days for me when I was just initially setting up stripe API documentation for monetization of my
[11:28] application that was a lot of rhyming there I had taken hours to really understand stripe documentation and the airs I was running into but once I did it I solved the airs the next time I needed to do something with stripe it was just boom boom and boom because I went through the air hurdles I know what to do I know why that's happening if you feel like you learned something in today's video make sure to leave a like it's completely free if you just found me for the first time ever you're like who is this guy my name is Corin Brown I run these softare company bump UPS it's currently funded by Google check out all my other playlists if you actually want to learn how to code with AI create software create money let's jump into
[11:58] the next video at the end here Corbin you talk too fast hit that little gear icon put me down to 75 speed I should be good to go to random videos that's my face I'll see you in the next video