When Programs Write Programs

2014-04-29 21.50.49Humans are crappy coders. If an AI ever exists, it will completely reshape how we use programs.

Us humans really suck at coding. We wrestle with the IDE and toolchain. We need hours of reading and diagramming to grok uncommented code. We get tired and cut corners. We rush and build unmaintainable house-of-cards projects. We get our preferences and egos entangled with the project goals. We reinvent wheels, get distracted, make repeat mistakes, and accidentally leave code untested.

You can’t really blame us, because we’re so fundamentally unprepared for the task. We can’t touch code, so we need to work through command lines, paginated text, and crude, lossy visualizations. We can’t think or move rapidly enough to observe our code, so we slow it down with breakpoints. We need highly-abstracted languages like Python to code rapidly enough to finish a project, but at the cost of efficiency and control. Even then, a coder can barely interpret his own work mere weeks after it was written.

We work at arm’s length, abstracting out virtually everything, barely able to even see our work. We suck at coding.

To a computer, though, these tasks are trivial. The computer has direct access to its memory and procedures, able to modify and monitor them rapidly and reliably. The machine can work with code the way a human works with clay.

If you’ve ever used a compiler, you’ve used a program to write programs. If you’ve used a profiler, you’ve used a program to observe programs. The next step is a program to design programs.

An AI is a meta-programmer. Just like humans design and teach themselves new skills, an AI can write itself new functionality. The human can drop down layers of abstraction to bootstrap the AI into existence. The AI can in turn comprehend the human’s goals, establish feedback channels, and generate code using its low-abstraction advantages.

With an AI instead of an IDE, the programmer’s efficiency explodes. He can communicate the parameters and goals to the AI, which rapidly internalizes necessary protocols, assembles and debugs a program, and builds a front-end that the user can comprehend. The AI then does its best to evaluate whether the program fits the coder’s goals, and presents the programmer a testing plan. The programmer can then have the AI create sensory abstractions so he can study it, point out improvements, or feed in a sketch of an interface so the AI can capture the code into a standalone, deployable application.

When an AI is available, code becomes massively more robust and efficient. Not only are the programmer’s intentions translated directly to machine code by the AI, but the AI can step outside of them and help the programmer improve the ideas. The codebase doesn’t become less stable as it enlarges – the AI can intuitively comprehend it, understand when a bug or glitch occurs, and trace out the root cause, all without the programmer’s continued involvement.

Perhaps more importantly, code becomes ad-hoc. Programs that would take thousands of focused, trained man-hours to implement instead take a plain-English chat with an off-the-shelf AI. If it can be expressed, and the resources can be accessed, it can be executed right away. The only barrier between thought and action becomes the presence of a computer and a few data sources.

The fallout will be immediate. One person with a decent AI will outperform a modern Fortune 500 engineering department. Reimplementing a patented program for personal use becomes trivial. Kids will abandon pre-written code altogether and commission tools just-in-time. The API, hardware, and infrastructure providers will maintain a momentary advantage, but will collapse under AI-written hacks that leak their data and AI-developed replacements that copy their functionality.

Cyborgs will gain the most of all. Already used to wearing computers and using them in real-time, they’ll trade in their apps for AI’s and gain huge amounts of power. Forget searching for an answer – a wearer can commission and employ a Web scraper with predictive analytics to determine the answer mid-conversation. Forget downloading games – a group of friends can have one designed from scratch in the time it takes to explain the rules. With an AI and a wearable, there’s no meaningful line between intention and action.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s