Copilot Best Practices (What Not To Do)
Summary
TLDRThe video provides best practices for using Copilot efficiently. Key points include not letting Copilot entirely control coding without oversight, using inline prompts and chat features appropriately, leveraging existing slash commands before creating new prompts, clearly establishing context so Copilot suggestions are relevant, and providing feedback to help Copilot improve over time. The goal is for developers to maximize Copilot's capabilities as an assistant while retaining responsibility as the pilot directing the coding.
Takeaways
- π Copilot is meant to assist, not fully replace the developer
- π©βπ» Review Copilot's code suggestions instead of blindly accepting them
- βοΈ You are the pilot, Copilot is the copilot - it should support you, not fly the plane
- βοΈ Use the right Copilot features for the task, like inline chat for code prompts
- π Don't recreate existing prompts - use slash commands for fixes and explanations
- πΊοΈ Keep relevant code selected and remove off track chat history to help Copilot's context
- π Add project files to give Copilot workspace context
- π Use up arrow in chat to reuse previous prompts
- π Use thumbs up/down and report issues to improve Copilot over time
- β Check out more Copilot best practice videos to optimize usage
Q & A
What is the main purpose of Copilot?
-Copilot is meant to be an assistant that helps developers write code faster and better by providing relevant code suggestions.
What are some things you should not do with Copilot?
-You should not let Copilot write full programs on its own without reviewing the code it produces. You should also not misuse Copilot's prompting tools or forget about context when asking it questions.
Why is it important to review Copilot's code suggestions?
-Copilot does not always produce correct, optimal, or secure code so it's important for developers to review everything Copilot generates before using it.
What is the best way to prompt Copilot when you are within code?
-When within code, you should use inline chat to prompt Copilot rather than comments, as inline chat is more efficient.
How can you improve Copilot's context when conversing with it?
-You can delete previous off-track questions, highlight code you want to ask about, and add relevant files to your project.
How can you navigate previous questions you asked Copilot?
-When your cursor is at the bottom of the chat panel, you can hit the up arrow key to access your previous questions to Copilot.
What feedback features does Copilot have?
-Copilot has thumbs up/thumbs down buttons to rate suggestions and an option to report issues to help it improve over time.
What are some common slash commands in Copilot?
-Some common slash commands are 'fix' to fix problems in code, 'explain' to get explanations of code, and 'test' to generate tests.
Why should you avoid recreating prompts?
-You should first check if a prompt already exists using the slash commands before manually recreating a prompt to be more efficient.
What Copilot agent is aware of your workspace context?
-The '@workspace' agent knows details about your current project files and workspace to provide better solutions.
Outlines
This section is available to paid users only. Please upgrade to access this part.
Upgrade NowMindmap
This section is available to paid users only. Please upgrade to access this part.
Upgrade NowKeywords
This section is available to paid users only. Please upgrade to access this part.
Upgrade NowHighlights
This section is available to paid users only. Please upgrade to access this part.
Upgrade NowTranscripts
This section is available to paid users only. Please upgrade to access this part.
Upgrade NowBrowse More Related Video
Unlock GitHub Copilotβs Full Potential: Advanced Features Youβre Overlooking!
GitHub Copilot Top Features Explained
GitHub Copilot tips and tricks
GitHub Copilot in 7 Minutes π¨βπ»π€π
Top 3 AI Coding Assistant for Programmers π€― | 2024
Write Code With GitHub Copilot... and Why It's Better Than ChatGPT
5.0 / 5 (0 votes)