Understanding Copilot
Pair programming is the idea of (usually two) developers working together, often in front of the same screen, also sometimes called “pairing.” GitHub Copilot can be seen as an “AI pair programmer” that helps you write code, enabling you to get more done, faster. It’s based on OpenAI’s Codex model, a new AI system trained on publicly available source code and natural language. But in reality, it has gone beyond this. Let’s denote GitHub Copilot as Copilot for the remainder of the book. Copilot suggests whole lines or entire functions right inside your editor.
How Copilot knows what to generate
The idea behind Copilot is that it learns from the code you and others have written and uses that knowledge to suggest new lines of code as you type.
How does Copilot work? It uses machine learning to build a model of the code you and others have written and suggests the best text for you to use next. There are...