Getting Started with Github Copilot!

Geetika Kaushik
3 min readJul 8, 2021

What is GitHub Copilot?

GitHub Copilot is an AI pair programmer that helps you write code faster and with less work. GitHub Copilot draws context from comments and code, and suggests individual lines and whole functions instantly. GitHub Copilot is powered by OpenAI Codex, a new AI system created by OpenAI. The GitHub Copilot technical preview is available as a Visual Studio Code extension.

How does GitHub Copilot work?

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.

Does GitHub Copilot write perfect code?

Unfortunately, No. GitHub Copilot tries to understand your intent and to generate the best code it can, but the code it suggests may not always work, or even make sense. While they are working hard to make GitHub Copilot better, code suggested by GitHub Copilot should be carefully tested, reviewed, and vetted, like any other code. As the developer, you are always in charge.

Does it ??

How do I get the most out of GitHub Copilot?

It works best when you divide your code into small functions, use meaningful names for functions parameters, and write good docstrings and comments as you go. It also seems to do best when it’s helping you navigate unfamiliar libraries or frameworks.

What data has GitHub Copilot been trained on?

GitHub Copilot is powered by OpenAI Codex, a new AI system created by OpenAI. It has been trained on a selection of English language and source code from publicly available sources, including code in public repositories on GitHub.

Who owns the code GitHub Copilot helps me write?

GitHub Copilot is a tool, like a compiler or a pen. The suggestions GitHub Copilot generates, and the code you write with its help, belong to you, and you are responsible for it. It is recommended that you carefully test, review, and vet the code, as you would with any code you write yourself.

Can GitHub Copilot introduce insecure code in its suggestions?

There’s a lot of public code in the world with insecure coding patterns, bugs, or references to outdated APIs or idioms. When GitHub Copilot synthesizes code suggestions based on this data, it can also synthesize code that contains these undesirable patterns

Do I need to credit GitHub Copilot for helping me write code?

No at all folks!, the code you create with GitHub Copilot’s help belongs to you. While every friendly robot likes the occasional word of thanks, you are in no way obligated to credit GitHub Copilot (Evil Laughs). Just like with a compiler, the output of your use of GitHub Copilot belongs to you.

Credits: GitHub Copilot · Your AI pair programmer ;)

Hope you liked the article guys !❤

Comment down your thoughts!

--

--