320 likes | 426 Vues
This guide delves into the complexities of technology errors, highlighting that issues can arise from both software and human interaction. It covers the two main sources of fault and explores methods of error correction such as debugging. With real-world examples like Grace Hopper's "debugging" incident, the text elaborates on various types of errors—random, chaotic, and annoying—and emphasizes critical strategies for troubleshooting. Learn how to handle technology failures with a structured and informed approach.
E N D
INFO100 and CSE100 Fluency with Information Technology When IT Goes BadFrom Software to Society Katherine Deibel Katherine Deibel, Fluency in Information Technology
Errors and IT • Basic fact: Technology can go bad • At least two sources of fault • How the technology operates • How people use the technology • At least two forms of correction • Debugging • IT Fluency Katherine Deibel, Fluency in Information Technology
Understanding Errors Ooops… Katherine Deibel, Fluency in Information Technology
The Infamous Bug • While working on the Mark II, Grace Hopper discovered a moth stuck in a relaythat had caused an electric short • Originated the term “debugging” Katherine Deibel, Fluency in Information Technology
Replicating Errors • By replicating, you can • Learn factors that led to the error • Eliminate erroneous correlations • Some errors you do not want to replicate/cannot replicate • Install corruptions • Hard drive crashes • Explosions Katherine Deibel, Fluency in Information Technology
Some Errors are Random • Cosmic "rays" • Energetic charged particles from space • Usually blocked by the Earth's magnetic field and atmosphere • More prevalent during solar storms and/or at higher altitudes • When they collide with electronics • Can cause bit flips (01 or 10) • Lead to essentially random errors • Rare but not unknown Katherine Deibel, Fluency in Information Technology
Some Errors are Chaotic • Chaos ≠ Random • Chaos means that the patterns are very complex and difficult to pin down • Therac-25 errors were fairly chaotic • Some errors only occur when specific factors are in play • Problems with copy/paste in Excel if I have macros enabled plus the Chrome browser is running Katherine Deibel, Fluency in Information Technology
Some Errors are Annoying • Some errors disappear when you try to investigate them • Called 'Heisenbugs' after the Heisenberg Uncertainty Principle • By observing what is going on on your computer, you change some factors • Those factors are what were causing the bug • Typically, these are the rarest and hardest bugs to address Katherine Deibel, Fluency in Information Technology
Implications • Some errors are only one-time events • Difficult to replicate • Due to randomness, chaos, or a heisenbug • When an error occurs • Step back and observe what happened • Recall what you were doing • Recall what the computer was doing (beyond just the active window) Katherine Deibel, Fluency in Information Technology
Error-Correction • Computers can be designed to correct specific errors • Parity checks for flipped bits due to cosmic rays • Browsers render invalid XHTML • Computers only detect errors that they are told to look out for • The computer's correction may not be what you want it • Remember: Garbage In Garbage Out Katherine Deibel, Fluency in Information Technology
Debugging THE ANTS… THEY'RE IN MY PANTS!!! Katherine Deibel, Fluency in Information Technology
General Principles of Debugging • Do not panic (unless something is on fire) • Observe what happened, what did not • Note any error messages • Work from the most likely causes down to the least likely causes • When in doubt, seek help Katherine Deibel, Fluency in Information Technology
Many Types of Debugging • Programming Debugging • Writing HTML, CSS, Javascript, etc. • Software Malfunction • Program crashes, feature doesn't work as expected, etc. • Hardware Debugging • Printer will not print • Wireless will not connect Katherine Deibel, Fluency in Information Technology
Your Role as the Debugger • Programming Debugging • You are the chief mechanic • Software and Hardware Mechanic • Your role is much more limited Historically, it was much, much easier for people without technical degrees to perform repairs on home electronics: televisions, radios, etc. Katherine Deibel, Fluency in Information Technology
Programming Debugging • Ignore the number of errors • Remember, errors propagate errors • Start with the error that first occurs • Again, errors propagate errors • If there is error feedback, read it! • Make a fix and then check • Do NOT fix repeated errors unless you are certain that you know the cause Katherine Deibel, Fluency in Information Technology
Example: XHTML Validation • We attempt to validate a page • We get 24 errors and warnings.. EEK! • What do we do? Katherine Deibel, Fluency in Information Technology
Example: XHTML Validation • We attempt to validate a page • We get 24 errors and warnings.. EEK! Ignore the number of errors Katherine Deibel, Fluency in Information Technology
Example: XHTML Validation • First error reported is an <h1> tag <h1 class="banner>…</h1> • We put in the missing quote Start with the first occurring error Katherine Deibel, Fluency in Information Technology
Example: XHTML Validation • We save and revalidate • Only 4 errors and warnings now Make a fix and then check Katherine Deibel, Fluency in Information Technology
Example: XHTML Validation • All of our errors now look like this • We need to put <img> inside <p>…</p> • We can do this for all four Line 11, Column 25: document type does not allow element "img" here; missin one of "p", "h1", "h2", "h3", "h4", "h5", h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag ... <imgsrc="photo.png" alt="a cute calico cat" /> Only fix multiple errors if certain of cause Katherine Deibel, Fluency in Information Technology
Software/Hardware Debugging • Much more difficult • If possible, first save and backup your work • Look around and see what you know • Read the screen • Write down any error messages to look up online • Is there a pointer/link that offers help • When in doubt, restart Katherine Deibel, Fluency in Information Technology
The Levels of Restart • Close and restart the program • Might need to close in Task Manager (Windows) • Log out and log back in • Restart the machine (hot reboot) • Shutdown the machine, wait a few minutes, then restart (cold reboot) Katherine Deibel, Fluency in Information Technology
Why Restarting Helps • Think mental exhaustion • When programs run • Memory gets allocated and deallocated (available for others to use) • Memory is not cleared when deallocated • Legacies of past calculations build up • Minor things begin to snowball • Entropy ensues Katherine Deibel, Fluency in Information Technology
Why Restarting Helps • Helps flush away the clutter, clears the board, etc. • Power down causes most volatile memory to "zero" out • Basically gives programs a do-over, mulligan, fresh start, etc. Katherine Deibel, Fluency in Information Technology
Seeking Out Help ● ● ● − − − ● ● ● Katherine Deibel, Fluency in Information Technology
Finding Answers on the Web • If you have an error message, use that text plus the program name:excel 2010 vba error 1045 • Otherwise, try to describe the error and search with the program name or computer type:thinkpad t410 keyboard "poiurewq" Katherine Deibel, Fluency in Information Technology
Find Specific Forums • Many computer and software companies have support sites • FAQs for searching • Message boards • Online support chat • Updates (software, drivers, etc.) Katherine Deibel, Fluency in Information Technology
Ask a Computer Buddy • Two minds are better than one • Does not necessarily mean you need to find an 'expert' • Experience is often better than a degree • Peers are often trying to do similar tasks Katherine Deibel, Fluency in Information Technology
But I must whine… Why bugs will always occur Katherine Deibel, Fluency in Information Technology
IT Cannot Be Perfect • Bugs, errors, etc. cannot be avoided beyond very simple situations • Proven to be mathematically impossible • Unless you invoke a god-like being • But you cannot prove the god-like being will always work • Unless you invoke a god-like, god-like being… • Etc. Katherine Deibel, Fluency in Information Technology
We Do Our Best • Software engineering • Testing before products hit market • Upgrades and fixes • Risk assessments and failure cost analyses Debugging will always be necessary Katherine Deibel, Fluency in Information Technology
Summary • IT can and does go wrong at times. • Debugging can help you fix the problems • You just need to observe and think Katherine Deibel, Fluency in Information Technology