Chapter 26 Quiz: Learning to Code

Answer all questions from memory before checking the answer key.


Question 1

What is "tutorial hell," and why does it occur despite seemingly genuine learning during tutorials?

A) Tutorial hell occurs when tutorials are too long and learners lose focus before finishing; it's caused by poor tutorial design B) Tutorial hell is the state where a learner can follow tutorials with high comprehension but cannot write original code; it occurs because tutorials activate recognition (following along) rather than practicing the recall and generation that real programming requires C) Tutorial hell occurs when learners watch too many tutorials and become paralyzed by choice; it's solved by picking one tutorial and sticking with it D) Tutorial hell is the state of depending on tutorials for motivation; it's solved by setting up external accountability


Question 2

What makes programming cognitively unusual and specifically difficult to learn compared to declarative knowledge?

A) Programming requires memorizing extremely large amounts of syntax, which is more taxing than factual memorization B) Programming is difficult because the field changes so rapidly that anything learned becomes outdated quickly C) Programming requires building mental models of invisible processes — the computer's execution is hidden, making it unusually difficult to build accurate intuitions from observation D) Programming is difficult because there is only one correct solution to any given problem, with no room for approximation


Question 3

According to this chapter, what is the single most important change a programmer stuck in tutorial hell can make?

A) Find better tutorials — shorter, more focused, with better explanations B) Join a bootcamp with professional instruction and accountability C) After completing each tutorial section, close the tutorial and implement the concepts from scratch on a different problem, requiring genuine generation rather than recognition D) Reduce the number of tutorials you follow simultaneously and focus on completing one thoroughly


Question 4

What are code katas, and what is the recommended approach to getting the most from platforms like Exercism.io?

A) Code katas are large showcase projects; Exercism.io should be used by comparing your solution to others before submitting B) Code katas are small, focused programming exercises for practicing specific patterns; the recommended approach is to attempt without hints, submit your solution, then read and understand community solutions that differ significantly from yours C) Code katas are pairs of exercises done with a partner; Exercism.io should be used competitively to measure your speed against others D) Code katas are documentation exercises; Exercism.io should be used to practice writing clear code comments and READMEs


Question 5

What is the "program in your head" mental model, and why is it important?

A) The ability to memorize programs completely, which reduces the need for documentation B) The ability to trace code execution mentally without running it — an expert capability that allows programmers to reason about behavior, anticipate outputs, and identify bugs before running anything C) A visualization technique where you imagine a program running as an animation to understand its behavior D) The practice of mentally planning an entire program architecture before writing any code


Question 6

Regarding spaced repetition for programming, which category of knowledge is recommended for Anki and which is not?

A) Syntax should definitely go in Anki; concepts and principles should just be learned through use B) Both syntax and concepts should go in Anki; the more you memorize the better C) Syntax is not worth memorizing explicitly (look it up when needed); concepts, principles, and algorithm patterns are worth building through retrieval practice D) Nothing in programming benefits from spaced repetition; programming knowledge is best maintained through daily practice


Question 7

What distinguishes the expert debugging approach from the novice debugging approach?

A) Experts use better debugging tools; novices rely on print statements B) Experts debug by understanding the cause before attempting any fix; novices fix symptoms through trial-and-error and random changes C) Experts ask colleagues for help; novices struggle alone and waste time D) Experts use AI assistants for debugging; novices search Stack Overflow


Question 8

What is the "generate first" protocol for AI coding assistants, and why does it matter for learning?

A) Generate the full prompt for the AI first, then ask your question; this produces better AI output B) Generate the full project idea first, then use AI to execute it; this maintains your ownership of the project direction C) Attempt the problem yourself for at least 20 minutes before any AI consultation; this matters because the generation effect shows that struggling to produce an answer (even incorrectly) produces better learning than receiving the answer first D) Generate automated tests first before writing code; AI can then verify that your implementation passes them


Question 9

What is the "I understand it when I read it" trap in the context of AI-generated code?

A) The tendency to use AI-generated variable names without thinking about whether they're descriptive B) The fluency illusion applied to AI output: reading and comprehending AI-generated code produces the feeling of understanding without building the ability to write similar code independently C) The mistake of reading AI output before understanding the problem yourself, which leads to copying solutions you don't need D) The problem of AI code that seems clear but contains subtle bugs that only emerge in edge cases


Question 10

According to this chapter's realistic timeline, how long does it realistically take to go from beginner to junior developer level?

A) 3–6 months of full-time intensive study, as most bootcamps advertise B) 6 months minimum, with no upper limit C) 12–24 months of serious deliberate work — closer to 12 with good methodology, closer to 24 or longer with tutorial-following only D) 5+ years minimum, comparable to a traditional computer science degree


Question 11

What does the chapter recommend regarding reading open-source code, and why?

A) Reading open-source code is too advanced for learners; it should only be done after reaching senior developer level B) Reading other people's code is among the most undervalued programming practices; it exposes you to professional patterns, idioms, and design decisions that you wouldn't generate yourself C) Open-source code should only be read to find bugs to report; learning code should be read only in tutorial contexts D) Reading open-source code is useful primarily for understanding documentation practices, not for learning programming techniques


Question 12

David's escape from tutorial hell involved what specific change to his learning approach?

A) He stopped using tutorials entirely and switched to a university course with formal instruction and exams B) He hired a professional tutor who watched him code and provided immediate feedback C) After each chapter, he closed the textbook and implemented the concepts from scratch on a new problem, requiring him to identify specific gaps and look them up independently rather than passively following examples D) He started taking detailed notes during tutorials and reviewing them with spaced repetition


Answer Key

1. B — Tutorial hell is the state of being able to follow tutorials but not write original code. Tutorials activate recognition (following a demonstrated solution) rather than recall and generation (creating solutions to new problems), producing comprehension without programming skill.

2. C — Programming requires building mental models of invisible processes. The computer's execution is hidden, making it uniquely difficult to build intuitions through direct observation — unlike physical skills or declarative knowledge with more accessible feedback.

3. C — Close the tutorial after each section and implement the concepts from scratch on a different problem. This is the essential escape from recognition-only practice into genuine generation-based learning.

4. B — Code katas are small, focused programming exercises. The most effective Exercism.io approach: attempt without hints, submit, read community solutions that differ significantly from yours, understand why they work, and note what you learned.

5. B — The "program in your head" model is the ability to trace execution mentally — predicting what code will do before running it. Experts can reason about behavior and identify bugs without running the code; novices run code to find out what happens.

6. C — Syntax is not worth explicit memorization; look it up when needed. Concepts, principles, and algorithm patterns (when to apply what approach) benefit from deliberate retrieval practice.

7. B — Experts diagnose cause before attempting any fix. Novices try random changes or copy-paste fixes without understanding why the bug occurred, which produces "solved" bugs that don't build understanding.

8. C — Attempt the problem yourself for 20+ minutes before consulting AI. The generation effect means that struggling to produce an answer — even unsuccessfully — produces substantially better learning than receiving the answer immediately.

9. B — Reading AI-generated code produces the fluency illusion (understanding while reading without ability to independently generate). AI output is particularly susceptible because it's calibrated to your vocabulary and sounds authoritative.

10. C — 12–24 months of serious deliberate work is realistic: closer to 12 with strong methodology (implement-first, deliberate practice, code reading), closer to 24 or longer with tutorial-following without generation practice.

11. B — Reading other people's code is undervalued and extremely valuable. Professional open-source code exposes you to patterns, idioms, and design decisions — the equivalent of reading master games in chess.

12. C — David closed the textbook after each chapter and implemented the concepts from scratch on new problems. This forced genuine generation and identified specific gaps that passive tutorial-following had concealed.