Debugging & Troubleshooting “To err is human, but it takes a computer to really foul things up” © 2004 Lawrence Snyder.

Slides:



Advertisements
Similar presentations
TEST-TAKING STRATEGIES FOR THE OHIO ACHIEVEMENT READING ASSESSMENT
Advertisements

Curriculum and Learning
To Err Is Human Presented by. Before We Get Started Please turn your cell phones to stun. Restrooms are down the hall and on the right We’ll take a 5.
Computer Basics Hit List of Items to Talk About ● What and when to use left, right, middle, double and triple click? What and when to use left, right,
Computer /nm./: a device designed to speed and automate errors Hardware /nm./: the part of the computer that you can kick — From the Jargon File The Anatomy.
Debugging Mohammad Zikky, M.T. 2 Debugging Introduction (1 of 2)  Debugging is methodical process for removing mistakes in a program  So important,
IMGD 1001: Debugging. 2 Debugging Introduction (1 of 2)  Debugging is methodical process for removing mistakes in a program  So important, whole set.
S.T.A.I.R.. General problem solving strategy that can be applied to a range problems.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley An Introduction to Debugging To Err is Human lawrence snyder c h a p t e.
Chapter 7: Introduction to Debugging TECH Prof. Jeff Cheng.
Announcements Wednesday's test will be postponed until Thursday – July 7 th, See me if this won’t work for you. Project 1 will be due Monday – July.
Interactive Media and Game Development Debugging.
Chapter 3.5 Debugging Games
Interactive Media and Game Development Debugging.
The Information School of the University of Washington Oct 9fit debug1 Debugging and Troubleshooting INFO/CSE 100, Fall 2006 Fluency in Information.
Difficult Conversations. A difficult conversation is - anything we don’t want to talk about Usually we worry what will happen if we do talk about it If.
Race Conditions. Isolated & Non-Isolated Processes Isolated: Do not share state with other processes –The output of process is unaffected by run of other.
Lecture 2 Page 1 CS 236, Spring 2008 Security Principles and Policies CS 236 On-Line MS Program Networks and Systems Security Peter Reiher Spring, 2008.
Debugging Introduction to Computing Science and Programming I.
IST346: Troubleshooting Problems. Today’s Agenda Debugging Fixing Things Once  Understand the problem you’re trying to fix  Finding the root cause 
Interactive Media and Game Development Debugging.
Debugging CPSC 315 – Programming Studio Fall 2008.
1 Psych 5500/6500 The t Test for a Single Group Mean (Part 5): Outliers Fall, 2008.
Midterm Logistics Where? 2050 VLSB When? Monday, 4:10 to 5:40 What to do? –“Review problems” from Thursday/Friday in UCWise. –Two practice exams and solutions.
Interactive Media and Game Development Debugging.
Chapter 7 To Err Is Human: An Introduction to Debugging.
2/9/2007EECS150 Lab Lecture #41 Debugging EECS150 Spring2007 – Lab Lecture #4 Laura Pelton Greg Gibeling.
Word Processing. ► This is using a computer for:  Writing  EditingTEXT  Printing  Used to write letters, books, memos and produce posters etc.  A.
May Project Overview  In the next few weeks, we will begin the process of choosing a Science Project  This will be a lengthy process  We will.
SAT Prep- Reading Comprehension Strategies- Short Passages
Chapter 7 To Err Is Human: An Introduction to Debugging.
Lecture 18 Page 1 CS 111 Online Design Principles for Secure Systems Economy Complete mediation Open design Separation of privileges Least privilege Least.
Learning Objectives Explain how ordinary precision differs from computing precision Describe the six-step strategy for debugging Explain the purpose of.
Researching a Persuasive Essay How to Formulate and Support An A+ Argument.
ICAPRG301A Week 4Buggy Programming ICAPRG301A Apply introductory programming techniques Program Bugs US Navy Admiral Grace Hopper is often credited with.
I NFORMATION S UPPORT AND S ERVICES 2.02 U NDERSTAND BASIC TROUBLESHOOTING OF HARDWARE AND SOFTWARE.
METHOD TEST PREP EDUCATIONAL SERIES The Five Most Common Student Mistakes on the SAT and ACT Evan Wessler Vice President of Education
Debugging and Interpreting Exceptions UW CSE 190p Summer 2012.
Troubleshooting. Troubleshooting Steps 4 Gather Information by Using Good Communication Skills 4 Narrow Down the Scope of the Problem 4 Find a Solution.
Presentation on Presentations Dr. Dave Shattuck Dept. of Electrical and Computer Engineering University of Houston.
Chapter 6 An Introduction to Debugging. Learning Objectives Explain how ordinary precision differs from computing precision Describe the six-step strategy.
Stefan Marti Speech Interface Group MIT Media Lab.
Preparing for Assignment 3. Setup Assignment 3 builds on Assignment 2, and we are using the same basic scenario. Save the spreadsheet you used for Assignment.
Created by, Tom Rebold, MPC FLUENCY WITH INFORMATION TECNOLOGY Skills, Concepts, and Capabilities.
The Information School of the University of Washington 13-Oct-2004cse debug1 Debugging and Troubleshooting INFO/CSE 100, Spring 2005 Fluency in Information.
Chapter 5 Files and Exceptions I. "The Practice of Computing Using Python", Punch & Enbody, Copyright © 2013 Pearson Education, Inc. What is a file? A.
By Anthony W. Hill & Course Technology1 Troubleshooting Computer Problems.
UNDERSTANDING HUMAN ERROR Text p What order of actions occurs when receiving money from an ATM?
Adding and Subtracting Decimals © Math As A Second Language All Rights Reserved next #8 Taking the Fear out of Math 8.25 – 3.5.
The single most important skill for a computer programmer is problem solving Problem solving means the ability to formulate problems, think creatively.
CSCI N201 Programming Concepts and Database 2 - STAIR Lingma Acheson Department of Computer and Information Science, IUPUI.
1 Taking Notes. 2 STOP! Have I checked all your Source cards yet? Do they have a yellow highlighter mark on them? If not, you need to finish your Source.
Introduction to Exceptions in Java CS201, SW Development Methods.
Get your software working before putting it on the robot!
Troubleshooting. What is Troubleshooting ? Troubleshooting is a problem solving method. Other problem solving methods are invention, innovation, engineering.
The Practice of Statistics, 5th Edition Starnes, Tabor, Yates, Moore Bedford Freeman Worth Publishers CHAPTER 9 Testing a Claim 9.1 Significance Tests:
The Fine Art of Knowing How Wrong You Might Be. To Err Is Human Humans make an infinitude of mistakes. I figure safety in numbers makes it a little more.
Reading – Approaching the Questions
Mobile Testing - Bug Report
Chapter 21 More About Tests.
CSC 110 – Fluency in Information Technology Chapter 7: An Introduction to Debugging Dr. Curry Guinn.
Fluency with Information Technology
C ODEBREAKER Class discussion.
Some Basics for Problem Analysis and Solutions
CSCE 315 – Programming Studio, Fall 2017 Tanzir Ahmed
To Err Is Human: An Introduction to Debugging
Stefan Marti Speech Interface Group MIT Media Lab
Debugging and Troubleshooting
The Troubleshooting theory
Presentation transcript:

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 In IT, stuff goes wrong … debugging is the process of finding the error –Term coined by Grace Murray Hopper Best solution … make no mistakes! Best solution … make no mistakes! –Be accurate … get it right the 1 st time –In most cases computers can’t recover for our errors The standard of precision for computers is perfect, which is tough for people, but try!

When You Debug... There are guidelines for debugging… There are guidelines for debugging… Rather than trying things aimlessly and becoming frustrated, think of yourself as solving a mystery Be objective: What are my clues? What is my hypothesis? Do I need more data? Be objective: What are my clues? What is my hypothesis? Do I need more data? Consciously ‘watch’ yourself debug -- its an out-of-body experience Consciously ‘watch’ yourself debug -- its an out-of-body experience When stumped, don’t become frustrated, but ask, “What am I misunderstanding?” When stumped, don’t become frustrated, but ask, “What am I misunderstanding?” Become Sherlock Holmes Debugging is not algorithmic: no guaranteed process

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 they’re fulfilled Memorize?

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

Determine the Problem Second step: figure out what’s wrong Second step: figure out what’s 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 Database Mailing Label Pgm Mailing Label File No Labels Printing

Eliminate the Obvious Third step: eliminate obvious causes Third step: eliminate obvious causes “If the cause were obvious, the problem would have been fixed!” –There are standard things to check: Inputs Inputs Connections Connections “Permissions” “Permissions” Physical connectivity Physical connectivity “Working” in similar situations is usually good enough

Isolate the Problem Try to “partition” the situation into working and non-working parts Try to “partition” the situation into working and non-working parts Form a hypothesis of what’s wrong Form a hypothesis of what’s wrong Make as few assumptions as possible Make as few assumptions as possible Take nothing for granted Take nothing for granted The goal is to eliminate as many things from consideration as possible

At a Dead End, Reassess When everything seems to check out, don’t get frustrated... ask, “What am I misunderstanding?” When everything seems to check out, don’t 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 assuming too much? Are you mis-reading the clues? 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 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 bug A possible misunderstanding A possible misunderstanding A chance to narrow the search A chance to narrow the search ‘Sleeping on it’ may help!

A Debugging Example After building our web page, we find it is wrong 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 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