Section outline

  • This lesson links how programs live in memory to both correctness risks (like aliasing and recursion crashes) and performance reality (like what the RAM model hides).

    • Micro-topic 2 A: Values vs references — the silent source of bugs

      Goal: Build a practical mental model: primitive values behave like copies; objects/arrays behave like references; assignments can create aliasing; bugs explode when you don’t notice.

    • Micro-topic 2 B: Stack thinking — recursion, base cases, and crash discipline

      Goal: Understand recursion as a structured tool (not spooky magic): base case, smaller subproblem, and why runaway recursion causes failure.