Free course · 12 lessons · Beginner
Coding with AI Assistants
Use AI coding assistants and agentic coding tools well: what they are good and bad at, giving them project context, asking for code in small steps with examples, reviewing generated code, test-first workflows, debugging from evidence, safe refactoring, plan-act-verify with agentic tools, security pitfalls such as hallucinated packages, secrets and licences, and team practices. Every lesson has a runnable example; the capstone builds a small CLI tool with an assistant.
1. Working With an AI Coding Assistant
What coding assistants are good and bad at, how to give them context, how to ask for code, and how to review what they write.
- How AI Coding Assistants Work, and Why They're Confidently Wrong — Assistants predict plausible code from patterns; that makes them fast and fluent, and sometimes wrong in ways that look right.
- Giving the Assistant the Right Context — Vague requests get generic code; project instructions, relevant files and conventions get code that fits.
- Asking for Code: Small Steps, Examples and Constraints — One giant request produces a giant diff you can't review; small steps with examples and constraints produce code you can trust.
- Reviewing AI-Written Code — Reviewing generated code needs a checklist: run it, read it line by line, check edge cases, dependencies and security.
2. Workflows That Work
Repeatable ways to use an assistant: tests first, debugging from evidence, safe refactoring, and agentic tools that plan, act and verify.
- Test-First With an Assistant — Write or agree the tests first, then let the assistant make them pass: you define correct, it does the typing.
- Debugging With an Assistant: Evidence, Not Guesses — "It doesn't work, fix it" gets random changes; a reproduction, the exact error and what you tried get real fixes.
- Refactoring Safely With AI — Assistants refactor quickly and change behaviour quietly; pin current behaviour with characterisation tests first.
- Agentic Coding Tools: Plan, Act, Verify — Tools that edit files and run commands are powerful; permissions, plans and verification keep you in control.
3. Risks and Team Practices
Security pitfalls in generated code, secrets and licences, and how teams adopt assistants without losing quality or skills.
- Security Pitfalls in AI-Generated Code — Generated code repeats insecure patterns from its training data and can import packages that don't exist; check for both.
- Secrets, Private Code and Licences — What you paste into an assistant may leave your machine; keep secrets out, follow your company's rules, and mind licences.
- Team Practices: Reviews, Ownership and Measuring Impact — "The AI wrote it" is not an owner; teams need clear ownership, review rules and honest measurement of what assistants change.
4. Capstone
Build a small project with an assistant, using the workflow from this course.
- Capstone: Build a Small CLI Tool With an Assistant — Plan, test, build and review a small command-line tool with an AI assistant, and document how you verified it.