It's been out a while, but as I recently got onto the Technical Preview for GitHub Copilot here's a quick post on what's new 👇
What is it?
GitHub describes it as Your AI Pair Programmer.
It's like auto complete on AI steroids!
How does it work then?
Copilot needs access to your editor to see your code, so for me I installed the VS Code extension.
Once this is installed & authorised with your GitHub account it can then get context from your code.
Save my fingers
Copilot will convert your comments to code, autofill repetitive code and even write unit tests.
If you add some lines like below it can detect the pattern and complete the rest, this is great for avoiding large amounts of code block copying etc.
If you import a unit test package Copilot suggest tests that match your code.
Behind the scenes
Copilot is powered by OpenAI Codex and trained on public Internet text and billions of lines of code (Public GitHub repos).
So in essence any code you push to public GitHub repos could be part of the AI model that Copilot uses
Put it to the Test
Copilot instantly detected this and created the function stub below:
If you hit Tab it then completes the code for you.
To see more suggestion press Ctrl & Enter and a new tabs opens where you can select a solution.
Once chosen you can edit as needed and carry on coding.
Had enough? Fly solo
You can disable Copilot globally or just for specific languages though the VS Code extension.
Go for a Spin
I have only briefly explored Copilot but it's definitely the shape of things to come with AI and software development.
For coders this can really enhance productivity and save your fingers in the long run.
Check out the links below if you are interested in finding out more!