Introduction to GitHub Copilot

Copilot overview

hubber gitstua @gitstua

May 2023

Basic

Compile it to try it

May 2023

Intellisense

Type and you get ideas from your code

May 2023

GitHub Copilot

AI synthesizes code from your code

May 2023

What is GitHub Copilot?

  • AI-powered paired programming assistant
  • Developed by GitHub and OpenAI
  • Uses machine learning models to suggest code snippets
May 2023

How GitHub Copilot works

  • Uses OpenAI Codex model
  • Analyzes context and patterns in codebase
  • Suggests relevant code snippets when you type
May 2023

Benefits of using GitHub Copilot

  • Faster coding
  • Improved accuracy
  • Learning tool
  • Less time writing the simple stuff
May 2023

Potential limitations of GitHub Copilot

We are constantly evaluating and improving Copilot including our vision of where you can improve the whole development cycle with our vision Copilot X.

  • Limited language support
  • Code quality process still required
  • May not compile
May 2023

Copilot for Business

  • Enterprise controls such as enforcing blocking suggestions matching public code
  • Proxy support
  • Allocate licences to users
May 2023

GitHub Copilot Demo 1

C#

May 2023

GitHub Copilot Demo 2

Terraform

May 2023

GitHub Copilot Demo 3

Python

May 2023

GitHub Copilot Demo 4

Markdown

May 2023

Future of GitHub Copilot

  • More tuned language support
  • Improving performance
  • Becoming an essential tool for developers
  • More than just code suggestions, but a full development assistant
May 2023

GitHub Copilot Demo GitHub Copilot X

This is the intent on where we are going in the next versions. We are figuring out how this will work and how to make it work for you.

May 2023

Conclusion

  • GitHub Copilot is your AI-paired programming assistant
  • Designed specifically to help synthesise code
  • GitHub Copilot for Business has enterprise controls
May 2023

Focus today was learning about GitHub Copilot functionality

We didn't cover any of the following:

  • GitHub Copilot pricing
  • Any legal considerations

For these topics I will refer you to the Copolit FAQ avalable at gh.io/copilotfaq

May 2023

PREP 1. vscode - remove copilot 2. vs code insiders - install copilot 3. ensure python3 is installed 4. ensure dotnet is installed 5. ensure terraform plugin is installed

It doesn't replace - Your unit tests - Your security tooling - Your code review process - Your code quality tooling - Functional tests

``` dotnet new console -o copilot ``` // obtain public ip address into variable // obtain public ip address into variable using httpclient // print public ip address //get the current date and time //print the current date and time //get the current temperaturein london using httpclient from bbc weather //print the current temperature in london //make a list of zoo animals //print 2 random animals from the list //get a list of the azure ip addresses for azure //get a list of australian states short codes //print a random australian state //print type of credit card based on number //validate email address

- get a quickstart from the web - add some new stuff

- download an image from the web and save it to disk - create a tumbnail - save the image as black and white - save the image as sepia

markdown presentation teaching the basics of azure presentation about dogs

OPEN THE GITHUB COPILOT X Chat GPT Panel 1. create a terraform file 2. create a threejs example, create a house 3. highlight some code and explain 4. ask it to summarize with fewer words 5. create some unit tests 6. /debug PR DOCS - https://copilot4docs.githubnext.com/ Voice CLI https://github.com/features/preview/copilot-x