Created by, Tom Rebold, MPC FLUENCY WITH INFORMATION TECNOLOGY Skills, Concepts, and Capabilities
Created by, Tom Rebold, MPC Algorithms and Digitizing Information PART 2
Created by, Tom Rebold, MPC TO ERR IS HUMAN An Introduction to Debugging chapter 7 Precision and Ambiguity Debugging: Isolating the Problem HTML Debugging No Printer Output: A Classic Scenario To err is human, to really foul things up takes a computer
Copyright © 2003 Pearson Education, Inc. Slide 1-4 Figure 7.1. The Harvard Mark II logbook noting “First actual case of bug being found,” from the Smithsonian Institution.
5 Precision Problems How do you say ? Need to use “zero” instead of “oh” –Some computers can catch these errors or Fonts matter: or Why can’t computers flag these errors?
6 Lexical Structures When entering boxes on forms (field inputs), each field has rules about what is legal or not (lexical structure) What are some rules for –Entering grades? –Phone numbers? – addresses? Since case sometimes matters, when in doubt, be as exact as you possibly can
7 Debugging People troubleshoot all the time –Car doesn’t start –VCR doesn’t work –Find and repair a faulty part Sometimes there is a logical design error –System was designed incorrectly –You can’t always rely on a computer system Sometimes you settle for a work around
8 Debugging Principles Make sure you can reproduce the error Determine exactly what the problem is Eliminate the obvious causes Divide the process, separate parts that work from parts that don’t When stuck, ask where you may be making wrong assumptions Make predictions about what should happen if you try something
9 HTML Debugging
10 HTML Source Code (w/bugs) Japan Page Tokyo Kyoto Osaka Hiroshima Yokohama Fukuoka Sapporo Okinawa Onimichi Japan! In Japan people visit the temples and shrines for the perspective they give.
11 Debug Post-mortem Summarize changes made Summarized unnecessary changes Number of errors found—sometimes more than originally observed (hidden errors) Most errors are tiny (1 letter) –With huge effects
12 No Printer Output We can debug systems we don’t understand Reproduced error, understand problem, check obvious How to isolate the problem Finding the print queue