Introduction to GitHub Copilot
- 1. techupskills.com | techskillstransformations.com
© 2021 Brent C. Laster &
@techupskills
2
© 2023 Brent C. Laster &
GitHub Copilot
Presented by
Brent Laster
Tech Skills Transformations
© 2023 Brent C. Laster & Tech Skills Transformations LLC
All rights reserved
- 2. techupskills.com | techskillstransformations.com
© 2021 Brent C. Laster &
@techupskills
3
© 2023 Brent C. Laster &
About me • Founder, Tech Skills Transformations LLC
• R&D DevOps Director
• Global trainer – O'Reilly, NFJS, etc.
§ Git, GitHub, GitHub Actions
§ Jenkins, Gradle
§ Kubernetes, Tekton, Kustomize
§ Copilot, Codespaces
§ Etc.
• Author -
• O'Reilly "reports"
• Professional Git book
• Jenkins 2 – Up and Running book
• Learning GitHub Actions
• https://www.linkedin.com/in/brentlaster
• @BrentCLaster
• GitHub: brentlaster
© 2023 Brent C. Laster &
- 4. techupskills.com | techskillstransformations.com
© 2021 Brent C. Laster &
@techupskills
6
© 2023 Brent C. Laster &
What is GitHub Copilot?
• Cloud-based Generative AI tool
• Turns natural language prompts into coding suggestions
• Works across dozens of languages
• Trained on billions of lines of code
• Functions similar to an AI pair programmer*
• Works on multiple IDEs
• Needs to be paired with Copilot Chat (in beta) for best
experience/benefit
- 5. techupskills.com | techskillstransformations.com
© 2021 Brent C. Laster &
@techupskills
7
© 2023 Brent C. Laster &
How Copilot can help
• Code suggestions for nearly any current
language
• Comment driven code creation
• Automatic test generation
• SQL generation (for queries, tables, indices,
stored procs)
• Regular expression generation
• Pattern/mappings generation
• Document code
• Explain code
• Fixing code
• Reviewing code
• Translating code
• Generate K8s manifests
• What is the API to do...
• More!
Source: https://github.com/orgs/community/discussions/49422
• Generate boilerplate code
• Less time reading docs
• Less time recalling syntax
• Learning a new language
• Reduce cognitive load
• Let programmers focus on the problem more
- 6. techupskills.com | techskillstransformations.com
© 2021 Brent C. Laster &
@techupskills
8
© 2023 Brent C. Laster &
Challenges
• Should have human
oversight/review
• Only as good as context/prompt
• Learning curve
• Sometimes needs "nudging"
• Hallucinations
• Date problem
• Length of response
• Always generative - not
deterministic
• Some data going across
- 14. techupskills.com | techskillstransformations.com
© 2021 Brent C. Laster &
@techupskills
16
© 2023 Brent C. Laster &
Chat commands
• "slash commands" for key functionality
• allow users to perform common tasks w/o having to retype
prompt every time
• not all available in every IDE - VS Code has superset
• In some cases, invoke functionality that wouldn't be available
via prompts alone
- 15. techupskills.com | techskillstransformations.com
© 2021 Brent C. Laster &
@techupskills
17
© 2023 Brent C. Laster &
Microsoft Copilot AI
• Copilot will have real-time access to content
and context in Microsoft Graph
§ Graph - API dev platform to connect
multiple services
Microsoft Graph
v Business Data
v User Data
(emails, files, chats, meetings,
calendars, contacts)
Microsoft 365 Apps
AI Safety
Large Language Model
v GPT-4
v Codex
v DALL-E
• Asking a question in app,
§ Copilot sends data to Graph to
analyze / make sense of query
§ Data sent to GPT-4
§ Amswer from ChatGPT sent back to
Graph for
» Grounding
» Security
» Compliance Checks
- 16. techupskills.com | techskillstransformations.com
© 2021 Brent C. Laster &
@techupskills
18
© 2023 Brent C. Laster &
How Copilot works (high-level)
Public Code
training
install
copilot
and
start
writing
code
gather context
• filename
• other open files
• comments
• code before and after cursor
• whether last was accepted
- 17. techupskills.com | techskillstransformations.com
© 2021 Brent C. Laster &
@techupskills
19
© 2023 Brent C. Laster &
How Copilot works (high-level)
Public Code
gather context
• filename
• other open files
• comments
• code before and after cursor
• whether last was accepted
- 23. techupskills.com | techskillstransformations.com
© 2021 Brent C. Laster &
@techupskills
25
© 2023 Brent C. Laster &
Copilot X : Copilot for PRs - markers
• Available for tech preview now
• copilot: all - showcases all the
different kinds of content at once
• copilot: summary - expands to a 1
paragraph summary of changes in
the PR
• copilot: walkthrough - expands to
a detailed list of changes, including
links to relevant code
• copilot:poem - expands to a poem
about changes in the pull request
Source: https://githubnext.com/projects/copilot-for-pull-requests