Code pours from Feross Aboukhadijeh’s fingers.
As a devotee of the open source software movement, he has written immensely popular web apps, peer-to-peer file exchanges, and more than 100 other pieces of code that he has given away, all in the 10 years since he graduated from college. Lately, though, Aboukhadijeh has entered a new kind of flow state, helped along by a tool called Copilot. It’s a piece of artificially intelligent software that does some of the typing, and the thinking, for him.
Built by OpenAI, the private research lab, and GitHub, the Microsoft-owned website where programmers share code, the tool is essentially autocomplete for software development. Much as Gmail tries to finish a sentence as you write it, Copilot offers to complete a chunk of your program. The tool was released last summer to a select group of coders.
Aboukhadijeh quickly discovered that Copilot was good, almost unsettlingly so. He would begin typing a line of code, and within a few seconds the AI would figure out where he was headed—then, boom, the next four or five full lines would show up as light gray text, which he could accept by hitting Tab. When he saw it produce clean code that did exactly what he was intending, he found it a bit uncanny. “How is it getting these predictions?” he recalls wondering. “Some of them are really eerie.”
For weeks, Aboukhadijeh kept Copilot turned on while he worked. He discovered that it had other impressive tricks; it could even understand commands he wrote in basic English. If he simply typed into his code editor “Write a function that capitalizes every word in a document,” Copilot would assemble that code all by itself. He’d check to make sure it didn’t have errors; sometimes it did.
What’s more, the tool was improving his code. At one point, for example, Aboukhadijeh needed his software to recognize several different formats of text documents, so he ponderously listed all the formats, one by one, in his code. Copilot instead recommended a single, pithy command that elegantly swept them all together.
“I was like, how did it even … ?” he says, trailing off in stupefaction. He doesn’t think he’ll ever turn Copilot off.
Nor is he alone: Nine months after Copilot’s launch, tens of thousands of programmers have tried out the software. I spoke to 15 coders who’ve used it, and most, like Aboukhadijeh, found that it dramatically accelerates their pace—even as they were sometimes freaked out by how good it is. (“Just mind-blowing,” as Mike Krieger, who coded the original Instagram, put it.) Granted, they also noticed it making errors, ranging from boneheaded to distressingly subtle. GitHub and OpenAI have been tracking Copilot’s performance through anonymized data on how many suggested lines coders accept and how much they then store on GitHub. They’ve found that the AI writes a remarkable 35 percent of its users’ newly posted code.
Silicon Valley was abuzz with predictions that someone would suddenly unveil an AI that could outthink humans.
Ever since computers came to be, people have hunted for ways to make them easier to program. The very first American programmers, the women who created instructions for the ENIAC machine in 1945, had an almost laughably difficult job: They had to build logic with wires. In the ’50s, tapes and punch cards made the work slightly easier. Then came programming languages with English-like syntax, some of which—such as Basic or Cobol—were explicitly designed to encourage neophytes. By the ’90s, languages such as Python automated some of the most gnarly, frustrating parts of coding, like memory management. In the 2000s, the open source movement created a generation of programmers who rarely write things from scratch.
Suffice to say, the Hollywood image of a coder frantically typing out reams of code on their own hasn’t been true for years. By stitching together chunks written by others, individuals can crank out apps wildly more sophisticated than would have been possible 20 years ago. Copilot promises to be the next significant step in this decades-long trajectory.