Skip to content

Best Practices When Using Copilot

< Previous Challenge - Home - Next Challenge >

Introduction

Having explored GitHub Copilot's capabilities, it's time to dive deeper and refine your approach. This challenge will not only focus on adopting best practices for effective interaction with Copilot but also apply these strategies to integrate a new feature into your Whack-a-Mole game.

Description

In this challenge, you'll focus on learning best practices for working with GitHub Copilot to implement a new feature in your app. You'll learn the art of prompt engineering, which involves crafting inputs that guide Copilot to provide the most relevant and helpful suggestions. Research and experiment with the following techniques (and discover additional ones) to understand how they improve your results:

  • Start General, Then Get Specific: Begin with a broad description of your goal, then progressively add more specific requirements.

  • Break Complex Tasks Into Simpler Tasks: Decompose large problems into smaller, focused pieces that are easier to solve incrementally.

  • Give Examples: Provide examples of inputs, outputs, or patterns to help Copilot understand what you're looking for.

Success Criteria

You will have successfully completed this challenge when you:

  • Demonstrate the differences before and after leveraging prompt engineering techniques - show all three core techniques listed in the description, plus at least one additional prompt engineering example
  • Show that you have successfully integrated a new feature into your game

Learning Resources

Tips

  • Context comes in many forms for Copilot. Not only does it take context from what is around the cursor but also the filename and the other open tabs.