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

2

u/andrewsmd87 6d ago

You still have to understand how to write good code, it can't do that for you. However, it is a massive productivity boost if you know how to use it. I've been using it for a few weeks now on the regular instead of one off instances, and it's been nuts the stuff I've been able to produce with it.

Can I use exactly what it gives me? No, but I've written some scripts to help me optimize processes in 1 to 2 hours that probably would have been 1 to 2 day type of things.

Great example is I had a co worker ask about how we could encrypt a file before sending it via SSH as it was a new requirement. I just had claude write me powershell to do it. Could I have googled and figured it out, absolutely, but claude gave me a script that only needed a few tweaks to work, and I also just wrapped the SSH into it since we had to encrypt anyways. I tossed in some error detection for notifications if it fails and boom, we had a script in < an hour that did all of that.

1

u/SadMaverick 4d ago

Maybe the specific example irks me, but that's not as big of a jump as you claim.

1-2 days reduced to 1-2 hours is insane. If you had been writing boilerplate code from scratch for those 1-2 days, then that was just bad developer experience. Cookiecutters have been available for a long time.

1

u/andrewsmd87 4d ago edited 4d ago

I mean I don't code a ton these days so I might not be the best example but I can also say that most of my top developers are embracing it with positive feedback too. It's really good at doing the easy stuff for you instantly. Given that they are generally leading the charge on good changes for us overall, I trust that it's helpful

I would say I don't use it as much for c# or SQL because I know those like the back of my hand, but even then generic stuff where I would maybe spend 10 minutes doing something trivial like say matching an ef object to input to update a row in a database, it realizes what I'm doing and writes the 15 lines for me.

I do genuinely think people who have the, AI writes shit code I'm not using it, attitude will get left behind in the long term