logoalt Hacker News

ZpJuUuNaQ5today at 10:46 AM2 repliesview on HN

>AI “writes bad code,” “introduces bugs,” “creates technical debt,” or something along those lines.

Which is undeniably true. I am not "anti-AI", in fact, it helps me immensely in my current job, but in my experience, using these tools still requires quite a lot of involvement. Otherwise, updating existing or adding new functionality becomes increasingly difficult as the system grows. The funniest thing is that when you start to lose touch with the internals of the system you are building, you cannot even give the AI proper context to pinpoint the problem or guide it to make specific changes, which results it a lot of wasted tokens, wrong assumptions and mountains of sloppy code.


Replies

cassianolealtoday at 10:53 AM

Exactly this. I've been using a lot of AI, both at work and on personal projects. It's a great help, but it needs a tight leash.

I see arguments saying "what does it matter, since you're not going to be touching that code anyway?"

Well, what you said about not being able to give it context is one aspect. Another one is that what the LLM is writing is still software. The more brittle and complex that software gets, the harder it is for the LLM to maintain it, since you get either spaghetti code or a house of cards where you can't move one bit of the system without breaking stuff on unrelated parts of it.

Oh, but the LLM can fix it, as long as you have some formal verification of the functionality! Sure, but it compounds.

All of this is absolutely fine for some projects, but for most enterprise and commercial software you need more rigour or you'll see yourself with a long, expensive and risky migration in the near future.

metalspottoday at 11:29 AM

Calling it AI is where the problem lies. An LLM is not AI. It is a next token prediction function. That is a very powerful function but just one function out of millions in the overall stack. As an engineer you still have to have the right framework to call that function with the right inputs at the right places and validate the results. But if you focus on the technical details and not the marketing hype you can get amazing results in the areas where it works.