Codex is an artificial intelligence technology that writes and creates its own programs in 12 computer languages, and translates between them. It was built by the research laboratory OpenAI, and it is the reason the question in this headline stopped being hypothetical.
What happened when a programmer tested it
Tom Smith, an experienced programmer who supervises an AI startup called Gado Images, gave Codex the coding challenges programmers meet in interviews at large companies. Could it write a program that replaces spaces with dashes in a sentence? Could it detect invalid ZIP codes?
It did both almost instantly. In his words: “These are difficult problems for many humans to solve, myself included, and he wrote the answer in two seconds, it was shocking to see”.

- A person gives the system a programming task or instruction
- A neural network predicts patterns learned from large bodies of text and code
- The system produces a short, simple code draft
- A person reviews, tests and applies judgement to the result
Why it is not a replacement for programmers
Smith’s conclusion after working with Codex was that it boosts human productivity rather than threatening the people whose productivity it boosts. The technology performs well enough to be useful and still has unpolished aspects that need a person’s judgement.
He also saw a teaching use: a new generation can learn about computers by watching this type of AI technology write pieces of code, as a personal tutor rather than a replacement.
That pattern is not specific to Codex. Even the most spectacular AI systems have ended up complementing human work rather than replacing it — a conclusion we reached again from a different direction in AI in game development.
How a system learns to write code at all
Neural networks are what made this possible: a mathematical system that learns a skill by analysing enormous amounts of data, the way a machine comes to recognise a dog after thousands of photographs of dogs.
Around 2017, researchers pointed neural networks at very large amounts of prose — digital books, Wikipedia articles, text posted across the internet — and by identifying patterns those networks learned to predict the next word in a sequence. The programs that come out of that are short and simple, and they are still programs.
Where the same technology already is
The mechanism behind Codex is already in ordinary use: it recognises the commands you give your phone, translates between languages in applications and social media, and helps autonomous vehicles identify pedestrians and street signs.
What we take from it
New discoveries in artificial intelligence are a step forward for the people using them, and the limits they remove are our own. If you want to know what AI and ML could do inside your own product, talk to us — or read our blog for what we have been following.
Frequently asked questions
Can AI write its own code?
Codex, built by the research laboratory OpenAI, writes and creates its own programs in 12 computer languages and can translate from one programming language to another. The programs it produced in testing were short and simple, and the technology still has unpolished aspects that need a person.
What is Codex?
Codex is an artificial intelligence technology from OpenAI that writes programs in 12 computer languages and translates between them.
How was Codex tested?
Tom Smith, an experienced programmer who supervises an AI startup called Gado Images, set Codex the kind of coding challenges programmers face in interviews at large companies — writing a program that replaces spaces with dashes in a sentence, and one that detects invalid ZIP codes. Codex did both almost instantly.
Will AI replace programmers?
After working with Codex, Tom Smith concluded it could boost human productivity and help professional programmers rather than threaten them. The pattern holds more widely: even the most spectacular AI systems have ended up complementing human work rather than replacing it.
How did AI learn to write code?
Around 2017, researchers designed neural networks to analyse very large amounts of prose, including digital books and Wikipedia articles. By identifying patterns in text those networks learned to predict the next word in a sequence, and the same mechanism lets the system write short computer programs.
Where is this kind of AI already used day to day?
It recognises the commands you give a phone, translates between languages in applications and social media, and helps autonomous vehicles identify pedestrians and street signs.









































