when it goes bad from software to society

32
When IT Goes Bad From Software to Society Fluency with Information Technology 2012-04-20 Katherine Deibel, Fluency in Information Technology 1 INFO100 and CSE100 Katherine Deibel

Upload: shani

Post on 24-Feb-2016

32 views

Category:

Documents


0 download

DESCRIPTION

INFO100 and CSE100. Fluency with Information Technology. When IT Goes Bad From Software to Society. 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 - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: 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

Page 2: When IT Goes Bad From Software to Society

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

Page 3: When IT Goes Bad From Software to Society

Understanding ErrorsOoops…

2012-04-20 Katherine Deibel, Fluency in Information Technology 3

Page 4: When IT Goes Bad From Software to Society

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

Page 5: When IT Goes Bad From Software to Society

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

Page 6: When IT Goes Bad From Software to Society

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

Page 7: When IT Goes Bad From Software to Society

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

Page 8: When IT Goes Bad From Software to Society

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

Page 9: When IT Goes Bad From Software to Society

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

Page 10: When IT Goes Bad From Software to Society

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

Page 11: When IT Goes Bad From Software to Society

DebuggingTHE ANTS… THEY'RE IN MY PANTS!!!

2012-04-20 Katherine Deibel, Fluency in Information Technology 11

Page 12: When IT Goes Bad From Software to Society

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

Page 13: When IT Goes Bad From Software to Society

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

Page 14: When IT Goes Bad From Software to Society

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.

Page 15: When IT Goes Bad From Software to Society

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

Page 16: When IT Goes Bad From Software to Society

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

Page 17: When IT Goes Bad From Software to Society

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

Page 18: When IT Goes Bad From Software to Society

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

Page 19: When IT Goes Bad From Software to Society

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

Page 20: When IT Goes Bad From Software to Society

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

Page 21: When IT Goes Bad From Software to Society

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

Page 22: When IT Goes Bad From Software to Society

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

Page 23: When IT Goes Bad From Software to Society

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

Page 24: When IT Goes Bad From Software to Society

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

Page 25: When IT Goes Bad From Software to Society

Seeking Out Help● ● ● − − − ● ● ●

2012-04-20 Katherine Deibel, Fluency in Information Technology 25

Page 26: When IT Goes Bad From Software to Society

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

Page 27: When IT Goes Bad From Software to Society

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

Page 28: When IT Goes Bad From Software to Society

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

Page 29: When IT Goes Bad From Software to Society

But I must whine…Why bugs will always occur

2012-04-20 Katherine Deibel, Fluency in Information Technology 29

Page 30: When IT Goes Bad From Software to Society

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

Page 31: When IT Goes Bad From Software to Society

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

Page 32: When IT Goes Bad From Software to Society

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