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