Ch 13 — Best Practices & Pitfalls

The habits that make AI-assisted developers effective — and the traps that don’t
High Level
psychology
Mindset
arrow_forward
visibility
Review
arrow_forward
warning
Pitfalls
arrow_forward
groups
Teams
arrow_forward
school
Growth
arrow_forward
star
Master
-
Click play or press Space to begin...
Step- / 8
psychology
The Architect Mindset
Your role has changed — embrace it
From Author to Architect
The most effective AI-assisted developers have shifted their identity from code author to system architect + code reviewer. You define what to build, how it should work, and what quality standards to meet. The AI handles the typing. Your value is in judgment, not keystrokes.
The New Core Competencies
Context engineering — giving AI the right information
Specification writing — defining what “correct” means
Code review — catching what AI gets wrong
Architecture — designing systems AI can implement well
Debugging — diagnosing problems AI can’t see
Security awareness — knowing what to check
What Doesn’t Change
AI changes how you code, not what makes good software. Understanding data structures, algorithms, system design, networking, databases, and security fundamentals is more important than ever — because you need these skills to evaluate AI output, not just to write code yourself.
Key insight: The developers who get the most from AI aren’t the ones who delegate the most. They’re the ones who know exactly what to delegate, what to review carefully, and what to do themselves. Judgment is the skill AI can’t replace.
visibility
Code Review in the AI Era
The most critical skill for AI-assisted development
The Review Bottleneck
AI generates code faster than humans can review it. This creates a dangerous bottleneck: review fatigue. After 30 minutes of reviewing AI code, attention drops significantly. Reviewers detect only ~30% of automation errors when the system is generally reliable. The code that “looks right” gets waved through.
Review Strategies
Review the diff, not the file. Focus on what changed, not the whole file. AI-generated code is often verbose — reading every line is exhausting and ineffective.

Review in layers. First pass: architecture and approach. Second pass: logic and edge cases. Third pass: security and naming. Don’t try to catch everything in one read.
The Golden Rule
Never merge code you can’t explain. // If you can’t explain what a function does, // why it handles errors that way, or what // edge cases it covers — don’t merge it. // Ask the AI to explain it. // If the explanation doesn’t make sense, // the code probably doesn’t either. // You are responsible for every line // that enters your codebase, regardless // of who (or what) wrote it.
The evidence: AI-coauthored PRs show 1.7x more issues without rigorous review. The speed advantage of AI is real, but only if review discipline keeps pace. Speed without review is just faster bug production.
warning
The Skill Atrophy Trap
When AI makes you worse at the thing you need to be good at
Cognitive Offloading
A 2026 study found 48.8% of developer actions show cognitive bias when working with AI. The two most dangerous: automation bias (trusting AI output without verification) and cognitive offloading (delegating understanding to the AI, gradually losing the mental models needed to catch mistakes).
The Atrophy Cycle
You delegate a task to AI → You stop practicing that skill → Your ability to evaluate AI output in that area degrades → You miss more errors → You trust AI more because you can’t tell it’s wrong → Quality silently declines. This cycle is invisible until something breaks in production.
Prevention
1. Regularly code without AI assistance (even 1 hour/week maintains skills) 2. Always understand before accepting (ask AI to explain, then verify) 3. Do code reviews manually first (before running AI review tools) 4. Learn new concepts yourself (use AI to verify, not to learn from) 5. Maintain debugging skills (use breakpoints, not just AI diagnosis) 6. Write critical code yourself (auth, payments, data migrations)
The paradox: The better AI gets, the more important your own skills become. When AI handles 80% of coding, the remaining 20% is the hardest, most critical work — and you need deep expertise to do it well. AI amplifies skill; it doesn’t replace it.
do_not_disturb
The Over-Reliance Pitfalls
Common traps that experienced developers fall into
The Acceptance Trap
Accepting AI suggestions without reading them. Tab-Tab-Tab through completions because they “look right.” Each accepted suggestion is a training signal — you’re teaching the model that wrong code is acceptable. And you’re introducing bugs you haven’t reviewed.
The Delegation Trap
Using AI for tasks you don’t understand. “Set up the database connection” when you don’t know how database connections work. The AI produces something that works in development but fails under load, leaks connections, or has no error recovery. You can’t debug what you don’t understand.
The Speed Trap
Prioritizing generation speed over code quality. Shipping faster feels productive, but if 20% of that code has bugs, you’re creating a debugging backlog that grows faster than you can clear it. The net velocity is negative.
The Context Trap
Assuming the AI knows your codebase, your conventions, and your intent. It doesn’t. Every session starts from zero. Without rules files and explicit context, the AI generates generic code that doesn’t fit your project.
The antidote: Treat AI like a very fast, very knowledgeable junior developer. It can write code quickly but doesn’t understand your system, your users, or your business. You provide the judgment; it provides the speed.
groups
Team Practices for AI-Assisted Development
How teams stay coherent when everyone has an AI copilot
Shared Rules Files
Commit AGENTS.md / .cursorrules to the repository. Every team member’s AI follows the same conventions. Update rules when conventions change. Review rules files in PRs like any other code. This is the single most impactful team practice.
Prompt Templates
Create shared templates for common tasks (new endpoint, new component, migration). Store them in the repo. New team members get productive immediately because they inherit proven patterns. Consistent prompts produce consistent code.
Review Standards
All AI-generated code gets the same review as human-written code
Include the prompt in PR descriptions for context
Flag AI-generated sections for extra scrutiny on security
Rotate reviewers to prevent review fatigue
Time-box reviews to 30 minutes (attention drops after)
Knowledge Sharing
Share what works: effective prompts, useful rules, debugging techniques. Share what fails: common AI mistakes in your codebase, patterns that need extra review. Build a team knowledge base that makes everyone’s AI usage better.
The multiplier: A team with shared rules, templates, and review standards produces more consistent, higher-quality code than individual developers each using AI their own way. The investment in team practices compounds across every session.
school
Continuous Learning with AI
Using AI to learn faster without losing depth
AI as a Learning Accelerator
AI is an extraordinary learning tool when used correctly. Ask it to explain code, not just generate it. Ask why it chose a particular approach. Ask for alternatives and their trade-offs. Use AI as a tutor that answers questions at your pace, not as a black box that produces answers.
The Explain-Then-Generate Pattern
Before asking AI to write code for an unfamiliar concept, ask it to explain the concept first. Understand the theory, then see the implementation. This builds mental models that let you evaluate the generated code. Generating without understanding is just copying.
Deliberate Practice
Weekly skill maintenance: Monday Code one feature without AI Tuesday Review AI code extra carefully Wednesday Debug with breakpoints, not AI Thursday Learn a new concept, then verify with AI Friday Update rules file with week’s learnings // This isn’t about avoiding AI. // It’s about maintaining the skills // that make AI usage effective.
The growth mindset: AI doesn’t make learning obsolete — it changes what’s worth learning. Syntax and boilerplate matter less. Architecture, security, system design, and debugging matter more. Invest your learning time in the skills AI can’t do well.
checklist
The Daily Practice Checklist
Habits that compound over weeks and months
Before Each Session
Rules file up to date? Clear task scope defined? Right mode selected? (completion/chat/agent) Fresh session for new task?
During Each Session
Reading every suggestion before accepting? Providing context with @ mentions? Decomposing large tasks? Committing after each working feature? Running tests after changes?
After Each Session
Reviewed all generated code? Can explain every function? Security checklist passed? Tests cover critical paths? Rules file updated with new learnings?
Weekly
Coded without AI at least once? Learned something new (not just generated)? Shared a useful pattern with the team? Reviewed and pruned rules file?
Habit stacking: Don’t try to adopt all practices at once. Pick one per week. After a month, the habits are automatic. After three months, they’re part of how you work. Small consistent practices beat ambitious one-time efforts.
star
The 10 Commandments of AI-Assisted Development
The principles that separate professionals from amateurs
The Commandments
1. Never merge code you can’t explain. 2. Context quality beats prompt cleverness. 3. Tests are not optional. 4. Security is your responsibility, not AI’s. 5. Decompose before generating. 6. Review with the same rigor as human code. 7. Maintain your skills deliberately. 8. Invest in rules files and templates. 9. Know when to vibe and when to be disciplined. 10. AI amplifies skill. It doesn’t replace it.
The Bottom Line
AI-assisted development is the most significant shift in software engineering since the internet. It makes good developers dramatically more productive. But it also makes it easier than ever to produce bad code quickly. The difference between the two outcomes is discipline, judgment, and continuous learning.
Final thought: The best AI-assisted developers in 2026 aren’t the ones who use AI the most. They’re the ones who use it the most effectively — with clear intent, strong context, rigorous review, and the humility to know what they don’t know.