The cat’s out of the bag. There are an infinite number of possible universes from our vantage point, and in exactly zero of these will the percentage of code written by humans increase. The best engineers, teams, and organizations will accept and learn how to adapt to this reality.
Current Views
AI is not currently great at saying no. Every update is additive. AI is not trained to remove code because it wants to hedge against irreversible loss.
In practice, it is designed to prefer writing unit tests against code it deactivates instead. It then writes integration tests against those unit tests, then guardrails for the integration tests against those unit tests, and so on and so forth, until only a reflexively defined and massively overgrown soup is left.
Generation without selection is not adaptation. Ralph-looping a stochastic process over and over again is not going to give us the good stuff.
We have tools that can generate tremendous amounts of code at little to no cost. With no pressure to rein in that code, no natural predators, so to speak, we create a habitat that is hospitable to all species of code regardless of fitness.
In a normal evolutionary environment, unchecked growth consumes enough resources that adaptation becomes necessary for survival. For AI-generated code, what is the resource being consumed here? Where do we expect evolutionary pressure to come from?
Humans Pay the Costs
I believe the latent capacity for us to tolerate inefficiency, noise, and illegibility obscures the reality that we pay a cognitive tax when interacting with and building software. In particular, because the cost of this sprawl, this erosion of top-down harmony, is incredibly difficult to measure, and because the counterfactual becomes harder and harder to imagine with sober eyes, we accept as inevitable the responsibility to absorb slop into the human interfaces to software systems and turn our attention to how to produce higher-quality slop instead.
I don’t believe the solution is a rejection of AI-generated code. After all, the saving grace of this code is that locally, it is almost categorically better code than anything we write ourselves. AI has unlimited willpower and appetite for rote work. It will not get tired and forget a semicolon at 2AM. There is value here we should not ignore.
The Future
I am optimistic there is a way forward. I believe a strong emphasis on contract-driven development will factor in here. My thoughts on this are still evolving, and I’m open to evidence to the contrary. I think the right approach, at least with today’s tools, is for humans to design and protect thin, opinionated interfaces and to have AI live freely within the boundaries those interfaces define.
My working thesis is that contracts and invariants supply the missing selection pressure on code flowing from the wellspring of AI tools. They force adaptation of that code against a higher-order architecture so that only that which is worth preserving survives.