Skip to main content
Welcome. In this lesson we explore an important evolution in software development: AI pair programming with GitHub Copilot. This approach combines human creativity and judgment with AI assistance to boost productivity, reduce repetitive work, and keep learning inside the editor. What you’ll learn:
  • What pair programming is and how AI pair programming differs
  • The benefits of GitHub Copilot
  • How developer workflows change before and after Copilot
  • Best practices: when to use Copilot and when to exercise caution
A presentation agenda slide showing four numbered items about pair programming and AI (introduction, comparison with traditional pair programming, benefits with Copilot, and workflow transformation). A dark left column displays the word "Agenda" with blue numbered markers next to each item.

What is pair programming?

Pair programming is a collaborative development practice where two people work together at the same workstation:
  • Driver: writes the code
  • Navigator: reviews the code, thinks ahead, spots edge cases, and suggests improvements
This model provides immediate feedback, encourages knowledge transfer, and often improves design decisions.

What is AI pair programming?

AI pair programming replaces—or augments—the human navigator with an AI partner. GitHub Copilot provides context-aware, inline suggestions based on the file you’re editing, the surrounding project, and patterns learned from large public codebases. Key differences from human partners:
  • Available 24/7
  • Scales across teams without scheduling
  • Produces suggestions but does not make final decisions—you accept, modify, or reject outputs
A presentation slide titled "AI Pair Programming" showing the GitHub Copilot mascot on the left and three feature highlights on the right. The highlights state real-time code suggestions, learning your coding style and patterns, and 24/7 availability that scales across teams.

Traditional vs AI pair programming — a comparison

Traditional pair programming and AI pair programming share the same goals (knowledge sharing, immediate feedback, error catching) but achieve them differently. Benefits of combining both:
  • Humans: creativity, intuition, architectural reasoning, mentorship
  • Copilot: fast access to patterns, consistent style, scaffolded tests and docs, faster prototyping

How workflows change

Before Copilot

Typical pre-Copilot workflow:
  • Write code
  • Consult documentation
  • Search Stack Overflow or examples
  • Review, refactor, and test
These steps introduce context switches that slow iteration.
A slide titled "Workflow: Before Copilot" showing a simple flowchart: write code, then check documentation, then search Stack Overflow. The steps are displayed as connected rounded rectangles on a pale background.

After Copilot

Copilot moves learning and discovery into the editor:
  • You write code and receive inline suggestions in real time
  • Accept, modify, or reject suggestions instantly
  • Contextual documentation and examples appear without leaving the editor
  • AI can assist with quick reviews, refactors, and test generation
This reduces context switching and shortens iteration cycles.
A slide showing a flowchart titled "Workflow: After Copilot" with steps: "Write code + Receive suggestions" → "Accept/Modify/Reject in real time" → "Documentation appears as you code" → "Review and refactor with AI assistance." The left side has a dark panel with the heading "Workflow: After Copilot."

Practical use cases: when Copilot excels

Copilot is particularly effective for tasks that are routine, pattern-based, or require fast scaffolding:
A presentation slide titled "When to Use Copilot" showing five colored panels that list use cases: repetitive tasks and boilerplate code, API integration patterns, test case generation, documentation writing, and converting comments to code. Each panel includes an icon and a number (01–05).

When to be cautious — human oversight needed

There are scenarios where AI suggestions require careful review and expert validation:
A presentation slide titled "When to Be Cautious" showing four colorful circular icons labeled: Security-critical code, Complex business logic, Performance-critical sections, and Licensed/Proprietary algorithms. The icons sit above a dark band across the bottom of the slide.
Always review AI-generated code for correctness, security, licensing, and performance. Copilot helps accelerate work, but does not replace expert validation.

Best practices for adopting Copilot

  • Start small: try Copilot on low-risk tasks such as boilerplate, tests, and docs.
  • Learn from suggestions: use prompts and edits as a way to discover APIs and idioms.
  • Establish team norms: share examples and review AI output as a team to standardize usage.
  • Iterate and measure: adjust how you use Copilot over time and measure outcomes (e.g., time saved, defect rates).
  • Keep responsibility clear: humans remain accountable for architecture, security, and legal compliance.
Treat Copilot as a force multiplier: it speeds routine work and surfaces possibilities, while humans retain responsibility for design, security, and correctness.

Conclusion — AI + Human collaboration

GitHub Copilot is a powerful assistant that complements developer expertise. When used thoughtfully, AI pair programming:
  • Accelerates routine work and scaffolding
  • Keeps learning and discovery inside the editor
  • Improves consistency and speed of prototyping
But it is not a replacement for human judgment on architecture, security, performance, or licensing. Adopt Copilot incrementally, validate outputs, and combine AI assistance with code review and expert oversight to get the best results.
A presentation slide titled "Conclusion" showing five numbered takeaways about AI pair programming. The points include: AI pair programming is a tool not a replacement, start small and expand, learn from suggestions, share experiences, and keep experimenting.
Further reading:

Watch Video