GitHub Copilot preview gives me hope

People have been predicting the death of computer programming for as long as I can remember. It hasn’t happened (yet) for a variety of reasons, the most important of which is that programming is as much an art as it is a science or an engineering discipline.

GitHub Copilot, billed as “Your AI pair programmer” and currently in a limited technical preview, takes a stab at helping to automate programming in a way that’s a bit beyond what IntelliSense and the like can provide. It’s not completely autonomous. You do have to declare (type out) your intentions before Copilot can generate meaningful code, as we’ll see, and you also do have to supervise Copilot to set it back on track when it inevitably slips off the rails.

Copilot is a cloud service with interfaces to Visual Studio Code (running on your own machine or running in the cloud on GitHub Codespaces); to JetBrains IDEs, such as IntelliJ IDEA; and to Neovim. The cloud service is a code prediction engine powered by OpenAI Codex, a language model trained on billions of lines of public code.

Yes, there has been controversy about Codex and Copilot. Before you start frothing at the mouth at Copilot’s potential copyright and privacy violations (I’m looking at you, Free Software Foundation), however, you need to understand that Codex was trained on publicly available code in a way often considered to be fair use within the machine learning community.

You also need to understand that Codex is a code synthesizer, not a search engine. The Copilot developers acknowledge that this may not be the last word on the subject:

… this is a new space, and we are keen to engage in a discussion with developers on these topics and lead the industry in setting appropriate standards for training AI models.

How GitHub Copilot works

According to GitHub, “OpenAI Codex was trained on publicly available source code and natural language, so it understands both programming and human languages. The GitHub Copilot editor extension sends your comments and code to the GitHub Copilot service, which then uses OpenAI Codex to synthesize and suggest individual lines and whole functions.” In addition, the service uses user choices to improve future suggestions.

Copyright © 2021 IDG Communications, Inc.

Source link