logoalt Hacker News

jjavtoday at 9:55 AM4 repliesview on HN

> A twenty line for loop. It overengineers most things.

Anecdote I like to tell.. I was working on a financial planning software, intentionally purely vibe coded as an experiment.

I eventually discovered AI had implemented seven duplicate copies of tax calculation functions. All of them different. All of them wrong. All of them giving different answers for same input.

Not even the most junior of newbie junior engineers would do something this crazy. But AI was happy to do it. It will solve the immediate problem, efficiently. Even if the most efficient solution is something ridiculous like this.


Replies

ilija139today at 10:28 AM

I have also a weird story to tell that a human did and it is as crazy as this. It happen in 2019 so no LLMs at all.

A person that was hired as an expert in our startup spent more than one week full time working on implementing his solution to the problem we were having. I checked the code after one week to see the progress and was curious how they are implementing an already crazy sounding idea. I found that the whole week was spent re-implementing in python, python's built-in "float" function. That was it, the whole code was just that.

Our problem was related to financial services and their implementation of "float" was not even correct.

show 2 replies
spockztoday at 11:04 AM

They would not do it in the span of a day or a week. But I’ve definitely seen something like that happen over a period of multiple months.

The llm just allows to generate faster.

We can feel smug about that but all it means is that we need to be clearer on our requirements and preferences up front.

State that similar functions should be in one place and there should be only one. Today there has to be compelling reason why that function is different from others. Normalise the function name based on what it does. Why are there different ones?

Then there are all the other guard rails in place.

Better guidance from mentors, reviewers, and automated project tooling helps everyone. Juniors, seniors, and engineers.

gnz11today at 10:33 AM

Which model though? I have similar anecdotes but all with older models. The jump in capabilities in the last 6 months has been substantial.

show 1 reply
UpsideDownRidetoday at 10:26 AM

For some definitions of efficiency.