Live data from Hacker News

When I reject AI code even if it works

vinibrasil.com

81–90 of 184 posts

Re: When I reject AI code even if it works

#81
post #40

Coding with AI eventually comes down to two paths, I've realized. One is using AI exclusively for everything. The other is not using it at all. There is almost no middle ground. The reason is that as the complexity and depth of the problem increase, the code AI generates increasingly follows enterprise level patterns. The deeper the meaning of what I input, the more AI tends to produce code that goes beyond my own ar…

Own the design and let AI write the code. Spend the extra free time on becoming a better/broader architect.

This idea is being pushed to increase sunk costs IMO. We are told to spend huge amount of time writing specs, behaviour tests, AGENTS.md and prompts.

Pinky promise that's enough to get good output.

Pinky promise we won't invent yet another body of work the whole industry must adopt to get good output.

Pinky promise the AI tool will properly read all your work

And then of course we are told you must never trust its output !? You must review all code it produces line by line and grok it fully !

And now we have: keep challenging it, keep rejecting it, keep interrogating it... That's just fancy words for spend more money (tokens)

Re: When I reject AI code even if it works

#83
Its hard to find a middle ground between fully understanding everything in a PR vs a vibe coding type approach. Can you understand "just a little bit" of a PR and merge it into a code base you really care about? Is it maybe fine to "mostly understand it" on the other hand? Its definitely a tough call and its impossible to argue that no trade off is being made.

LLMs are perfect for quick prototypes, speed runs, learning, etc., but if the code really matters its still not clear cut. I think the definition of what "really matters" is very project dependent of course As an extreme example you would want to understand every line of the code for the control system runs an MRI machine or a jet engine since bugs might mean life or death. Depositing money into the wrong account might not kill anyone but could lead to severe economic losses. But, then again, even problems in far less consequential software may be drastically sub-economic (i.e. saving $1000 on the implementation might cost $10000 if customers aren't happy and fails to re new). Pick your scenario I guess.

The problem is, this isn't going to change regardless of how well a new model scores on a benchmark. It seems actually AGI is needed.

Re: When I reject AI code even if it works

#84

Even using Fable (while it was briefly available), having it refine a plan, and directing it to make only small incremental changes, I still found reasons to reject its first pass at a lot of work. There was a lot of “You’re right to push back” responses. A lot of incidents where it would creat some giant complex set of abstractions to accomplish something that I could find ways to do much more elegantly and in a mor…

A nice trick I've found is following up with "make it simpler". Often you can do 2-3 rounds of that and end up with something much easier to comprehend but still meeting the requirements.

I have a Rails background, so maybe KISS is more engrained in my philosophy than whatever training material was used on AI. At least it isn't heavily pushing design patterns...

Re: When I reject AI code even if it works

#85

Even using Fable (while it was briefly available), having it refine a plan, and directing it to make only small incremental changes, I still found reasons to reject its first pass at a lot of work. There was a lot of “You’re right to push back” responses. A lot of incidents where it would creat some giant complex set of abstractions to accomplish something that I could find ways to do much more elegantly and in a mor…

Maybe that feedback loop finally got fast enough to die out.

Re: When I reject AI code even if it works

#86

Earlier quoted context omitted.

Own the design and let AI write the code. Spend the extra free time on becoming a better/broader architect.

How can you own the design if you don't know what your design actually does?

You can't, so you do read the code.

Re: When I reject AI code even if it works

#87
post #46
post #27

Earlier quoted context omitted.

Coding agents have been better than the average "enterprise" programmer for a while now and nobody wants to admit it or talk about it. I have never seen an agent output an implementation called FooImpl that's tens of thousands of LOC in a single file, but I have seen plenty of human code like this. People call coding agents bad because they don't know the asinine meaningless conventions at their particular company wh…

> that's tens of thousands of LOC in a single file Why is this worse than splitting it across 1k files?

Does taking this example and extending it to the limit answer your question? There is a reason we don’t have a single file called program with a million lines of code in it. Google studies on module size vs code defect rates for more empirical numbers.

Re: When I reject AI code even if it works

#88
post #81

Earlier quoted context omitted.

Own the design and let AI write the code. Spend the extra free time on becoming a better/broader architect.

This idea is being pushed to increase sunk costs IMO. We are told to spend huge amount of time writing specs, behaviour tests, AGENTS.md and prompts. Pinky promise that's enough to get good output. Pinky promise we won't invent yet another body of work the whole industry must adopt to get good output. Pinky promise the AI tool will properly read all your work And then of course we are told you must never trust its ou…

Wow hang on, I'm suggesting to use AI as a code writing aid, not to increase scope until owning the design becomes unreasonable.

Re: When I reject AI code even if it works

#89

Earlier quoted context omitted.

You can also just use AI and keep the scale of your changes small rather than refactoring the whole app with a change? This isn't super-weird.

"In the discrete world of computing, there is no meaningful metric in which "small" changes and "small" effects go hand in hand, and there never will be." - E.W.Dijkstra (EWD1036)

I believe grandparent meant "small enough changes that you can understand what the effects are likely to be"
Post reply on HN