Development Practices


Practice Across Development Practices

Use the master deck when you want a mixed review of code-reading, debugging, review, AI, prompting, code-smell, and refactoring vocabulary. Use the master quiz to practice deciding which engineering practice fits a realistic maintenance situation.

Development Practices Master Flashcards

A comprehensive mix of the development-practices flashcards with standalone decks: comprehension, debugging, GenAI, review, code smells, refactoring, and beacons.

Difficulty: Basic

What are the three kinds of cognitive load in code comprehension?

Difficulty: Basic

How do bottom-up and top-down comprehension differ?

Difficulty: Intermediate

What are the four components of the integrated meta-model of program comprehension?

Difficulty: Intermediate

What should a reviewer do during the orientation phase before reading a complex diff?

Difficulty: Advanced

Why can cyclomatic complexity under-predict human difficulty?

Difficulty: Intermediate

What is the architecture-code gap?

Difficulty: Advanced

Why can excessive abstraction make code harder to understand?

Difficulty: Intermediate

Name three practices that make code easier to comprehend top-down.

Difficulty: Basic

What is top-down code comprehension?

Difficulty: Basic

How does schema activation help expert programmers read code faster?

Difficulty: Advanced

What is a dangling purpose link in a reader’s mental model?

Difficulty: Basic

What is the Stepdown Rule?

Difficulty: Basic

How does the Newspaper Metaphor apply to source files?

Difficulty: Intermediate

Why do experts switch between top-down and bottom-up comprehension?

Difficulty: Advanced

When can a design pattern hurt top-down comprehension?

Difficulty: Intermediate

Which IDE features support top-down comprehension?

Difficulty: Basic

What is a code beacon?

Difficulty: Basic

Why are full-word identifiers powerful lexical beacons?

Difficulty: Basic

What is a structural beacon?

Difficulty: Basic

How do tests act as beacons?

Difficulty: Basic

How do assertions act as beacons?

Difficulty: Advanced

What is the Singleton naming paradox for beacons?

Difficulty: Intermediate

How do contextual beacons extend beyond source code during review?

Difficulty: Intermediate

Why do experts avoid exhaustive tracing when beacons are reliable?

Difficulty: Intermediate

Define fault, error, and failure — and explain why keeping them distinct changes how you debug.

Difficulty: Basic

Name the four steps of the systematic debugging process, in order.

Difficulty: Basic

Why does reproducing the bug come before trying to fix it? What are you trying to capture?

Difficulty: Intermediate

What is regression testing, and how does it relate to the bug-reproduction test you wrote in step 1?

Difficulty: Intermediate

When debugging your own code, when should you reach for search engines / AI tools vs a debugger? Give the rule.

Difficulty: Basic

You’re explaining your code to a colleague at their desk. Halfway through line 12 you stop, stare, and say ‘oh.’ You’ve just fixed the bug yourself. Name the phenomenon and the technique.

Difficulty: Advanced

Compare an assertion (assert x > 0) and an exception (if x <= 0: raise ValueError). When is each appropriate?

Difficulty: Basic

Your loop iterates 50,000 times and the bug only appears around iteration 12,000. How do you avoid clicking Step Over 12,000 times?

Difficulty: Intermediate

What is a time-travel debugger, and what does it do that an ordinary debugger cannot?

Difficulty: Advanced

You write try: do_thing(); except: pass and tell your team ‘this is fault-tolerant.’ Why is this misleading?

Difficulty: Advanced

A regression test passed two weeks ago and fails today. There are ~200 commits between the two versions and no obvious culprit in the diff. What’s the right move, and why does it scale better than the alternatives?

Difficulty: Advanced

You just landed a bug fix. The failing reproduction test now passes. What three more things should you do before calling the bug closed?

Difficulty: Advanced

Your team has a 200-step manual reproduction of an intermittent bug. Before fixing the bug, what should you do to the reproduction itself, and why?

Difficulty: Advanced

Look at this debugger trace. After input_radius = sys.argv[1], the watch panel shows input_radius = '10' (with quotes). Two steps later, diameter = 2 * radius produces diameter = '1010'. What’s the bug and where is it?

Difficulty: Advanced

A new colleague says: “I’ve been debugging for 4 hours. I’ve read the function 50 times. I just can’t see what’s wrong.” Diagnose what’s happening and prescribe the next 30 minutes.

Difficulty: Basic

What does it mean to call an LLM a statistical parrot?

Difficulty: Intermediate

Why is GenAI’s productivity boost (21–50%) smaller than the compiler revolution (10x)?

Difficulty: Basic

Name the three stages of LLM development.

Difficulty: Intermediate

What is the illusion of AI productivity, and how do you avoid being fooled by it?

Difficulty: Advanced

Why do AI-generated codebases tend to have higher security vulnerability rates?

Difficulty: Basic

What is cognitive offloading, and why is it harmful for junior engineers?

Difficulty: Basic

What is the Supervisor Mentality for working with GenAI?

Difficulty: Intermediate

Compare the Driver and Navigator roles in AI pair programming.

Difficulty: Intermediate

What is Test-Driven Generation (TDG), and what are its four steps?

Difficulty: Advanced

Why does loose coupling amplify AI effectiveness, and tight coupling sabotage it?

Difficulty: Intermediate

Why is AI inference typically non-deterministic, and what does that mean for testing?

Difficulty: Basic

What is an AI hallucination in coding, and why is it especially dangerous?

Difficulty: Advanced

Why do AI-augmented codebases tend to show rising code complexity and static-analysis warnings?

Difficulty: Intermediate

Why does the leverage of an engineer’s work shift from producing code to specifying and verifying it in the GenAI era?

Difficulty: Advanced

Why is prompt and context engineering considered a load-bearing engineering skill rather than a UI trick?

Difficulty: Basic

What is vibe coding, and what is the professional alternative?

Difficulty: Basic

What does an AI coding agent add on top of a plain chatbot?

Difficulty: Intermediate

What is a prompt injection risk for coding agents?

Difficulty: Basic

Why are skill files or project rule files useful for AI-assisted development?

Difficulty: Intermediate

Why should large AI tasks start in plan mode?

Difficulty: Intermediate

Why is dumping the entire repository into an AI context often worse than selecting relevant files?

Difficulty: Advanced

What is a design-decision prompt, and why is it useful?

Difficulty: Intermediate

Which tasks are good candidates for AI assistance once you already understand the domain?

Difficulty: Intermediate

Which tasks should you be cautious about delegating to AI?

Difficulty: Advanced

What is the overfitting failure mode in Test-Driven Generation?

Difficulty: Basic

How did formal inspections differ from modern code review?

Difficulty: Basic

What is the defect-finding fallacy in Modern Code Review?

Difficulty: Basic

Name three major non-defect functions of code review.

Difficulty: Intermediate

What is the Code Review Comprehension Model (CRCM) asking a reviewer to hold in mind?

Difficulty: Advanced

What practical limits should shape review size and speed?

Difficulty: Intermediate

Why do stacked pull requests help review quality?

Difficulty: Intermediate

How do bikeshedding and linters relate?

Difficulty: Advanced

What are five authoring practices that make code more reviewable?

Difficulty: Advanced

How do assertions and guard clauses differ?

Difficulty: Intermediate

What are Google’s two approval gates in code review?

Difficulty: Advanced

Why can adding more reviewers reduce accountability?

Difficulty: Advanced

Why does AI-generated code shift review toward outcome verification?

Difficulty: Basic

What is a code smell?

Difficulty: Basic

Why is duplicated code dangerous?

Difficulty: Basic

What usually causes a Long Method smell?

Difficulty: Intermediate

How do Large Class and Divergent Change relate?

Difficulty: Intermediate

How are Long Parameter List and Data Clumps related?

Difficulty: Intermediate

Distinguish Divergent Change from Shotgun Surgery.

Difficulty: Basic

What is Feature Envy?

Difficulty: Advanced

Why should code smells be handled with judgment instead of automatic rules?

Difficulty: Basic

What is refactoring?

Difficulty: Basic

Why is refactoring an economic activity, not just code cleanup?

Difficulty: Basic

What are code smells in the refactoring workflow?

Difficulty: Basic

Which refactoring often addresses Data Clumps or Long Parameter List?

Difficulty: Basic

Which refactoring often addresses Divergent Change?

Difficulty: Basic

Which refactoring often addresses repeated type-code conditionals?

Difficulty: Basic

What is the safety net for refactoring?

Difficulty: Advanced

What is the human supervisor’s role when AI performs refactorings?

Development Practices Master Quiz

A comprehensive mix of the development-practices quizzes with standalone decks: comprehension, debugging, GenAI, review, code smells, refactoring, and beacons.

Difficulty: Intermediate

A function implements a simple discount rule, but the code uses five levels of nested conditionals, inconsistent variable names, and several helper calls whose names do not reveal their purpose. Which kind of cognitive load is the team mostly creating, and what should they do?

Correct Answer:
Difficulty: Intermediate

A developer joins a legacy project with no domain knowledge and no reliable naming conventions. They must fix a localized bug in a small parsing function. Which comprehension strategy is most likely at first?

Correct Answer:
Difficulty: Intermediate

Which artifacts or mental structures belong to the integrated meta-model of program comprehension? Select all that apply.

Correct Answers:
Difficulty: Advanced

A system’s architecture document describes a clean separation between presentation, domain, and data_access, but the codebase contains a single UserManager class that validates forms, builds SQL, and formats UI strings. What is the strongest diagnosis?

Correct Answer:
Difficulty: Advanced

A senior engineer proposes adding design-pattern names to every class so future readers can understand the system faster. What is the best response?

Correct Answer:
Difficulty: Intermediate

You are assigned a 350-line pull request in an unfamiliar area. Which review sequence best applies the chapter’s comprehension advice?

Correct Answer:
Difficulty: Intermediate

A reviewer opens a complex PR and immediately starts reading the diff line by line. Ten minutes later they still do not know why the change exists. What should they do instead?

Correct Answer:
Difficulty: Intermediate

Which source-file organization best supports the Stepdown Rule and Newspaper Metaphor?

Correct Answer:
Difficulty: Intermediate

Which of these are useful beacons for top-down comprehension? Select all that apply.

Correct Answers:
Difficulty: Advanced

A developer expects a payment service to contain a refund path, but no naming, tests, or call hierarchy confirms that hypothesis. What is the most expert next move?

Correct Answer:
Difficulty: Advanced

A class named PaymentFactory quietly applies fraud policy, discounts, and audit logging before returning an object. Why is this harmful to top-down comprehension?

Correct Answer:
Difficulty: Advanced

You are mentoring students who trace every line of every program, even when the structure is familiar. Which practice best helps them grow toward expert comprehension?

Correct Answer:
Difficulty: Intermediate

Researchers want to measure bottom-up comprehension, so they rename isPrimeNumber to pn and remove comments from a code sample. Why does this manipulation matter?

Correct Answer:
Difficulty: Intermediate

You are reviewing a PR with new production code and tests. Which use of tests best follows the chapter’s beacon argument?

Correct Answer:
Difficulty: Intermediate

Classify the beacons. Which examples are correctly identified? Select all that apply.

Correct Answers:
Difficulty: Advanced

A public class is named GlobalConfigSingleton. The name helps maintainers know there is only one instance, but clients now depend on that implementation detail. What is the best evaluation?

Correct Answer:
Difficulty: Advanced

An expert reviewer skips a generated client file after confirming it matches the API schema, then spends most of the review on a small authorization change. Which principle explains this behavior?

Correct Answer:
Difficulty: Advanced

You are designing a review template to help reviewers use contextual beacons. Which prompt belongs in the template?

Correct Answer:
Difficulty: Intermediate

A user reports: “I clicked ‘Submit’ and the page froze with a spinning wheel that never stopped.” You open the code and find that a callback in handlePayment() never resolves its Promise when the payment gateway returns a 5xx response. How would you classify each of these in the fault / error / failure vocabulary?

Correct Answer:
Difficulty: Intermediate

After any immediate privacy risk has been contained, a user reports that your web app sometimes shows them another user’s data. You cannot reproduce it locally. They send a screenshot but no other details. What should your first debugging action be?

Correct Answer:
Difficulty: Advanced

Your team has just manually reproduced an intermittent payment bug after two days of investigation. Before anyone touches the production code, which of the following are worthwhile next steps? (Select all that apply.)

Correct Answers:
Difficulty: Intermediate

A teammate has a Python bug they’ve been stuck on for an hour. They walk over to your desk and say “can you look at this?” You read the function — about 30 lines — and notice nothing obviously wrong. Which suggestion is the highest-leverage pedagogical move?

Correct Answer:
Difficulty: Intermediate

You have a regression: a test that passed on Friday now fails on Monday. There are 87 commits between the two versions and no obvious culprit in the diff. Which tool is the most efficient for finding the commit that introduced the regression?

Correct Answer:
Difficulty: Intermediate

You see this error in your terminal while setting up a new project: ERROR 3680 (HY000): Failed to create schema directory 'tobias_dev_orders_2026_q1' (errno: 2 - No such file or directory). What is the best thing to copy into a search engine or AI assistant?

Correct Answer:
Difficulty: Intermediate

You’re chasing a bug that only appears around the 10,000th line item in a specific user’s account. Stepping through the loop one iteration at a time in the debugger would mean clicking Step Over thousands of times. What’s the right move?

Correct Answer:
Difficulty: Intermediate

A teammate marks a ticket “FIXED” with this commit: a one-line change that makes the previously-failing reproduction pass. They did not run the rest of the test suite. What is the most important risk they have left exposed?

Correct Answer:
Difficulty: Advanced

Look at this code:

def transfer(account_from, account_to, amount):
    try:
        account_from.balance -= amount
        account_to.balance += amount
    except:
        pass

The team lead says “This is fault-tolerant — if anything goes wrong, the user doesn’t see a crash.” What’s wrong with this reasoning?

Correct Answer:
Difficulty: Intermediate

A junior engineer is debugging a deeply nested issue in a backend microservice. They have been at it for three hours with no progress, just rereading the same 200 lines of code. What is the single most likely explanation for why they are stuck?

Correct Answer:
Difficulty: Intermediate

Compilers (1960s) delivered a 10x productivity gain. Current research estimates GenAI delivers 21%–50%. What is the most accurate explanation for the gap?

Correct Answer:
Difficulty: Intermediate

A developer says “Copilot wrote the whole feature in 5 minutes — I’m so much more productive!” Two days later they’re still debugging it and have shipped a security vulnerability. Which trap have they fallen into?

Correct Answer:
Difficulty: Intermediate

Two computer-science students use a chatbot to learn linked lists. Student A pastes the assignment prompt and copies the answer. Student B asks the chatbot to explain why a tail pointer matters, then implements it themselves. Six months later, which is most likely to struggle on the data-structures exam, and why?

Correct Answer:
Difficulty: Intermediate

Which of these are valid items in the Supervisor Mentality for working with GenAI? Select all that apply.

Correct Answers:
Difficulty: Intermediate

Your team adopts Test-Driven Generation. Walk through the correct sequence.

Correct Answer:
Difficulty: Advanced

Two teams adopt the same AI coding assistant. Team A’s codebase is a tightly coupled monolith (“spaghetti”); Team B’s is a set of well-bounded microservices with clean interfaces. Both apply AI to similar tasks. Why does Team B see substantially larger productivity gains?

Correct Answer:
Difficulty: Basic

An LLM confidently produces this line in a Python script: import datafetcher_v2 as dfv2. The library does not exist. What is this called, and why does it happen?

Correct Answer:
Difficulty: Basic

Two pair-programming modes with AI: in the Driver mode, the human writes the code; in the Navigator mode, the human directs the AI to write blocks. Which role assignment is correct?

Correct Answer:
Difficulty: Advanced

Industry analysis has reported that codebases using AI coding assistants had a noticeable rise in code complexity and static-analysis warnings relative to pre-AI baselines. Assume the finding generalizes. What is the architectural risk?

Correct Answer:
Difficulty: Intermediate

A senior architect predicts: “The future belongs to engineers who can orchestrate AI agents, not just write code.” What underlying skills does that prediction imply will become more valuable, and which less?

Correct Answer:
Difficulty: Advanced

An AI coding agent reads a blog post while debugging your build and then asks permission to run a shell command you do not recognize. What is the most responsible response?

Correct Answer:
Difficulty: Basic

Why do project-level skill files or rule files improve AI coding-agent results?

Correct Answer:
Difficulty: Advanced

You want an agent to implement a stateful feature in an unfamiliar codebase. Which workflow best applies the lecture’s advice?

Correct Answer:
Difficulty: Intermediate

Why is “read the entire repository before coding” often a bad instruction for an AI agent?

Correct Answer:
Difficulty: Intermediate

Which tasks are especially well-suited for AI assistance once the human already understands the domain? Select all that apply.

Correct Answers:
Difficulty: Advanced

A team adds a hero avatar customizer. A student suggests storing the entire customized SVG in localStorage; another suggests storing the selected parameters and regenerating the SVG. What is the best engineering lesson from this disagreement?

Correct Answer:
Difficulty: Advanced

During test-driven generation, the AI writes an implementation that passes every visible example by hard-coding a dictionary from sample inputs to sample outputs. What should the human do?

Correct Answer:
Difficulty: Basic

Which sequence correctly names the three main stages discussed for LLM development and use?

Correct Answer:
Difficulty: Intermediate

A reasoning model shows a polished step-by-step explanation before generating code. Why should that trace still be treated cautiously?

Correct Answer:
Difficulty: Intermediate

You want an agent to add a title-only search box to the SEBook home page. Which prompt best applies the lecture’s prompt-engineering advice?

Correct Answer:
Difficulty: Advanced

An agent adds a “schedule study” feature that looks polished, but the generated quiz links use URLs that do not exist. What should a reviewer infer? Select all that apply.

Correct Answers:
Difficulty: Expert

A team wants AI to implement a feature for a public educational site that must meet WCAG 2.2 AA. Which decision best evaluates the risk?

Correct Answer:
Difficulty: Advanced

You are starting a personal project to learn a library you have never used. Which AI-assisted workflow best creates durable skill rather than cognitive offloading?

Correct Answer:
Difficulty: Basic

Which statement best distinguishes formal inspections from Modern Code Review?

Correct Answer:
Difficulty: Intermediate

Your manager says, “If only 14% to 25% of review comments find functional defects, code review is mostly waste.” What is the strongest response?

Correct Answer:
Difficulty: Intermediate

A teammate submits a 1,200-line feature PR touching database migrations, backend rules, and UI. They say one large PR is easier because reviewers see the whole feature at once. What should you recommend?

Correct Answer:
Difficulty: Advanced

Which strategies fit the Code Review Comprehension Model for a non-trivial PR? Select all that apply.

Correct Answers:
Difficulty: Intermediate

An author wants to make a complex function more reviewable before opening a PR. Which changes are aligned with the chapter? Select all that apply.

Correct Answers:
Difficulty: Advanced

In apply_discount, a check rejects a user-entered discount of 150% and returns a validation error. Elsewhere, assert subtotal >= 0 documents an invariant after pricing. Which statement is most accurate?

Correct Answer:
Difficulty: Intermediate

In Google’s review process, why might one change require both an owner approval and a readability approval?

Correct Answer:
Difficulty: Advanced

An AI agent opens a 2,000-line PR that passes unit tests. The reviewer feels pressure to approve because the code looks polished and CI is green. What is the safest review posture?

Correct Answer:
Difficulty: Basic

A function works correctly today, but it is 120 lines long, mixes validation, database writes, email formatting, and logging, and is hard to test. Which statement is most accurate?

Correct Answer:
Difficulty: Intermediate

A User class changes when database schema changes, when display-name formatting changes, and when password-reset email copy changes. Which smell is most central?

Correct Answer:
Difficulty: Intermediate

Adding a new tax rule requires tiny edits in Invoice, ReceiptPrinter, TaxReport, OrderSummary, and CustomerExport. Which smell does this suggest?

Correct Answer:
Difficulty: Intermediate

Multiple functions accept street, city, state, zip, and country in that order. Bugs often happen when two adjacent strings are swapped. What is the best smell diagnosis and refactoring response?

Correct Answer:
Difficulty: Advanced

A method in InvoicePrinter repeatedly calls invoice.getCustomer().getAddress().getZipCode() and invoice.getCustomer().getDiscountTier() to decide billing rules. Which concerns are plausible? Select all that apply.

Correct Answers:
Difficulty: Advanced

A linter flags a tiny method as a smell because it has only one line. The method name is a domain phrase used throughout the team’s conversations, and it hides a volatile calculation behind a stable interface. What should the team do?

Correct Answer:
Difficulty: Intermediate

Which change is a true refactoring?

Correct Answer:
Difficulty: Intermediate

Match the refactoring to the smell it most directly addresses. Which pairings are reasonable? Select all that apply.

Correct Answers:
Difficulty: Intermediate

A team wants to refactor a tangled billing module. What is the safest sequence?

Correct Answer:
Difficulty: Advanced

During a feature crunch, a developer notices a misleading local variable name in the function they are already editing. They also want to reorganize the whole package. What is the best refactoring judgment?

Correct Answer:
Difficulty: Advanced

An AI agent proposes to “refactor” a module by extracting helpers, changing error messages, and altering the order in which side effects occur. What should the human supervisor do?

Correct Answer:
Difficulty: Intermediate

A checkout module has a switch on paymentType repeated in five places: fees, validation, receipt text, fraud rules, and retry policy. Which refactoring direction best fits the smell?

Correct Answer:

Code Beacons

Code Beacons explains how experienced developers use familiar identifiers, structures, tests, and architectural cues as cognitive anchors while reading unfamiliar code.

Code Comprehension

Code Comprehension teaches how developers form mental models of a system, why top-down reading matters, and how architecture-code gaps make comprehension harder. The Part 1 and Part 2 tutorials turn those ideas into guided practice.

Debugging

Debugging covers reproducing a fault, localizing the root cause, using debuggers and assertions, verifying the fix, and preserving the regression test. The Python Debugging Tutorial gives hands-on practice with breakpoints and time-travel debugging.

Defensive Programming and Design by Contract

Defensive Programming in Python teaches boundary validation, precise exceptions, invariant preservation, and failure reporting. Design by Contract in Python follows it with caller/callee responsibility, preconditions, postconditions, old-state reasoning, invariants, and contract strength.

Generative AI

Generative AI in Software Engineering explains how AI coding tools change productivity, verification, skill formation, supervision, and team workflows without replacing engineering judgment.

Modern Code Review

Modern Code Review teaches review as a socio-technical practice: small reviewable changes, reviewer cognition, asynchronous workflows, defect finding, knowledge transfer, and AI-era risks.

Prompt Engineering

Prompt Engineering covers how to communicate tasks, constraints, examples, and verification expectations to AI assistants so their output is useful and reviewable.

Code Smells

Code Smells teaches the symptoms of poor design, including long methods, large classes, duplicated code, feature envy, and deeply nested conditionals.

Refactoring

Refactoring explains behavior-preserving transformations, safe refactoring rhythm, and the relationship between smells, tests, and design improvement. The Code Smells and Refactoring Tutorial provides tool-supported practice.

Top-Down Code Comprehension

Top-Down Code Comprehension focuses on hypothesis-driven reading: start from purpose and architecture, then use targeted navigation to confirm or revise the mental model.