Live data from Hacker News

The AI Great Leap Forward

leehanchung.github.io

51–60 of 76 posts

Re: The AI Great Leap Forward

#52
post #3

Decent sentiment and analogy, but writing this with AI with hackneyed examples undercuts the point

I didn't even realize that this is (allegedly) written with AI. If it's AI, then it's the kind of AI writing that's closer to the real deal and that I want to see more widely applied if AI is to be used.

Re: The AI Great Leap Forward

#53
post #49

Earlier quoted context omitted.

So you have an AI refactor AI generated code? What am I missing here, if AI is the cause of the tech debt because it doesn't write great code, won't you just end up with more tech debt if you ask AI to refactor it?

If a human produces tech debt, do you think a human can't refactor? Most of the time a human works over code multiple times, and still produces tech debt. Give an AI agent enough time, by prompting it multiple times, and explicit instructions to look for and address tech debt of various forms, and it will.

Yeah I must be missing something again. Comparing human to AI here seems to be fundamentally wrong. A human will learn over time and improve their mental model of a problem and ability to code. An AI agent for the most part is fixed by its model. I just don't see how pointing an agent at AI generated code to refactor without direct human guidance results in better code.

Maybe you can describe what the various forms of tech debt are that you are talking about?

Re: The AI Great Leap Forward

#54
post #49

Earlier quoted context omitted.

If a human produces tech debt, do you think a human can't refactor? Most of the time a human works over code multiple times, and still produces tech debt. Give an AI agent enough time, by prompting it multiple times, and explicit instructions to look for and address tech debt of various forms, and it will.

Yeah I must be missing something again. Comparing human to AI here seems to be fundamentally wrong. A human will learn over time and improve their mental model of a problem and ability to code. An AI agent for the most part is fixed by its model. I just don't see how pointing an agent at AI generated code to refactor without direct human guidance results in better code. Maybe you can describe what the various forms o…

> Yeah I must be missing something again. Comparing human to AI here seems to be fundamentally wrong. A human will learn over time and improve their mental model of a problem and ability to code. An AI agent for the most part is fixed by its model. I just don't see how pointing an agent at AI generated code to refactor without direct human guidance results in better code.

There is no need to improve their mental model of a problem and ability to code to recognise the refactoring opportunities that already exists in the code. It only takes a sufficient skill, and effort invested on refactoring. The way to get a model to invest that effort is to ask it. As many times as you're willing to.

> Maybe you can describe what the various forms of tech debt are that you are talking about?

Any. Whether or not you need to prompt much to address it depends on consistency. In general I have a simple agent whose instructions are just to look for opportunities to refactor, and do one targeted refactor per run. All the frontier models knows well enough what good looks like that it is unnecessary to give it more than that.

The best way of convincing yourself of this, is to try it. Ask Claude Code or Codex to "Explore the code base and create a plan for one concrete refactor that improves the quality of the code. The plan should include specific steps, as well as a test plan." Repeat as many times as you care to, or if in Claude Code, run /agents and tell Claude Code you want it to create an agent to do that. Then tell it to invoke it however many times you want to try.

Re: The AI Great Leap Forward

#55
post #18

Earlier quoted context omitted.

AIs don’t produce well organized code. They duplicate effort, which is tech debt. Maybe one day they will be able to clear their own tech debt. And who knows, maybe they’ll still be heavily subsidized by VC money then.

You can organise the code well once, template that and put guardrails in place for it to follow the structure you and the team have agreed is good. The engineering task becomes building the system that is capable of building the system to a high standard.

It will usually just keep on adding workarounds for workarounds. Tech debt increases.

Re: The AI Great Leap Forward

#56
post #49

Earlier quoted context omitted.

If a human produces tech debt, do you think a human can't refactor? Most of the time a human works over code multiple times, and still produces tech debt. Give an AI agent enough time, by prompting it multiple times, and explicit instructions to look for and address tech debt of various forms, and it will.

Yeah I must be missing something again. Comparing human to AI here seems to be fundamentally wrong. A human will learn over time and improve their mental model of a problem and ability to code. An AI agent for the most part is fixed by its model. I just don't see how pointing an agent at AI generated code to refactor without direct human guidance results in better code. Maybe you can describe what the various forms o…

But you can just re-roll until you get something good.

Re: The AI Great Leap Forward

#57
post #31

Comparing AI to steel production in the Great Leap Forward seems unfair. It's not some communist plan - it's a capitalist free for all similar to the industrial revolutions in the UK/US. It won't lead to a famine, it'll lead to the chaotic creative destruction capitalism usually produces.

You're mistaking communism/capitalism as economic systems for communism/capitalism as organizational structures. The latter is what the argument centers around. It's been argued frequently that families and tech companies are structured like socialist states. Central planning, flatter structures, division of labor...I'm not starting down that thread or opening up that debate. This only is not a capitalist structure b…

Fair enough.

Re: The AI Great Leap Forward

#58
post #14

Liked the article in general, but > These apps will win awards at the next all-hands. In two years they’ll be unmaintainable tech debt some poor soul inherits and rewrites from scratch. Huge assumption/prediction that I think is actually just wrong. There's this weird assumption from a certain crowd, never justified or explained, that tech debt accrued by AI is now, and will forever be, impossible for AI to address,…

I agree with this.

If anything there will be less tech debt, because it's easier than ever to clean up.

Unit and end-to-end tests are free now.

Telling an agent to go through your code base and find bugs is free now.

Telling an agent to generate all possible user interaction to your API and then performance test it is free now.

Everything is so easy and takes much less time than it used to.

Re: The AI Great Leap Forward

#59

Earlier quoted context omitted.

You can organise the code well once, template that and put guardrails in place for it to follow the structure you and the team have agreed is good. The engineering task becomes building the system that is capable of building the system to a high standard.

It will usually just keep on adding workarounds for workarounds. Tech debt increases.

Avoiding this with Opus has been trivial in my experience.

Re: The AI Great Leap Forward

#60
post #14

Liked the article in general, but > These apps will win awards at the next all-hands. In two years they’ll be unmaintainable tech debt some poor soul inherits and rewrites from scratch. Huge assumption/prediction that I think is actually just wrong. There's this weird assumption from a certain crowd, never justified or explained, that tech debt accrued by AI is now, and will forever be, impossible for AI to address,…

I agree with this. If anything there will be less tech debt, because it's easier than ever to clean up. Unit and end-to-end tests are free now. Telling an agent to go through your code base and find bugs is free now. Telling an agent to generate all possible user interaction to your API and then performance test it is free now. Everything is so easy and takes much less time than it used to.

> Unit and end-to-end tests are free now.

Explain please. I might agree with discounted.

Post reply on HN