When should we use AI-assisted code.
Let’s just get right to it:
- AI should never be trusted to generate code that is central to the value of your team/product/company.
The above definition is a bit tautological. If code is central to the value of your team / product / company, I am definitionally arguing that AI can’t generate it, because AI can only expand on things that don’t require additional details.
Let’s start by challenging the definition of code. Because while at a shallow level I agree that writing code is no longer the job In a deep way I disagree, and I think it starts with something Mitchell Hashimoto observed in how people understood what “Infrastructure-as-code” was.
I’ve always personally defined the “as code” suffix in “X as Code” to mean “a system of principles or rules”. This is in contrast to the popular interpretation of “as code” to mean “as programming.”
I think the Agile principle “Working software over comprehensive documentation.” is more important than ever, but the way we talk about Vibe-Coding or AI driven development kind of implies a reversal. But what do I mean code that is central to the value of your team / product / company?
If you’re an insurance company and you have a formula that defines risk, the code for that formula is critical to the value that you provide. But I don’t think value and “code” have to be defined at one level.
For example, in a small business, the business owner may be vary cognizant of the prices of things. Accidentally losing money on just one or a handful of products could move the needle in devastating ways. Those prices are “code” and go through a human reviewed change management process.
Amazon probably doesn’t care so much about the price of one thing, but wants to optimize their pricing changes strategically so they make money. That pricing algorithm then may be the code that provides value.
Paradox in reading code - reading code is an antipattern,
Software engineering is change management. We need something that says - I can clearly see it used to do A and now it does B and I approve.
Rings of a kernel - https://mkdshare.dev/d/review-the-spec-not-the-diff-how-ai-changes-the-way-we-NTdScTRg
You can’t auto approve changes to the auto approval layer - which may be the “code that provides value” to Boris.
You may have created enough tests and harness code that you really can vibe code things straight to production, but then those tests and harness code become the “code that generates value”.
I don’t know exactly what the solution is, spec-driven development? but it probably includes something akin to protection rings ala the Linux Kernel. Outer rings can be changed freely by the AI, inner rings can’t.
Which is a good segway into our next section:
468 Words
0000-12-31 16:07