Session 5 Slides: AI-Assisted Software Engineering

--:-- --
↓ Scroll for more

Session 5

AI-Assisted Software Engineering

AI Product Engineering

Block 2: AI-Assisted Engineering & Integration

Today’s Agenda

  • The Shift in Mental Model
  • Four Core Copilot Workflows
  • The Evaluate-Refine Cycle
  • What AI Cannot Replace
  • Interactive: Copilot Workflows (3 min)
  • Interactive: Trust the Copilot? (3–4 min)
  • Lab: Starter Kit (Core)

The Shift in Mental Model

Traditional

Write every line from memory or documentation

AI-Assisted

Direct the AI to write → EvaluateRefine

You are the architect and quality controller. AI handles implementation volume.

Four Core Copilot Workflows

  1. Explain Code — select code → "Explain step by step"
  2. Generate from Comments — write what you want → accept suggestion
  3. Debug with Explanation — paste error + code → "What causes this?"
  4. Write Tests — select function → "Write three test cases: happy path, edge case, error"

Interactive: Copilot Workflows (1/3) (3 min)

Choose the best engineer response.

Interactive: Copilot Workflows (2/3) (3 min)

Choose the best engineer response.

Interactive: Copilot Workflows (3/3) (3 min)

Choose the best engineer response.

The Evaluate-Refine Cycle

AI code is a first draft. Always ask:

  1. Does it run? (Syntax)
  2. Does it do what I asked? (Manual test)
  3. Does it handle edge cases? (Empty, large, unexpected input)
  4. Is it readable? (Maintainability)
  5. Is it secure? (Injection, credentials, trust)

What AI Cannot Replace

  • Novel architecture decisions — only you know your team's context
  • Business logic validation — only you know the correct calculation
  • Security edge cases — AI generates insecure code that looks correct
  • Integration debugging — AI frequently hallucinates the cause

Your role: provide the judgment these tasks require.

Interactive: Trust the Copilot? (1/3) (3–4 min)

True or false — then discuss one miss.

Interactive: Trust the Copilot? (2/3) (3–4 min)

True or false — then discuss one miss.

Interactive: Trust the Copilot? (3/3) (3–4 min)

True or false — then discuss one miss.

Lab: Starter Kit (Core) (1/2)

Clone the starter kit from the course GitHub repository.

  1. 5.1: npm installnpm run dev → Copilot-explain server.js + TODOs
  2. 5.2: Implement GET /health → JSON { ok: true } → break it → debug with Copilot

Lab: Starter Kit (Core) (2/2)

  1. 5.3: Sketch a small helper for /queryno API key in the browser
  2. 5.4: Write test cases or a debug write-up in 03-Project/Copilot-Notes.md

Stretch (after Core): extra route + how your product differs from the generic UI.

Session 5 Summary

  • AI shifts you from implementation writer to architect + QC
  • Four workflows: explain, generate, debug, test
  • Always apply the evaluate-refine cycle
  • AI fails at architecture, business logic, security, integration

Next Session: Rapid Application Prototyping