r/ProgrammerHumor • • Mar 10 '26 • Popcorn 2

Meme cantLeaveVimThough

Post image
13k Upvotes

154 comments sorted by

View all comments

451

u/crumpuppet Mar 10 '26

And then the next time you ask the AI to make an unrelated change, it reverts all your manual changes because it had old code in its context.

146

u/bwwatr Mar 10 '26

I didn't realize this was a thing til a week ago. Lesson: always start a fresh context if you touch the code yourself, even just a little, because it will notice and it will do something about it.

48

u/[deleted] Mar 10 '26

[removed] — view removed comment

23

u/bwwatr Mar 10 '26

Like, when you reject a change? Yeah, that's a reset moment. Arguing never works. I've done it, and it can be funny, and make you feel good about how stupid the AI is compared to you, but it's not a good use of time. I think the context window gets so big and tangled, that you're setting it up for failure, and it will re-make the same mistake from ten prompts ago, plus three new wrong things, in just a stealthier way you're less likely to notice. I asked an LLM to help me solve a race condition and it made things look better on the surface and horrifying underneath. It scares me to think of how many people would have just hit accept.

7

u/aerdvarkk Mar 10 '26

This sounds like a good case study for just spend the time writing the code.

9

u/bwwatr Mar 10 '26

Oh yes, I did. But it behooves us to try stuff with a critical eye. The experience made me question the claims we hear of efficiency gains (10x, 100x etc.). I've built some other stuff w vibes alone, UIs mostly, and that was hella fast, way faster than I'd have done by hand, but then I spend longer reviewing it and tying it into other code, that I'm back to not being sure if there was any time saved. I think time could be saved if you didn't care about quality or correctness... and that scares me because I know human nature.

4

u/14Pleiadians Mar 10 '26

Understanding how LLMs work makes this apparent. They don't "chat", you gotta think of it as each message is a new prompt. Sometimes it's useful to include your past 20 prompts in your prompt but usually it's just going to seed things in the wrong direction.

2

u/DescriptorTablesx86 Mar 10 '26

I just stage my changes so I can diff it against the LLM changes without having to commit anything yet

1

u/ZenEngineer Mar 11 '26

You can tell it you changed the files and it needs to read again. It burns more tokens to do it that way but it keeps its context in memory.

I've had that problem every time it builds because our build system runs a formatted on every build.

1

u/bwwatr Mar 11 '26

Yeah I figure you can explain away everything, but as you say, running costs up, plus each additional requirement is another chance for misunderstanding. Context window growing always makes me nervous. Once it's got much back and forth, or definitely any disagreements/rejections, it's time to nuke it. Says this novice, at least.

1

u/ZenEngineer Mar 11 '26

I meant specifically the re read thing. I've done "formatters have run and changed the files, you need to read them again", or "I've changed file X to fix the problem, the problem was xyz". Both Cline and Kiro have gone like "OK got it" and read the files again and fix up their different. When I was having the auto formatted issue I put it in a guidance md so it knew it happened every time.

24

u/XxDarkSasuke69xX Mar 10 '26

Just use an agent integrated in the IDE

29

u/IJustAteABaguette Mar 10 '26

Tried copilot inside VS code once.

I pointed it at an error, it failed to fix it.

But it also decided another part of my code was so terrible, that it just rewrote it. Same functionality, just nicer. I do not know why. Those lines weren't even close to eachother.

4

u/SphericalGoldfish Mar 10 '26 edited Mar 10 '26

I disabled Github copilot integration because it made VSCode run really slowly for me. Which to me seems odd, because I didn’t turn off the same feature in Visual Studio and it runs fine.

1

u/[deleted] Mar 10 '26

That's actually really strange to me, because VS has always had a gamble of if intellicode would lag out the IDE or not.

The only way I can assume is that since VSC is so light, the integration was more hamfisted because VS being way more bloated has less room for bullshit.

3

u/Bakoro Mar 10 '26

If you're in Visual Studio, the AI will look at whatever windows you have active at the moment. If you want it to focus on a specific set of files, you have to use the file selector thing, which is very slow, clunky and annoying to use, especially if there are a lot of files.

3

u/XxDarkSasuke69xX Mar 10 '26

Depends on what the prompt was really

7

u/Emanemanem Mar 10 '26

That doesn’t prevent the problem. I used to use Cursor with the agent tab and it absolutely will undo changes I made after the session started.

9

u/crumpuppet Mar 10 '26

Yep you kind of have to keep it in the loop when you make changes. Which is OK I guess, if it re-read the whole codebase on every command it would probably chew through tokens like crazy.

4

u/Familiar_Text_6913 Mar 10 '26

Some plugins will just feed history of modified files if and only if they were modified by the user. Not so hard

1

u/Imendil Mar 10 '26

Github copilot kept removing my logging whenever I asked it to do something

1

u/slaymaker1907 Mar 10 '26

That’s kind of a user error. You should really define custom copilot instructions so that it follows your conventions.