appendix-a

Appendix A. Guided Solutions

 

A.1 Chapter 1: Make a Mini-Defensible Decision

Analyzing a technical decision by articulating tradeoffs transforms a gut feeling into a defensible choice.

Mission Objective: Document a defensible "Decision Receipt" for localized order-processing logic, balancing short-term execution speed against long-term maintainability.

Table A.1 Making a Mini-Defensible Decision
Decision Element
Model Solution Output
Context and Goal
Balance short-term execution speed with long-term maintainability for order-processing logic.
Option A (Monolithic)
Put all code into a single main file.
• Pro: High speed to ship; zero module import overhead.
• Con: Low Maintainability. Violates Separation of Concerns; difficult to debug as codebase grows.
Option B (Modular)
Split into three focused files: dataReader, taxCalculator, and receiptPrinter.
• Pro:   High maintainability; tax math is strictly isolated.
• Con: Minor initial setup overhead to pass data between files.
Decision and Rationale
Proceed with Option B. Isolating the tax calculation logic prevents upcoming discount feature requests from unintentionally introducing bugs into the receipt printing code.

A.1.1 Architect's Analysis

Evaluating local script refactoring through an architectural lens highlights two foundational principles that govern component isolation:

A.2 Chapter 2: The Architect's Toolkit

A.2.1 Architect's Analysis

A.3 Chapter 3: The Principles of Sound Structure

A.3.1 Architect's Analysis

A.4 Chapter 4: Thinking in Layers

A.4.1 Model 1: The Simple Blog (Standard Complexity)

A.4.2 Model 2: The Banking System (High-Stakes Complexity)

A.4.3 Architect’s Analysis

A.5 Chapter 5: Hexagonal Architecture

A.5.1 The "Airlock" Refactor: Crypto Tracker

A.5.2 Wiring It Up (The Composition Root)

A.5.3 Architect's Analysis