📺 How to Code Better With ChatGPT, Claude.Ai, etc. | Coding With LLMs Tip
🔗
---
SEO & Digital Marketing:
🎁 Free Stuff: https://serp.ly/@devin/stuff
💌 Insider Info: https://serp.ly/@devin/email
Artificial Intelligence:
🎁 Free Stuff: https://serp.ly/@serpai/stuff
💌 Insider Info: https://serp.ly/@serpai/email
For Everyone:
👨👩👧👦 Community: https://serp.ly/@serp/discord
🧑💻 https://devinschumacher.com/
---
One of the most annoying things that LLMs do, ChatGBT, Claude, whoever else, Copilot, when you're trying to code is that you ask them to do something and they do a whole bunch of other shit that you didn't ask for, changing a bunch of random things, they don't tell you what they are, and then all of a sudden you copy and paste your code in and it's missing an entire function that's just been commented out and truncated or a bunch of other things are changed that you don't realize and next thing you know your whole f****** life.
The machine explodes and everything goes haywire and it's super annoying and it's actually really difficult to get them to not do it.
Even if you remind them before every single message, they still seem to put in crap and mess with things that don't need to be touched.
So what's the solution? Here's something that I've been doing that has been helpful. What you want to do, let's pretend that you have your file here and this code works pretty good, you're just trying to kind of maybe dial in one aspect of it and you don't want one of these LLMs to talk.
Totally b******* your entire code by changing a bunch of random things that don't need to be changed.
What you do is you keep your code here and you create a file called, well you can name it whatever you want, but it's easy to just call it diff. and then you put the file extension of the type of code you're working on. So if it's .py you do diff.py, if it's .js, diff.js, whatever. Then, what you want to do when you get a new iteration of code or what have you from the these things, you're going to paste it into the diff file, so check this out.
What you want to do basically is you'll have your code here, and you'll copy this, and you'll paste it into the diff file.
And then, depending on which way you want to go, left, right, right, left, you can do command shift p and say compare active file with, and then you compare it with your original code.
And you get to look through quickly and see the death of the things that it did because it's probably going to completely ruin all your shit and do a bunch of things you didn't ask it to do.
And so this is a quick way to just kind of scroll through and make sure that it's focusing on the things you want it to focus on and not things you don't.
For example, if you're just trying to change this function and you're scrolling down and you see, okay, a bunch of stuff changed, great, but you keep scrolling down and you see like, what is all this other crap that it messed with?
Then you know, okay, it did a whole bunch of things, it went haywire, let's and not just go ahead and copy and paste this code in here and then just totally leave it.
Lose everything that we have, because I can't tell you how many times I've had a project that was almost done and I was just a little bit too tired to go through and read the entire thing that it made.
And I copied and pasted a couple things in, next thing you know, the whole thing has gone to shit.
So you can either do, uh, once again, you paste the code into this diff.js or diff.whatever file, you do command shift p, compare active file with, and you do compare with my file, And then if you want to see the diff in the other direction, you can just click that guy So, if it's like, you know, kind of backwards or whatever, you can click these little m************ up here on the top right.
And that will hopefully save you from just exploding some of your projects and, you know, kind of wanting to throw your computer out the window.
Watch video How to Code Better With ChatGPT, Claude.Ai, etc. | Coding With LLMs Tip online without registration, duration hours minute second in high quality. This video was added by user devin schumacher 14 August 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 70 once and liked it 5 people.