Meet GitHub Copilot, a new AI pair programmer that can suggest whole lines or entire functions of code

Reading time icon 2 min. read


Readers help support MSPoweruser. When you make a purchase using links on our site, we may earn an affiliate commission. Tooltip Icon

Read the affiliate disclosure page to find out how can you help MSPoweruser effortlessly and without spending any money. Read more

Microsoft GitHub AI Copilot

Microsoft GitHub AI Copilot

Microsoft’s GitHub today announced GitHub Copilot, a new AI pair programmer that can offer suggestions for whole lines or entire functions right inside your IDE. GitHub Copilot will support variety of languages and frameworks, but the current technical preview version works well for Python, JavaScript, TypeScript, Ruby and Go. GitHub Copilot is powered by OpenAI Codex, a new AI system created by OpenAI. Copilot was trained on billions of lines of public code.

GitHub Copilot understands significantly more context than most code assistants. So, whether it’s in a docstring, comment, function name, or the code itself, GitHub Copilot uses the context you’ve provided and synthesizes code to match.

GitHub Copilot features:

  • Convert comments to code: Write a comment describing the logic you want, and let GitHub Copilot assemble the code for you.
  • Autofill for repetitive code: GitHub Copilot works great for quickly producing boilerplate and repetitive code patterns. Feed it a few examples and let it generate the rest!
  • Tests without the toil: Tests are the backbone of any robust software engineering project. Import a unit test package, and let GitHub Copilot suggest tests that match your implementation code.
  • Show me alternatives: Want to evaluate a few different approaches? GitHub Copilot can show you a list of solutions. Use the code as provided, or edit it to meet your needs.

GitHub Copilot is available today as a Visual Studio Code extension. Before trying out Copilot, be sure to check out the following Q&A from GitHub team.

How good is GitHub Copilot?
We recently benchmarked against a set of Python functions that have good test coverage in open source repos. We blanked out the function bodies and asked GitHub Copilot to fill them in. The model got this right 43% of the time on the first try, and 57% of the time when allowed 10 attempts. And it’s getting smarter all the time.
Does GitHub Copilot write perfect code? 
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 we 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.

You can learn more about GitHub Copilot here.

More about the topics: Github, GitHub Copilot

Leave a Reply

Your email address will not be published. Required fields are marked *