Skip to Content
View all events

A Five-Step Framework for Effective AI-Assisted Coding

Published by O'Reilly Media, Inc.

Intermediate content levelIntermediate

Context, research, problem framing, critical thinking, and refining

What you’ll learn and how you can apply it

  • Craft context‑rich prompts that steer Copilot and chatbots toward correct, maintainable code
  • Write and leverage unit tests to constrain and verify AI‑generated solutions
  • Refactor AI drafts into readable, idiomatic code using Copilot Chat
  • Identify common AI failure modes and apply “trust but verify” techniques
  • Integrate AI‑assisted development into a simple CI pipeline for ongoing quality checks

Course description

Generative AI tools like GitHub Copilot promise dramatic productivity gains—for developers who can guide, verify, and refine the code they generate. But junior and intermediate developers often have trouble getting everything they’ve been promised from these tools, and that’s not their fault. This fast‑paced tutorial from Andrew Stellman helps you bridge the gap between “AI magic” and day‑to‑day software work.

You’ll learn a five‑plank framework for working with AI—context, research, problem framing, critical thinking, and refining—and practice each skill in hands‑on exercises drawn from the pages of Andrew’s book Head First C# and his Copilot course. By the end of the day, you can expect to scaffold an app from a single comment, turn tests into a safety net for AI, refactor with Copilot Chat, and wire the project into GitHub Actions, leaving with workflows you can use the next time you open your IDE.

This live event is for you because...

  • You’re a junior or intermediate developer.
  • You work with Java or C#, or you’re comfortable with examples in Java and C#.
  • You want to become more proficient with AI coding tools like ChatGPT and GitHub Copilot.

Prerequisites

  • Visual Studio Code (or another IDE) installed on your computer
  • A GitHub account with Copilot enabled (free trial or paid)
  • The Copilot extension or plug-in installed, enabled, connected to your account
  • Comfort writing and running code in Visual Studio Code or other IDE (Eclipse, Visual Studio, IntelliJ IDEA, etc.)
  • Basic knowledge of unit testing and Git

Recommended follow-up:

Schedule

The time frames are only estimates and may vary according to how the class is progressing.

Understanding the AI learning gap (20 minutes)

  • Presentation: Why the gap exists and the five‑plank roadmap
  • Group discussion: How has AI surprised you in your coding so far?
  • Hands-on exercise: Loop‑logic reality check—compare your iteration count to the AI’s answer
  • Q&A

Providing context that guides AI (35 minutes)

  • Presentation: Supplying context the AI actually needs
  • Group discussion: What kind of context does your current code base often lack?
  • Hands-on exercises: Finish the console betting game with Copilot, then review its code; generate XMLDoc/JavaDoc comments for a class and refine wording
  • Q&A
  • Break

Research and validation with AI (25 minutes)

  • Presentation: Researching efficiently and validating AI suggestions
  • Group discussion: What’s your go‑to tactic for catching hallucinations?
  • Hands-on exercises: Refactor a messy class for encapsulation using AI suggestions; go on a five‑minute fact‑hunt on SQL join efficiency, citing real sources
  • Q&A

Framing problems for accurate answers (30 minutes)

  • Presentation: Framing problems clearly and incrementally
  • Group discussion: Describe a time when reframing a bug changed the outcome
  • Hands-on exercises: Prompt‑engineering drill—iteratively improve a class with three prompt passes; explain and improve the CustomSorter with a single, clear request
  • Q&A
  • Break

Critical thinking in code review (25 minutes)

  • Presentation: Applying critical judgment to AI‑generated code
  • Group discussion: What red flags do you watch for in diff reviews?
  • Hands-on exercises: Generate a baseline unit test suite with AI and inspect failures; test edge cases using Copilot Chat’s “/tests add” command
  • Q&A

Refinement and automation capstone (45 minutes)

  • Presentation: Refining AI output and automating quality checks
  • Group discussion: Where could a quick CI gate save you from AI mistakes?
  • Hands-on exercises: Comment‑style suggestion experiment—see how three styles steer Copilot completions; build and test a math‑quiz game from scratch using Copilot’s comments as guides
  • Q&A

Your Instructor

Andrew Stellman

Andrew Stellman is a full-time software developer and team lead who’s passionate about writing great code. He’s the author of many books and reports published by O’Reilly, including Beautiful Teams, Learning Agile, and five editions of Head First C#. Andrew has been writing books and training people on software development, agile, project management, and other technical topics for over 20 years.

Xlinksearch

Skill covered

Generative AI