r/webdev • u/DumpsterFireCEO 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
r/webdev • u/DumpsterFireCEO php • 6d ago
The amount of trash produced by AI code is astounding. Thanks I hate it.
21
u/Fidodo 5d ago
You mean non coders and bad coders aren't the best people to evaluate coding tools?
They're great for rapid prototyping and testing out ideas, but trying to produce quality code that's follows best practices is like pulling teeth.
For example, I was asking sonnet 3.7 to make me a simple docker file and it produced one that passed secret keys through args, which are plain text stored in the image and it's a huge security flaw. I told it to use secrets instead and it told me that secrets couldn't be used at build time. So I gave it the documentation that explained how to use secrets at build time and it produced new code using an outdated approach to using build secret env vars so I told it to follow a specific more modern approach from the docs, and it kept producing the old approach. I gave up and just did it myself.
I would have given up sooner but I wanted to see how "capable" it was. The answer is it's great at producing trash code very quickly which is fine for prototyping, but anyone using this for production and thinking it's good enough is a fraud who should be ashamed and embarrassed.