Skip to main content
๐Ÿ“œ WAYPOINT LESSON

The salvage protocol

โญโญ intermediateโณ 12 min read๐Ÿ“ Lesson 151 of 256

Bank the skeleton, write the adjacent part, never panic-erase, time-box.

The salvage protocol โ€” for the exam moment when a part is beyond you:

  1. Bank the skeleton. Write the signature, the guard for the edge cases you DO understand (empty, absent), and the loop shell with a comment where the hard logic goes. Behavior-level rubric rows reward: "iterates over all elements", "correctly returns for the empty case", "returns the right type".
  2. Write the adjacent easy part. Multi-part questions are independent at the rubric level: part (b) does not lose points because (a) is blank โ€” unless (b) explicitly consumes (a), in which case write (a)'s INTENDED call anyway with a comment; graders award (b)'s own logic when it is right "given (a)".
  3. Never panic-erase. A half-written method scores its partial behaviors; a blank scores zero. The rubric cannot see intentions, only code โ€” so put code on the page, even uncertain code.
  4. Time-box the rescue. 5 minutes of stuck = bank the skeleton, move on, return if time remains. A fresh look after two other questions solves what 15 staring minutes could not.

Practicing salvage: the debug challenges in this lab give you broken code whose contracts are fully specified โ€” exactly the exam situation. Run the localization loop, repair minimally, and keep the passing tests passing.