-
Notifications
You must be signed in to change notification settings - Fork 0
Exercise: Getting Started with GitHub Copilot #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Step 1: Hello CopilotWelcome to your "Getting Started with GitHub Copilot" exercise! 🤖 In this exercise, you will be using different GitHub Copilot features to work on a website that allows students of Mergington High School to sign up for extracurricular activities. 🎻 ⚽️ ♟️ ![]() What is GitHub Copilot?![]() GitHub Copilot is an AI coding assistant that helps you write code faster and with less effort, allowing you to focus more energy on problem solving and collaboration. GitHub Copilot has been proven to increase developer productivity and accelerate the pace of software development. For more information, see Research: quantifying GitHub Copilot’s impact on developer productivity and happiness in the GitHub blog. Your most common interactions will likely be:
Tip You can learn more about current and upcoming features in the GitHub Copilot Features documentation. You can also select different models and make your own extensions, but that's for a different lesson! How can I use GitHub Copilot?As you work, you'll find GitHub Copilot can help out in several places across the website and in your favorite coding environments such as VS Code, Jet Brains, and Xcode! For today's coding though, we will practice with VS Code in a preconfigured development environment known as Codespace. ⌨️ Activity: Get a project intro from Copilot ChatLet's start up our development environment, use copilot to learn a bit about the project, and then give it a test run.
⌨️ Activity: Use Copilot to help remember a terminal command 🙋Great work! Now that we are familiar with the app and we know it works, let's ask copilot for help starting a branch so we can do some customizing.
Having trouble? 🤷If you don't get feedback, here are some things to check:
|
Step 2: Getting work done with CopilotIn the previous step, GitHub Copilot was able to help us onboard to the project. That alone is a huge time saver, but now let's get some work done! We recently learned there is a bug where students are registering for the same activities twice. That simply isn't acceptable, so let's get it fixed! Unfortunately, we were given little information to solve this problem. So, let's enlist Copilot to help find the problem area and get a potential solution made. But before we do that, let's learn a bit more about Copilot! 🧑🚀 How does Copilot work?In short, you can think of Copilot like a very focused coworker. To be effective with them, you need to provide them background (context) and clear direction (prompts). Additionally, different people are better at different things because of their unique experiences (models).
⌨️ Activity: Use Copilot to fix our registration bug 🐛
⌨️ Activity: Let Copilot generate sample data 📋In new project developments, it's often helpful to have some realistic looking fake data for testing. Copilot is excellent at this task, so let's add some more sample activities and introduce another way to interact with Copilot using Inline Chat Inline Chat and the Copilot Chat panel are very similar tools, but with slightly different automatic context. As such, while Copilot Chat is good at explaining about the project, inline chat might feel more natural for asking about a particular line or function.
Example ResultsCopilot is growing every day and may not always produce the same results. If you are unhappy with the suggestions, here is an example result we produced during the making of this exercise. You can use it to continue forward, if having trouble. # In-memory activity database
activities = {
"Chess Club": {
"description": "Learn strategies and compete in chess tournaments",
"schedule": "Fridays, 3:30 PM - 5:00 PM",
"max_participants": 12,
"participants": ["[email protected]", "[email protected]"]
},
"Programming Class": {
"description": "Learn programming fundamentals and build software projects",
"schedule": "Tuesdays and Thursdays, 3:30 PM - 4:30 PM",
"max_participants": 20,
"participants": ["[email protected]", "[email protected]"]
},
"Gym Class": {
"description": "Physical education and sports activities",
"schedule": "Mondays, Wednesdays, Fridays, 2:00 PM - 3:00 PM",
"max_participants": 30,
"participants": ["[email protected]", "[email protected]"]
},
"Basketball Team": {
"description": "Competitive basketball training and games",
"schedule": "Tuesdays and Thursdays, 4:00 PM - 6:00 PM",
"max_participants": 15,
"participants": []
},
"Swimming Club": {
"description": "Swimming training and water sports",
"schedule": "Mondays and Wednesdays, 3:30 PM - 5:00 PM",
"max_participants": 20,
"participants": []
},
"Art Studio": {
"description": "Express creativity through painting and drawing",
"schedule": "Wednesdays, 3:30 PM - 5:00 PM",
"max_participants": 15,
"participants": []
},
"Drama Club": {
"description": "Theater arts and performance training",
"schedule": "Tuesdays, 4:00 PM - 6:00 PM",
"max_participants": 25,
"participants": []
},
"Debate Team": {
"description": "Learn public speaking and argumentation skills",
"schedule": "Thursdays, 3:30 PM - 5:00 PM",
"max_participants": 16,
"participants": []
},
"Science Club": {
"description": "Hands-on experiments and scientific exploration",
"schedule": "Fridays, 3:30 PM - 5:00 PM",
"max_participants": 20,
"participants": []
}
} ⌨️ Activity: Use Copilot to describe our work 💬Nice work fixing that bug and expanding the example activities! Now let's get our work committed and pushed to GitHub, again with the help of Copilot!
Having trouble? 🤷If you don't get feedback, here are some things to check:
|
Step 3: Getting work done even faster with Copilot EditsIn our previous steps, we used features of Copilot that require more hands-on guidance and they produced mostly localized results. Now, we will explore Copilot Edits, a feature that allows working more holistically on our repo. Copilot Edits is an AI-powered code editing session to make changes across multiple files using natural language, and applies the edits directly in the editor, where you can review them in-place, with the full context of the surrounding code. Key features
How it works
⌨️ Activity: Use Copilot to add a new feature! 🚀
Having trouble? 🤷If you don't get feedback, here are some things to check:
|
Step 3 - Fail ❌Some checks failed. Please review the results below and try again.Time to find the bug! 🤔
Tips
|
Done |
Getting Started with GitHub Copilot
👋 Hey there david-juran! Welcome to your Skills exercise!
Welcome to the exciting world of GitHub Copilot! 🚀 In this exercise, you'll unlock the potential of this AI-powered coding assistant to accelerate your development process. Let's dive in and have some fun exploring the future of coding together! 💻✨
As you complete each step, I will respond in the comments to:
Good luck and have fun!
- Mona
The text was updated successfully, but these errors were encountered: