logoalt Hacker News

loloquwowndueotoday at 11:34 AM6 repliesview on HN

It’s really good at writing bad code - something that superficially works but is badly architected, abstracted, or wrong in a subtle way.

Only a novice would look at ai code and say “wow this is good”.


Replies

olmo23today at 11:52 AM

You don't have to let it design the architecture. Personally, when I'm using AI: I design the software, and the AI implements it. The classes and functions are typed the way I want them to be typed. AI does a great job.

seamlessdevtoday at 12:11 PM

Yeah if you just let it run wild, it will produce subpar results. But that is not much different from humans tbh.

When you discuss design and architecture first, and write that out in a design doc or something along those lines, it works quite well for the most part.

And 9 out of 10 times when it produces some poor results, just asking "is this really a good approach?" or just stating "This code makes me very sad" it will most of the time do a really good job of analysing why that code is bad and how to improve it.

show 1 reply
rnd33today at 11:51 AM

For well-scoped tasks I wouldn't say the code is bad, not brilliant for sure, but definitively good enough.

For a lot of problems "quick and good enough" is all that is required. I've used it a lot for managing my Home Assistant setup. Has saved me countless of hours.

In principle I could've done it myself, but I never would have, the time investment required to learn it wouldn't have been worth the value I get from it.

sneaktoday at 11:51 AM

I’ve been programming professionally for 29 years and with the right constraints (strongly typed language, strict linting, adversarial review styleguide, test coverage, clearly defined spec or requirements) it does indeed regularly write good code. All of the other stuff required is either set-once-and-forget or is also AI, and it does require supervision, but it writes good code the vast majority of the time.

Note that I am talking about frontier models and only the last 6-12 months. Opus was really the breakthrough point for me.

show 1 reply
carlosjobimtoday at 12:08 PM

Something is better than nothing.

A pain plate of rice is bad food. But would you prefer starving too death? Or for others to starve?

show 1 reply
bashwizardtoday at 12:10 PM

Skill issue. No pun intended.