Exercise 3: Classifying Three Decisions by Blast Radius — Possible Solution ==================================================================== (a) RENAMING A LOCAL VARIABLE INSIDE ONE FUNCTION ------------------------------ Level: IMPLEMENTATION. Applying this chapter's own test - "how much of the codebase does changing your mind touch?" - a local variable's name is only ever referenced inside the one function it's declared in. Renaming it touches exactly that one function's own body, matching this chapter's own compare-table example ("using a for loop instead of a list comprehension inside one function") exactly in scope: a single function, nothing beyond it. (b) SWITCHING AN Order'S DISCOUNT STRATEGY AT RUNTIME ------------------------------ Level: DESIGN (patterns). This is this chapter's own compare-table example verbatim, and it's also the exact scenario Design Patterns Chapter 7 verified directly: calling order.set_shipping_strategy(ExpressShipping()) - or, correspondingly, swapping a discount strategy - is a single line, and every other part of the codebase (the Order class itself, every other Order object, every caller) is completely unaffected. It touches more than a single function's own internal variable naming (it changes externally-visible behavior), but it stays local to one object's own configuration - it never spreads across the codebase. (c) DECIDING WHETHER A SYSTEM IS ONE MONOLITH OR SPLIT INTO SEVERAL SERVICES ------------------------------ Level: ARCHITECTURE. Using this chapter's own test directly: reversing this decision later doesn't touch one function, and it doesn't touch one class's own configuration - it touches how EVERY part of the system communicates with every other part (function calls becoming network calls, or vice versa), how data is shared, how deployment works, and how failures are handled. This is structurally the same shape as this chapter's own verified persistence example, just at a larger scale: a decision made without anticipating change (no boundary in place) has to touch every affected part of the codebase to reverse, exactly like the boundary- free storage example needed 3 (then 6) touches instead of the boundary-based version's 0. WHY THIS WORKS AS AN ANSWER ------------------------------ Each classification is justified by directly applying this chapter's own stated test (blast radius of changing the decision) rather than by intuition or by the term's everyday connotation, and (b) and (c) are each tied back to a specific, already-verified example from this chapter or its own prerequisite (Design Patterns Chapter 7) instead of being asserted as self-evident.