Session 5
AI-Assisted Software Engineering
The Shift in Mental Model
Traditional
Write every line from memory or documentation
AI-Assisted
Direct the AI to write β Evaluate β Refine
You are the architect and quality controller. AI handles implementation volume.
Four Core Copilot Workflows
- Explain Code β select code β "Explain step by step"
- Generate from Comments β write what you want β accept suggestion
- Debug with Explanation β paste error + code β "What causes this?"
- Write Tests β select function β "Write three test cases: happy path, edge case, error"
The Evaluate-Refine Cycle
AI code is a first draft. Always ask:
- Does it run? (Syntax)
- Does it do what I asked? (Manual test)
- Does it handle edge cases? (Empty, large, unexpected input)
- Is it readable? (Maintainability)
- 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.
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