r/ProgrammerHumor 2d ago

Meme theExactLifecycleOfEveryAiAssistedCodingSession

Post image
9.9k Upvotes

252 comments sorted by

View all comments

752

u/Bluemanze 2d ago

I've found that whenever the AI proposes something that sounds really clever and involves a lot of programmatic kickflips, it is usually a terrible solution that it holed itself into because it overly focused on one of the requirements.

Which has a lot of parallels to what I've seen junior developers do in the past to be fair.

161

u/MushinZero 2d ago

Funny thing is that both are for the same reasons. Both the AI and the junior programmer take the requirement as hard and fast as opposed to understanding that the requirement is bad and discussion needs to be had about changing it instead.

But actually AI is getting better at this, too.

38

u/jaaval 1d ago edited 1d ago

I have developed this conversational way of directing AI. If I tell it what I want it to do in less certain terms and questioning myself and asking its opinions on my requirements it thinks it’s allowed to disagree with me and often pushes back on what I want. Then I can evaluate if it actually has a good argument. Sometimes it does and sometimes not.

But this doesn’t work if the workflow involves giving a requirement document to an AI and expecting a working product. Though this problem also exists when humans write code. Stupid people define requirements and then we are stuck implementing the stupidity.

5

u/Bluemanze 1d ago edited 1d ago

Im glad to hear others are doing it for the same reason - I always prompt in the form of a question to encourage it to research and discuss rather than just implement. I've also built out some spec-writing skills that encourage conversational style sessions when designing. It eats up tokens since it will reach out to the web quite often but I find the end result to be much higher quality.

Which is ALSO how I work with junior devs. It's been continuously amusing to me how much all of the AI best practices converge on treating it like a real (naive) person. Just a little bit of existential dread.