Codex, AI Capable of Translating Natural Language to JavaScript Code

Codex, AI Capable of Translating Natural Language to JavaScript Code

In recent weeks we are seeing great advances in the field of programming, and all of them thanks to Artificial Intelligence. Without going any further, Microsoft has recently launched a new tool called GitHub Copilot , an AI capable of deducing the code we need to complete functions and writing it optimally and automatically. Now, thanks to OpenAI, we have been able to meet a new AI thanks to which writing code is not going to be more complicated than talking: this is Codex .

What is Codex and how does it work

Codex is a new Artificial Intelligence designed to make it easier for users to write javaScript code. This new AI is trained using public GitHub code (such as GitHub Copilot) so that it is able to understand what we are writing, using our natural language (for now, compatible with 12 languages) and generate the corresponding JavaScript code. In addition, as is obvious, it has also been trained using natural language spoken (or, rather, written) by people.

Thanks to this, for example, we can write “make a ball bounce on the screen” to generate a script that does that, or even more complicated tasks, such as “when you click on the ball, the message” boing “will appear on the screen. screen, and it will start to move 4 times faster for 1 second. ” And, likewise, it will generate code that will do exactly that.

We can see to what extent it is capable of creating code, and some of its many possibilities, in the following OpenIA demo video in which they even teach us how to create a game.

The possibilities included in this new Artificial Intelligence range from communication functions with a web server to keyboard controls and manipulations of objects and animations. It is able to know where the element is located (in case we use, for example, the “fall” action). And he is also aware of the work that we are sending him so that he can keep names and variables.

How to test this new Artificial Intelligence

At the moment, this new Artificial Intelligence is in a private beta phase. Some developers who once signed up for the Codex test will receive an invitation that will allow them to have a first contact with this new AI. If we have not signed up yet, and we want to try it, we will be able to join the waiting list from this link. During the testing phase, this AI will be free for users, although when it comes out of beta it will become a commercial product. Although, for now, there are not many more details about it.

As with Copilot, despite its capabilities, its creators see it as nothing more than a new help system for programmers. It is one more addition, such as syntax highlighting or suggestions that any IDE can show us. It will not save programmers work (since the code will have to be revised anyway, and maybe even modified). Much less will it eliminate jobs.

Codex wants to be like a kind of partner of the programmer, a second opinion that allows us to know a new point of view. And why not help us a bit when we’re stuck. But you are still far from thinking like a programmer.