Live data from Hacker News

AI is forcing us to write good code

bits.logic.inc

111–120 of 229 posts

Re: AI is forcing us to write good code

#111
Without having tried it (caveat), I worry that 100% coverage to an LLM will lock in bad assumptions and incorrect functionality. It makes it harder for it to identify something that is wrong.

That said, we're not talking about vibe coding here, but properly reviewed code, right? So the human still goes "no, this is wrong, delete these tests and implement for these criteria"?

Re: AI is forcing us to write good code

#112
post #100
post #44

This is sort of why I think software development might be the only real application of LLMs outside of entertainment. We can build ourselves tight little feedback loops that other domains can't. I somewhat frequently agree on a plan with an LLM and a few minutes or hours later find out it doesn't work and then the LLM is like "that's why we shouldn't have done it like that!". Imagine building a house from scratch and…

> Imagine building a house from scratch Thats why those Engineering fields have strict rules, often require formal education and someone can even end up in prison if screws up badly enough. Software is so much easier and safer, till very recently anonymous engineering was the norm and people are very annoyed with Apple pushing for signing off the resulting product. Highly paid software engineers across the board must…

> people are very annoyed with Apple pushing for signing off the resulting product.

Apple is very much welcome to push for signing off of software that appears on their own store. That is nothing new.

What people are annoyed about is Apple insisting that you can only use their store, a restriction that has nothing to do with safety or quality and everything to do with the stupendous amounts of money they make from it.

Re: AI is forcing us to write good code

#113
post #111

Without having tried it (caveat), I worry that 100% coverage to an LLM will lock in bad assumptions and incorrect functionality. It makes it harder for it to identify something that is wrong. That said, we're not talking about vibe coding here, but properly reviewed code, right? So the human still goes "no, this is wrong, delete these tests and implement for these criteria"?

Yep, 100% correct. We're still reviewing and advising on test cases. We also write a PRD beforehand (with the LLM interviewing us!) so the scope and expectations tend to be fairly well-defined.

Re: AI is forcing us to write good code

#114

Earlier quoted context omitted.

> This is sort of why I think software development might be the only real application of LLMs outside of entertainment. Wow. What about also, I don't know, self-teaching*? In general, you have to be very arrogant to say that you've experienced all the "real" applications. * - For instance, today and yesterday, I've been using LLMs to teach myself about RLC circuits and "inerters".

Self-teaching pretty much doesn't work. For many decades now, the barrier has not been access to information, it's been the "self" part. Turns out most people need regimen, accountablity, strictness, which AI just doesn't solve because it's yes-men.

> Self-teaching pretty much doesn't work. For many decades now, the barrier has not been access to information, it's been the "self" part.

That’s a complete bogus. And LLMs are yes men by default, nothing stops you from overriding initial setting.

Re: AI is forcing us to write good code

#115
post #24

Earlier quoted context omitted.

They are retrained every 12-24 months and constantly getting new/updated reinforcement learning layers. New concepts are not the problem. The problem is outdated information in the training data, like only crappy old Postgres syntax in most of the Stackoverflow body.

> They are retrained every 12-24 months and constantly getting new/updated reinforcement learning layers This is true now, but it can't stay true, given the enormous costs of training. Inference is expensive enough as is, the training runs are 100% venture capital "startup" funding and pretty much everyone expects them to go away sooner or later Can't plan a business around something that volatile

GPT-5.1 was based on over 15 months old data IIRC, and it wasn’t that bad. Adding new layers isn’t that expensive.

Re: AI is forcing us to write good code

#116
post #100

Earlier quoted context omitted.

> Imagine building a house from scratch Thats why those Engineering fields have strict rules, often require formal education and someone can even end up in prison if screws up badly enough. Software is so much easier and safer, till very recently anonymous engineering was the norm and people are very annoyed with Apple pushing for signing off the resulting product. Highly paid software engineers across the board must…

> people are very annoyed with Apple pushing for signing off the resulting product. Apple is very much welcome to push for signing off of software that appears on their own store. That is nothing new. What people are annoyed about is Apple insisting that you can only use their store, a restriction that has nothing to do with safety or quality and everything to do with the stupendous amounts of money they make from it…

It's literally the case of Apple requiring signing the binary to run on the platforms they provide, Apple doesn't have say on other platforms. It is a very similar situation with local governments.

Also, people complain all the time about rules and regulations for making stuff. Especially in EU, you can't just create products however you like and let people decide if it is safe to use, you are required to make your products to meet certain criteria and avoid use certain chemicals and methods, you are required to certify certain things and you can't be anonymous. If you are making and selling cupcakes for example and if something goes wrong you will be held responsible. Not only when things go wrong, often local governments will do inspections before letting you start making the cupcakes and every now and then they can check you out.

Software appears to be headed to that direction. Of course du to the nature of software probably wouldn't be exactly like that but IMHO it is very likely that at least having someone responsible for the things a software does will become the norm.

Maybe in the future if your software leaks sensitive information for example, you may end up being investigated and fined if not following best practices that can be determined by some institute etc.

Re: AI is forcing us to write good code

#118
post #111

Without having tried it (caveat), I worry that 100% coverage to an LLM will lock in bad assumptions and incorrect functionality. It makes it harder for it to identify something that is wrong. That said, we're not talking about vibe coding here, but properly reviewed code, right? So the human still goes "no, this is wrong, delete these tests and implement for these criteria"?

That's already what I'm experiencing even without forcing anything, the LLM creates a lot of "is 1 = 1?" tests

Re: AI is forcing us to write good code

#119
This is exactly how I've been working with AI this year and I highly recommend it. This kind of workflow was not feasible when I was working alone and typing every line of code. Now it's suprisingly easy to achieve. In my latest project, I've enforced extremely strict linting rules and completely banned any ignore comments. No file over 500 lines, and I'm even using all the default settings to prevent complex functions (which I would have normally turned off a long time ago.)

Now I can leave an agent running, come back an hour or two later, and it's written almost perfect, typed, extremely well tested code.

Re: AI is forcing us to write good code

#120

I'm sad programmers lacking a lot of experience will read this and think it's a solid run-down of good ideas.

I have almost 30 years of experience as a programmer and all of this rings true to me. It precisely matches how I've been working with AI this year and it's extremely effective.
Post reply on HN