Live data from Hacker News

AI-written code is still your code

martiansoftware.com

41–50 of 99 posts

Re: AI-written code is still your code

#41
post #25

I don't believe that AI is the 'higher level of abstraction[1]' that it is often claimed to be. However I wonder if it's possible to work with a codebase when other developers are treating AI as a higher level of abstraction. Analogously, people can write in assembly, but can you write in assembly when the codebase is frequently altered by someone with an optimizing compiler? [1] - Do higher levels of abstractions ev…

You wouldn't be the first person to eventually conclude that C is just a very fancy macro assembler.

But AI generated code is much like every other generated code: it is more voluminous and rather less elegant than what you'd write as a person. And here too there is a link with assembly: early compilers routinely put out absolutely terrible assembly by assembly programmers' standards of the day. And then they got better. To the point that today it takes some pretty rare niches that it pays off to break out the assembler and roll your own.

I expect AI generated code to develop in the same way, and the way to get them to improve is to hold generated code to high standards. The problem is the perverse incentive: generated code of low quality will eventually result in many more tokens burned than a one-shot piece of perfect and elegant code. Here you can draw a link with medicine...

Re: AI-written code is still your code

#42
post #31
post #17

> when you build software, you own it No, I specifically don’t. My company owns it, and that bastard will lay me off without a second thought.

Yeah but only _you_ know what to do when your code breaks, ha ha.

Which isn't exactly a new problem, just going to get scaled up.

Re: AI-written code is still your code

#43
post #3

Yes I'm more than okay. AI has enabled a scale of personal ambition I could only previously have dreamed of. I've never been the kind of coder who could easily sit down and get their thoughts out from mind to written lines. I've seen that happen in a few gifted individuals, and AI might be frustrating them, because for them, coding was never the bottleneck, but for me, I would always get stuck in analysis paralysis,…

> I've never been the kind of coder Looks like you were never really a coder, to be honest.

Okay, and why is that a problem?

Re: AI-written code is still your code

#44
post #14

> It’s crystal clear that AI can be a complexity factory. > I’ve been thinking a lot lately about what software would look like if we made keeping software understandable to humans a first-class design goal in the age of AI. I agree, and I've been thinking similarly. But I don't think there's anything "new" about what understandable and well-factored code should look like. It's the same principles as ever. A lot of a…

Same way you do with humans.

Set acceptable review standards, outline appropriate frameworking, document approaches, test standards, documentation standards and overall just set good examples in both context and the codebase.

If your codebase is slop it's because you approved it.

Re: AI-written code is still your code

#45
post #14

> It’s crystal clear that AI can be a complexity factory. > I’ve been thinking a lot lately about what software would look like if we made keeping software understandable to humans a first-class design goal in the age of AI. I agree, and I've been thinking similarly. But I don't think there's anything "new" about what understandable and well-factored code should look like. It's the same principles as ever. A lot of a…

I don't think these comparisons between AI generated code and an idealised version of the code are productive. We have to compare with code that exists in the real world, so AI against human, and not only that, good AI generated code with good human written code, as well as AI slop with human slop.

I think if we did that we'd see that on average the code written by humans are less legible, parts of the intention will live forever in the mind of the developer at time of writing, and more prone to complexity build-up over time, simply because there wasn't time and incentive to go back and refactor code that works, apparently.

Now with AI sure you produce a lot more complexity, more than the human prompter could write by himself, but complexity can be managed with the same workflow that created it, by analysing and removing code paths, changing code architecture, replacing reimplementation with consolidated libs etc...

It's a matter of knowing how to use the tool and not creating a false sense of nostalgia where we feel like we had it better in the old days, which is not true at all.

> How do you reward human-understandability in benchmarks and unsupervised training?

And to answer this, there is no replacement for humans immersed in their world yet, so we need developers with with good understanding of the domain and that are able to write good descriptive prose in order to steer agents into producing acceptable code.

Re: AI-written code is still your code

#46
> It’s crystal clear that AI can be a complexity factory.

> keeping software understandable to humans a first-class design goal in the age of AI.

I'm not sure this is going to be a worthwhile goal for much longer. Rarely is anyone caring about the complexity and comprehensibility of the ASM that GCC or LLVM generates from higher-level C code. I think the code-generation abstraction is just moving even higher now into "prompts". The architecture and engineering process of developing software systems is the important human component. The source code itself is not super valuable. What remains valuable is the input, direction, scrutiny, and "battle testing" of the solution.

Re: AI-written code is still your code

#48
post #25

I don't believe that AI is the 'higher level of abstraction[1]' that it is often claimed to be. However I wonder if it's possible to work with a codebase when other developers are treating AI as a higher level of abstraction. Analogously, people can write in assembly, but can you write in assembly when the codebase is frequently altered by someone with an optimizing compiler? [1] - Do higher levels of abstractions ev…

> Analogously, people can write in assembly, but can you write in assembly when the codebase is frequently altered by someone with an optimizing compiler?

Yes. There's an interface boundary in the form of function prototypes and ABI rules. To the optimizing compiler, your assembly code is undistinguishable from separately compiled high-level code, and to your assembly code, the compiler output is undistinguishable from separately assembled low-level code.

One problem with LLMs, is that they don't respect these boundaries like an optimizing compiler would.

Re: AI-written code is still your code

#49
post #30

we will go full circle "what software would look like if we made keeping software understandable to humans" maybe we invent a pseudo programming language so we get deterministic results ;)

I honestly have a vision of a database of .md files that fully describes an application in human-readable, (ok, engineer-readable), text. Making a change is committing a change to the human-readable text, and then AI comes and figures out the rest and/or suggests edits to the human-readable text. (Or asks questions.)

That's just a programming language, but worse.

The vision is that AI owns the process end to end, from autonomous user interviews through spec generation all the way to implementation. We shouldn't need to tell AI what to do for a high level goal, it should figure it out on its own.

Re: AI-written code is still your code

#50
post #2

I keep getting downvoted for saying this but I still review all of my AI generated code. I feel like I’m sufficiently sped up. Of course you can go faster if you don’t read the code at all, that’s always been true. But it seems like the ability to emit large quantities of text is already a huge leap in productivity. I don’t think these tools are good enough yet to offload all or our thinking into them.

I also review all of my AI-generated code. I feel that it’s disrespectful to my teammates to send unverified slop for review.

I’ve noticed that while my coding skills have very noticeably atrophied (to the point I am consciously scheduling time to manually code, just for practice), my ability to read and comprehend code quickly has actually improved quite dramatically.

I notice style inconsistencies and semantic errors far more quickly and consistently when reviewing both human- and LLM-generated code, as compared to a year ago. Cognitive tradeoff hypothesis and all that…

Post reply on HN