FIT100: Fluency with Information Technology

Debugging & Troubleshooting To err is human, but it takes a computer to really foul things up 2004 Lawrence Snyder Using Computers... In IT, stuff goes wrong debugging is the process of finding the error Term coined by Grace Murray Hopper

Best solution make no mistakes! Be accurate get it right the 1st time In most cases computers cant recover for our errors The standard of precision for computers is perfect, which is tough for people, but try! When You Debug... Debugging is not algorithmic: no guaranteed process There are guidelines for debugging Rather than trying things aimlessly and becoming frustrated, think of yourself as

solving a mystery Become Sherlock Be objective: What are myHolmes clues? What is my hypothesis? Do I need more data? Consciously watch yourself debug -- its an out-ofbody experience When stumped, dont become frustrated, but ask, What am I misunderstanding? Debugging Guidelines

Verify that the error is reproducible Determine exactly what the problem is Eliminate the obvious causes Divide process into working/faulty parts On reaching a dead end, reassess the information you have, trying to identify the mistake you are making Work through process making predictions and checking theyre fulfilled Memorize

? Reproducibility First step: verify the error is reproducible Transient errors are very rare, but they do happen try again Getting out and getting back in Rebooting the operating system is advisable, especially for errors involving peripheral devices (printers, modems) Determine the

Problem Second step: figure out whats wrong Often there is a sequence of steps following an error and propagating it work backwards looking to see where the error first occurred Empty Mailing Database Label Pgm Mailing Label File

No Labels Printing Eliminate the Obvious Third step: eliminate obvious causes If the cause were obvious, the problem would have been fixed! There are standard things to check: Inputs Connections Working in Permissions similar situations Physical connectivity

is usually good enough Isolate the Problem Try to partition the situation into working and non-working parts Form a hypothesis of whats wrong Make as few assumptions as possible Takeisnothing for granted The goal

to eliminate as many things from consideration as possible At a Dead End, Reassess When everything seems to check out, dont get frustrated ... ask, What am I misunderstanding? Your goal is to see the situation as it is, not as you think it should be Are you assuming too much? Are you mis-reading the clues?

Sometimes, stepping back to the surrounding context is helpful Make Predication/Check Beginning with the isolated part, step through the process, predicting the outcome and verifying it A prediction that is not fulfilled shows

A possible bug A possible misunderstanding A chance to narrow the search Sleeping on it may help! A Debugging Example After building our web page, we find it is wrong Houston, we have a problem

Debugging Demo Intended page Summary Debugging is not algorithmic, but there are guidelines to follow It probably pays to memorize them so they come to mind while debugging Watch yourself debug -- assess how you are doing, what you need to know Being accurate -- avoiding textual mistakes at all -- saves frustration

Notice how few letters mess up a whole page

Recently Viewed Presentations

  • Applet Graphical User Interface Event-driven Programming

    Applet Graphical User Interface Event-driven Programming

    For example, int i = 8; "i" is the name of the memory space for storing the data value 8. 8 i 3 4 C++ Pointer A pointer in C++ is a memory location that stores an address. Rectangle *rect...
  • Pearson Prentice Hall Physical Science: Concepts in Action

    Pearson Prentice Hall Physical Science: Concepts in Action

    Pearson Prentice Hall Physical Science: Concepts in Action Chapter 2 Properties of Matter WHATS A MATTA Matter vs Non-matter (or I don't know) Let's create a definition CHEMICAL VS PHYSICAL Physical Properties Examples of physical properties Definition: a physical property...
  • MN Dream Act

    MN Dream Act

    Prosperity Act (MN Dream Act) Documentation required to establish eligibility for MN Dream Act. High school transcripts (don't have to be certified/sealed) High school diploma or GED (if high school graduation not documented on transcripts) Proof of Selective Service registration...
  • Aim: Which type of government is the best?

    Aim: Which type of government is the best?

    st. Triumvirate). The 1st Triumvirate was done in secret between . Caesar (who was popular with the poor), Crassus (the richest man in Rome), and . Pompey (a powerful general and member of the Senate). It was cemented by intermarriage...
  • The Aspect Cycle - Arizona State University

    The Aspect Cycle - Arizona State University

    Telic/durative/stative aspect remains stable, e.g. unaccusative> copula and causative; unergative> transitive. Verbs with Experiencers are less stable, possibly because the animacy hierarchy gets out of balance. In this talk: Ditransitives are among the more complex telic verbs and this talk...
  • System Integration Workshop - CAS

    System Integration Workshop - CAS

    Technical Training Organization T TO 7 Booklet : SSDV004N DSP Selection Guide 8 Most contain downloadable software examples for use with CCS or Embedded Workbench!
  • Economic relations between Peru and China - Red ALC China

    Economic relations between Peru and China - Red ALC China

    Introduction: natural resources and economic development. China's impact on LA revived and old discussion about the specific challenges faced by resource-rich countries on theirs path of development, the volatility of the international prices of their exports, the "Dutch disease" or...
  • The Age of Things: Sticks Stones and the Universe

    The Age of Things: Sticks Stones and the Universe

    Middle Kingdom Middle Kingdom F.I. P. F.I.P. Old Kingdom Old Kingdom or? ... Times Arial Impact Times New Roman Blank Presentation Microsoft Equation The Age of Things: Sticks Stones and the Universe PowerPoint Presentation PowerPoint Presentation PowerPoint Presentation PowerPoint Presentation...