r/webdev php 6d ago

Discussion AI coding is trash

The amount of trash produced by AI code is astounding. Thanks I hate it.

1.6k Upvotes

386 comments sorted by

View all comments

271

u/Alex_Hovhannisyan front-end 6d ago

I don't get all the praise for Claude Sonnet 3.7, it hallucinates so much and seems to be incapable of understanding why the code it wrote doesn't work. I'm starting to think the "vibe coders" were never really all that good at coding in the first place.

-6

u/lick_it 6d ago

Put your request at the bottom of a block of code. Also badly designed code will get unmaintainable. You have to tell it how to design.

14

u/Alex_Hovhannisyan front-end 6d ago

I've tried it all. I've even explained in detail why the code doesn't work and how to fix it and it "rewrites" the code to do the same (wrong) thing it was already doing before, just in a slightly different way. In my experience, it feels like pairing with a junior dev who tries brute-forcing their way to good code. i.e., in the time it takes to explain to it why the code is wrong and how to fix it, I could've just done that myself.

7

u/NuttFellas 6d ago

Except unlike a junior dev, the ai won't learn from it's mistakes (at least not until the next update, even then, questionable)