Live data from Hacker News

How to effectively write quality code with AI

heidenstedt.org

211–220 of 321 posts

Re: How to effectively write quality code with AI

#211

Earlier quoted context omitted.

Sounds like a skill issue. I’ve seen it rapidly increase the speed of delivery in my shop.

Why is it so hard to find examples?

You’re asking to see my company’s code base?

It’s not like with AI we’re making miraculous things you’ve never seen before. We’re shipping the same kinda stuff just much faster.

I don’t know what you’re looking for. Code is code it’s just more and more being written by AI.

Re: How to effectively write quality code with AI

#212

The real value that AI provides is the speed at which it works, and its almost human-like ability to “get it” and reasonably handle ambiguity. Almost like tasking a fellow engineer. That’s the value. By the time you do everything outlined here you’ve basically recreated waterfall and lost all speed advantage. Might as well write the code yourself and just use AI as first-pass peer review on the code you’ve written. A…

> By the time you do everything outlined here you’ve basically recreated waterfall and lost all speed advantage.

Next: vibe brain surgery.

/i

Re: How to effectively write quality code with AI

#213
post #116

The best thing about this is that AI bots will read, train on and digest the million "how to write with AI" posts that are being written right now by some of the smartest coders in the world and the next gen AI will incorporate all of this, making them ironically unnecessary.

None of this is new, it was pretty much all "best practice" for decades and so already in the training data for the first generation.

If the issue is SNR and the ratio of "good" vs "bad" practices in the input training corpus, I don't know if that's getting better.

Re: How to effectively write quality code with AI

#214

I can't help but keep finding it ridiculous how everyone now discovers basic best practices (linting, documentation, small incremental changes) that have been known for ages. It's not needed because of AI, you should have been doing it like this before as well.

These best practice protections become essential only when you give the work to really bad programmers - such as parrots.

Re: How to effectively write quality code with AI

#215

Earlier quoted context omitted.

The difference with a purely still photograph is that code is a functional encoding of an intention. Code of an LLM could be perfect and still not encode the perfect intention of the product. I’ve seen that in many occasions. Many people don’t understand what code really is about and think they have a printer toy now and we don’t have to use pencils. That’s not at all the same thing. Code is intention, logic, specifi…

> Code is intention, logic, specific use case all at once. With a non deterministic system and vague prompting there will be misinterpreted intentions from LLM because the model makes decisions to move forward. The problem is the scale of it, we’re not talking about 1000 loc. In a month you can generate millions of loc, in a year hundreds of millions of loc. People are also non deterministic. When I delegate work to…

People are indeed not deterministic. But they are accountable. In the legal sense, of course, but more importantly, in an interpersonal sense.

Perhaps outsourcing is a good analogy. But in that case I'd call it outsourcing without accountability. LLMs feel more like an infinite chain of outsourcing.

Re: How to effectively write quality code with AI

#216

Earlier quoted context omitted.

I have this nagging feeling I’m more and more skimming text, not just what the LLMs output, but all type of texts. I’m afraid people will get too lazy to read, when the LLM is almost always right. Maybe it’s a silly thought. I hope!

there are some youtube videos about the topic, be it pupil in high school addicted to llms, or adults losing skills, and not dev only, society is starting to see strange effects

Can you provide links to these videos?

Re: How to effectively write quality code with AI

#217

Earlier quoted context omitted.

The difference with a purely still photograph is that code is a functional encoding of an intention. Code of an LLM could be perfect and still not encode the perfect intention of the product. I’ve seen that in many occasions. Many people don’t understand what code really is about and think they have a printer toy now and we don’t have to use pencils. That’s not at all the same thing. Code is intention, logic, specifi…

> Code is intention, logic, specific use case all at once. With a non deterministic system and vague prompting there will be misinterpreted intentions from LLM because the model makes decisions to move forward. The problem is the scale of it, we’re not talking about 1000 loc. In a month you can generate millions of loc, in a year hundreds of millions of loc. People are also non deterministic. When I delegate work to…

Ofc people are non deterministic. But usually we expect machines to be. That’s why we trust them blindly and don’t check the calculations. We review people’s work all the time though. Here people will stop review machine LLM code as it’s kind of a source of truth like in other areas. That’s my point, reviewing code takes time and even more time when no human wrote it. It’s a dangerous path to stop reviews because of trust in the machine now that the machine is just kind of like humans, non deterministic.

Re: How to effectively write quality code with AI

#218

I can't help but keep finding it ridiculous how everyone now discovers basic best practices (linting, documentation, small incremental changes) that have been known for ages. It's not needed because of AI, you should have been doing it like this before as well.

Anyone who’s been a developer for more than 10 minutes knows that best practices are hard to always follow through on when there’s pressure to ship. But there’s more time to do some of these other things if the actual coding time is trending toward zero. And the importance of it can go up with AI systems because they do actually use the documentation you write as part of their context! Direct visible value can lead p…

> Anyone who’s been a developer for more than 10 minutes knows that best practices are hard to always follow through on when there’s pressure to ship. > But there’s more time to do some of these other things if the actual coding time is trending toward zero.

I think you'll find even less time - as "AI" drives the target time to ship toward zero.

Re: How to effectively write quality code with AI

#219
post #55

Remember having to write detailed specs before coding? Then folks realized it was faster and easier to skip the specs and write the code? So now are we back to where we were? One of the problems with writing detailed specs is it means you understand the problem, but often the problem is not understand - but you learn to understand it through coding and testing. So where are we now?

Skip specs, and you often ended up writing the wrong program - at substantial cost.

The main difference now is the parrots have reduced the cost of the wrong program to near zero, thereby eliminating much of the perceived value if a spec.

Re: How to effectively write quality code with AI

#220
post #210

Earlier quoted context omitted.

In this case why can’t other agents just automate your job completely ? They are capable of that. What do you bring in the process of still doing manual organization ?

I still have to tell it what to do, and often how to do it. I manage its external memory and guidelines, and review implementation plans. I’m still heavily involved in software design and test coverage. AI is not capable yet of automating my job completely – I anticipate this will happen within two years, maybe even this year (I’m an ML researcher).

Do you mean, from your perspective, within 2 years humans won’t be able to bring anything of value to the equation in management and control ?
Post reply on HN