Download - When IT Goes Bad From Software to Society
When IT Goes BadFrom Software to Society
Fluency with Information Technology
2012-04-20 Katherine Deibel, Fluency in Information Technology 1
INFO100 and CSE100
Katherine Deibel
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
2012-04-20 Katherine Deibel, Fluency in Information Technology 2
Understanding ErrorsOoops…
2012-04-20 Katherine Deibel, Fluency in Information Technology 3
4
The Infamous Bug
While working on the Mark II, Grace Hopper discovered a moth stuck in a relay that had caused an electric short
Originated the term “debugging”2012-04-20 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
2012-04-20 Katherine Deibel, Fluency in Information Technology 5
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
2012-04-20 Katherine Deibel, Fluency in Information Technology 6
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
2012-04-20 Katherine Deibel, Fluency in Information Technology 7
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
2012-04-20 Katherine Deibel, Fluency in Information Technology 8
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)
2012-04-20 Katherine Deibel, Fluency in Information Technology 9
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
2012-04-20 Katherine Deibel, Fluency in Information Technology 10
DebuggingTHE ANTS… THEY'RE IN MY PANTS!!!
2012-04-20 Katherine Deibel, Fluency in Information Technology 11
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
2012-04-20 Katherine Deibel, Fluency in Information Technology 12
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
2012-04-20 Katherine Deibel, Fluency in Information Technology 13
Your Role as the Debugger Programming Debugging
You are the chief mechanic Software and Hardware Mechanic
Your role is much more limited
2012-04-20 Katherine Deibel, Fluency in Information Technology 14
Historically, it was much, much easier for people without technical degrees to perform repairs on home electronics: televisions, radios, etc.
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
2012-04-20 Katherine Deibel, Fluency in Information Technology 15
Example: XHTML Validation We attempt to validate a page We get 24 errors and warnings.. EEK! What do we do?
2012-04-20 Katherine Deibel, Fluency in Information Technology 16
Example: XHTML Validation We attempt to validate a page We get 24 errors and warnings.. EEK!
2012-04-20 Katherine Deibel, Fluency in Information Technology 17
Ignore the number of errors
Example: XHTML Validation First error reported is an <h1> tag
<h1 class="banner>…</h1> We put in the missing quote
2012-04-20 Katherine Deibel, Fluency in Information Technology 18
Start with the first occurring error
Example: XHTML Validation We save and revalidate Only 4 errors and warnings now
2012-04-20 Katherine Deibel, Fluency in Information Technology 19
Make a fix and then check
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
2012-04-20 Katherine Deibel, Fluency in Information Technology 20
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... <img src="photo.png" alt="a cute calico cat" />
Only fix multiple errors if certain of cause
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
2012-04-20 Katherine Deibel, Fluency in Information Technology 21
Katherine Deibel, Fluency in Information Technology 22
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)
2012-04-20
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
2012-04-20 Katherine Deibel, Fluency in Information Technology 23
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.
2012-04-20 Katherine Deibel, Fluency in Information Technology 24
Seeking Out Help● ● ● − − − ● ● ●
2012-04-20 Katherine Deibel, Fluency in Information Technology 25
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"
2012-04-20 Katherine Deibel, Fluency in Information Technology 26
Find Specific Forums Many computer and software
companies have support sites FAQs for searching Message boards Online support chat Updates (software, drivers, etc.)
2012-04-20 Katherine Deibel, Fluency in Information Technology 27
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
2012-04-20 Katherine Deibel, Fluency in Information Technology 28
But I must whine…Why bugs will always occur
2012-04-20 Katherine Deibel, Fluency in Information Technology 29
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.
2012-04-20 Katherine Deibel, Fluency in Information Technology 30
We Do Our Best Software engineering Testing before products hit market Upgrades and fixes Risk assessments and failure cost
analyses
2012-04-20 Katherine Deibel, Fluency in Information Technology 31
Debugging will always be necessary
Summary IT can and does go wrong at times. Debugging can help you fix the problems You just need to observe and think
2012-04-20 Katherine Deibel, Fluency in Information Technology 32