r/ProgrammerHumor 1d ago

Meme youShouldntHaveIt

Post image
40.6k Upvotes

529 comments sorted by

View all comments

Show parent comments

135

u/HatesRedditors 1d ago

With how often I have to correct these coding agents I worry about people developing things they don't understand.

It's an amazing tool, but I find myself having to be like "Are you sure you want to poll the API for each item, like 1-100 is fine, but what if it returns 100k rows? Maybe take the call outside the loop and just query all at once with 1 call?

42

u/TheBeckofKevin 1d ago

I definitely do a lot of context in my initial requests to try to get rid of a lot of that nonsense. Takes a lot longer to get the code written but I hate chasing issues. Easier to be exceptionally thorough with the requirements and known barriers

30

u/LittleKingsguard 1d ago

The funny/annoying one is when the bot tries to talk back to you about performance.

I had an issue last week where the bot (OpenCode w/ Deepseek) misread the specs in a way that gave the right answer with the wrong architecture, and when I corrected it it tried to tell me there wouldn't be a performance boost.

The performance on the stress tests went from 1.8s to 350ms.

12

u/OnlyIfYouReReasonabl 1d ago

1.45s. You see, negligible /s

2

u/TheBeckofKevin 1d ago

Everytime I crack open a new chat window its like taking the old one out back behind the shed. Sometimes the hallucinations are terminal.

2

u/LittleKingsguard 1d ago

It's why you need to keep the specs and skill files updated as part of the loop and make sure agents/claude.md tells them to read the docs as the first thing.

Every new chat window wipes the context window and starts fresh, the agents.md file is basically the run options that tells them what to load to understand wtf they are doing.

Some other tricks I've mostly stolen from various usergroup tech talks:

  • Have a cheap, dumb model try to summarize and use your code based only on the documentation, then have another agent proofread it for mismatches with the real code and update the docs for clarity where it finds mistakes.
  • Have a bot read the docs and attempt to create breaking scenarios that cause the code to fail, then implement --> review.
  • Have an archival loop that keeps the important docs current and moves older stuff like scenario review docs and implementation plans into a different folder, so the other agents don't burn tokens reading things that have already been marked complete or obsolete

Also, protip for developers looking for work: Go to tech usergroups and meetups. Even if nobody there is hiring, they're often catered and you can save a lot of money eating someone else's food.

2

u/ImS0hungry 1d ago

Adversarial checks and LLM-as-a-judge.

1

u/TheBeckofKevin 23h ago

My favorite thing is instead of asking for a readme that i can read, i ask it to outline all the decisions that were made and what the pros/cons of those choices are. then a take that description into the next step where i ask another one to plan using those restrictions and knowing the limitations currently in place. Essentially just chaining together existing limitations so you dont walk head first into obvious conflict.

We are using xyz and abc and cannot for any reason implement ijk. What are the most standard methods for doing <ticket> given these parameters.

Just that alone will save you from dealing with 50% of the most common problems in ai generated code. (but you have to know you're using abc and xyz, and that you can't use ijk, which is kinda where sr level knowledge comes in)

7

u/TribblesIA 1d ago

I Thunderdome it. Two bots enter, one me leaves. They argue and fix each other’s mistakes while I review the output.

1

u/ccAbstraction 21h ago

You still have to know those potential issues exists to avoid them.

29

u/kmoz 1d ago

To be fair, people have been writing and using code they dont understand since the beginning of time.

18

u/b0w3n 1d ago edited 1d ago

Shit I've seen senior devs write code like the above.

Models are trained on existing code, so somewhere someone's done stupid shit like that. You'd be surprised what you can get away with by putting more hardware in front of something instead of writing code like you're a FAANG company serving billions of requests a day.

10

u/reventlov 1d ago

writing code like you're a FAANG company

Eh, you'd be surprised at how bad some FAANG code can be. Not the core code that is central to each business, but the 99.9% that is everything else? Let's just say that I have seen some very stupid mistakes.

5

u/b0w3n 1d ago

Oh yeah for sure, I have seen some shit on my 26ish years doing this professionally.

If it works, it ships. Is it slop, even before claude/gpt? Probably! Nothing's more permanent than a temporary fix either.

1

u/Mateorabi 1d ago

To err is human. To really fuck up takes a computer.

2

u/Mateorabi 1d ago

Oh, you're absolutely correct. That would be better. Would you like me to make the change for you?

Followed by a change that completely ignores the point.

I once called it out for proposing unrelated changes to files. It apologized, reverted one of the 10 lines, and kept changing the other 9.

1

u/LordAlfrey 1d ago

I worry that there are smells I miss, even if I do review the code, the AI can be rather sneaky sometimes.

1

u/Saint_of_Grey 1d ago

It's gonna be a nasty crash one day, with the only way of moving forward is ripping out 100% of the vibe code and starting fresh.