Improving developer experience with GitHub Copilot

()
Improving developer experience with GitHub Copilot

Introductions and overview (00:00:00)

  • Christopher Harrison introduces himself as a senior developer advocate at GitHub.
  • Harrison welcomes guest Allison Wines, a senior PM on the GitHub Copilot team.
  • Wines talks about enhancing developer experience with GitHub Copilot and its capacity to aid programmers.

Common Scenarios for using GitHub Copilot (00:00:45)

  • GitHub Copilot excels in generating boilerplate code and repetitive tasks such as scaffolding for new projects.
  • Helpful for tasks like creating data models, setting up database connections, and working with new frameworks.
  • Effective with regex expressions and cron jobs, which are easier for machines to interpret than humans.
  • Facilitates writing code for languages with a limited domain of options, like CSS for styling elements.
  • While Copilot can tackle more ambiguous coding tasks, it shines in areas with clear patterns.

Write a unit test with GitHub Copilot (00:05:15) & Generate a new page/file with GitHub Copilot (00:07:30)

  • Copilot assists with creating unit tests by following patterns after initial tests are written.
  • It becomes more efficient when provided with a function in the file and a couple of unit tests as context.
  • Copilot can work with internal libraries and frameworks by using existing files as prompts, thus generating better suggestions.
  • Recommendations from Copilot improve with more context, whether from comments or related files.
  • Analogous to asking for specific types of ice cream, providing more details yields better results; the more context given, the better Copilot's assistance.

Learn how to use context to get the most out of GitHub Copilot (00:10:30)

  • Providing clear and specific comments in code helps GitHub Copilot give better suggestions.
  • A mutual relationship with Copilot can enhance its performance by giving appropriate context.
  • Knowing how to integrate GitHub Copilot into existing workflows requires understanding its features like context utilization.
  • Different opinions exist about whether to leave comments in the code, but they can be essential for onboarding and understanding code for new developers or inheritors of the codebase.

Using comments as part of your artifacts with GitHub Copilot (00:12:58)

  • GitHub Copilot does not retain the context or prompts after suggestions are generated; they are deleted following a safety check.
  • The only data tracked is whether a suggestion was shown and accepted to monitor the model's performance.
  • Copilot's suggestions are influenced by the existing codebase's style, but it does not replace code cleanup or linting tools.
  • Users are encouraged to continue using their existing code styling and linting tools since Copilot is probabilistic and not always perfect. It might adapt to such in the future, but for now, manual linting remains necessary.

Overwhelmed by Endless Content?