appendix-a
Appendix A. Guided Solutions
A.1 Chapter 1: Make a Mini-Defensible Decision
Because this mission asked you to use your own personal project, your specific answers will vary. However, here is a model example of what a successful, defensible "Decision Receipt" looks like for a very common, foundational scenario:
The Scenario: I was writing a script to read a list of user orders, calculate the tax, and print a receipt to the screen.
Option A: Put all the code into one single main file.
- Pro: High "Speed to Ship." It is super fast to just open one file and start typing. I don't have to worry about figuring out how to import or export data between different files.
- Con: Low Maintainability. It completely violates the "Separation of Concerns." If the file grows to 1,000 lines, finding a specific math bug amid the printing logic becomes a nightmare.
Option B: Split the code into three separate files (dataReader, taxCalculator, and receiptPrinter).
- Pro: High Maintainability. Each file has exactly one job. If the math is wrong, I know exactly which file to open without looking at the printing code.
- Con: Slower to set up initially. I have to write extra code just to link the files together and pass the data back and forth.
The Final Decision & Rationale: