Do Them All! Every Last Stinkin’ one! Try to Get a Rhythm Bargehaulers on the Volga Ilya Repin, c. 1870-73 O E O!
Kinds of Garbage The Quality of system output is no better than the Quality of the input Problems of Type: Wrong type of data –Putting Phone Number in Credit Card –Text in a Numeric field Problems of Quality: Defective data –Wrong phone number –“Dirty Data”
Keeping Your Data Clean Restricting the Type of Data in a Field Restricting the Amount of Data in a Field Specifying the Format of Data in a Field Restricting Data by Using Validation Rules Creating a Simple Lookup List Creating a Multi-Column Lookup List Updating Information in a Table Deleting Information from a Table Preventing Database Problems
Program Structure Check all at Top of Module –Defensive Programming? –If Error, Report & return Violates Single-Entry-Single-Exit Rule Make Exception to 1E,1X Make a Big if Have Validation Function()
How Many Messages Just One, or Many? Make the Message Clear –Avd Mystrs Abrvtns –Word from User’s Viewpoint Suggest Correction –Numbered, with Reference? Abused children can become abusers –Abused programmers write bad messages Joan Brown (1938-1990) The Message, ca. 1977
Poka Yoke The Best Way to fix an Error is to not make it Mistake Prevention –Prevent the Errors Mistake Proofing –If you can’t prevent all errors, at least catch them
Warnings? Compilers: I nformation, W arning, E rror, F atal Warn vs. Block vs. Audit trails Provide an Override –MoU: Master of Universe –POG: Power of a god Warning! Extreme Danger!
Error Prevention Don’t Let In –Menu, Radio Button, List –Look-Up Table –The Choice isn’t there –You need to know all choices Let in, then Edit (Don’t store) Correct Later –Report –Batch
Edit It If no direct use, gets dirty (good econ strategy—it don’t matter) Warn versus forbid Once good, now bad (allow old to remain?) Flexible versus accurate Type I Type II
Complex Check Crosscheck Fields If Gender == Male, NOT Pregnant If Status == In Default, Credit Limit = 0 Stop Error, or Correct it?
Table Maintenance If Item Removed –Are those on DB invalid or “Grandfathered” –If Updated, it will Fail Edit If Item Added –Is it a split of an existing category? Validation Table –Are Values in Code, Table, or in UI? –Does User or Programmer Update Table? How Stable is The List? Christo & Jeanne-Claude Wrapped Table, 1961