CS241: Spring 2017 -- Review day, designing and debugging


  1. Why Murphy's Law is false.
  2. A buggy (?) GreatBigInt class
    1. On understanding the problem -- the first step in any problem solving/programming activity!
    2. Picking a representation -- a good choice can make your programming task easy, as opposed to...
    3. Design and debugging
      1. Many details, any one can trip you.
      2. On knowing when you know (metaknowlege)
      3. What are the cases? Critical (if you don't want to spend a long time debugging!) to think of all the possible cases.
        1. Same length no carry
        2. Same length carry on most significant digit
        3. Different lengths, first bigger
        4. Different lengths, second bigger
        5. Different lengths, carry on most significant digit of shorter
        6. Different lengths, carry on most significant digit of longer
    4. Is debugging like a treasure hunt?
      1. Can't fix what you can't find!
      2. Hypothesis and testing
      3. This or that?
      4. When "impossible" things happen...
    5. souts
      1. Do we get wherever?
      2. What's in the variables?
    6. The debugger
      1. Starting
      2. Setting/unsetting breakpoints
      3. Step over, step into
      4. The Variables tab
      5. Inspecting variables by hovering
      6. Continue to next breakpoint
      7. The call stack (under Windows/Debugging): AKA the runtime stack
  3. Review questions request: 1,3,6,7,8,9,13,14,19,22,23,26,27 and 28 -- Ack!