Have you been in the situation where you need to remember what is this code written by you some time ago about? Not even saying about you trying to understand someone else's code? GitHub Copilot Chat is a new way to code, where you can write code, fix bugs, write tests, and explain code to yourself and others in a chat window in a sidebar or inline. In this session, I'll demonstrate how GitHub Copilot Chat takes developer experience to the next level and how it can help you be more productive in your day-to-day work.
If your code could speak, what would it tell you? Let GitHub Copilot Chat help you find out!
1. If your code could speak,
what would it tell you? Let
GitHub Copilot Chat help
you find out!
Maxim Salnikov
Developer Productivity Lead
2. Maxim Salnikov
• Building on web platform since 90s
• Organizing developer communities and
technical conferences
• Speaking, training, blogging: Webdev,
Cloud, Generative AI
Help developers to succeed with the productivity tools
at Microsoft Western Europe
3. How to
stay in the
flow?
https://github.blog/2024-01-22-how-to-get-in-the-flow-while-coding-and-why-its-important/
• Improved test coverage
• Faster, cleaner, more secure
code writing
• Novel, creative solutions
• Speedier deployments
1. Challenge-skills balance
2. Total concentration
3. Clear goals
4. Immediate feedback
5. Transformation of time
6. Feeling intrinsically rewarded
7. Effortlessness
8. Loss of self-consciousness
9. Feeling of total control
5. Designing Brainstorming
More time on
Less time on
Focus on
what matters
most Writing Tests, Repetitive Code, & Boilerplate
Searching Documentation Finding Vulnerabilities
Deciphering Existing Code
Summarizing Changes and Comments
Correcting Syntax
Learning Git Commands
Collaborating Iterating
Planning
Debugging
6. The Copilot effect
Maximize developer happiness
Increase developer productivity
Accelerate software development
https://github.blog/2024-01-23-good-devex-increases-productivity/
10. Code completion:
save time and energy
on writing code
Convert comments to code
Autofill for repetitive code
Show alternatives
11. Chat:
Improve code quality with
contextual conversations
Context specific coding support
Explains concepts and specific code blocks
Debugging and vulnerability remediation assistance
19. • To have better experience and
control over code generation
• To go for other code-related tasks:
fix, explain, document & more
• To provide more context and keep
it
• To extend Copilot features to non-
code tasks: Terminal, IDE docs
Why chatting
with/about
your code?
20. How to start?
VS Code
Visual Studio
https://docs.github.com/en/copilot/github-copilot-chat/using-github-copilot-chat-in-your-ide?tool=vscode
21. Choose your
way to chat
https://code.visualstudio.com/docs/copilot/overview#_chat-features
Chat view
Ctrl-Alt-I
Ask Copilot for help with any task or question in the Chat
view, bringing in code from your current files
Inline Chat
Ctrl-I
Apply Copilot's AI suggestions directly to your code, staying in
the flow
Quick Chat
Ctrl-Shift-I
Bring up a Chat-powered dropdown for quick questions and
suggestions
+ Command palette
+ Context menu
+ Sparkles icons
22. Tips and tricks
Single responsibility Specific prompt Short response
Use for patterns (Regex, CRON)
Trust but verify
Iterate, iterate, iterate!
Provide extra context
24. How is context used?
https://github.blog/2023-05-17-how-github-copilot-is-getting-better-at-understanding-your-code/
25. @workspace
Agents
@terminal
@vscode
• GitHub's knowledge graph combined with semantic search
• Local code indexes
• VS Code's language services
Ctrl-Enter in Chat view
Knows how to gather context about the code in your workspace,
can help you navigate it, find relevant classes, files, etc.
Powered by:
• Knows about the operating system and the shell used
• Workspace information is conditionally pulled in
https://code.visualstudio.com/updates/v1_84#_chat-agents
• Knows about commands and features in the VS Code editor itself
26. Slash
commands
/doc
/explain
/fix
/generate
/help
/optimize
/tests
/new
/newNotebook
/help
to add a documentation comment
to explain the code including implementations of ref symbols
to propose a fix for the problems in the selected code
to generate code to answer your question
to get help with Copilot Chat
to analyze and improve the running time of the selected code
to create unit tests for the selected code
to scaffold code for a new workspace
to create a new Jupyter Notebook
to not remember everything above
“Create a new workspace with Node.js Express Pug TypeScript”
VS
“@workspace /new Node.js Express Pug TypeScript”
https://code.visualstudio.com/blogs/2023/11/13/vscode-copilot-smarter#_slash-commands