Using Poka-Yoke Techniques for Early Defect Detection Microsoft Testing Talks 19 February 1998 Harry Robinson Hewlett Packard [email protected]

Yamada Electric, 1961

1

Shigeo Shingo No one intends to make mistakes. But while we are working, defects can show up without our noticing. … How can we catch these errors before they turn into defective products?

Poka-Yoke (Pronounced “POH-kah YOH-kay”)

Literally means “Mistake-proofing”: •Poka - inadvertent mistake •Yoke - to prevent The essence of poka-yoke is to design your process so that mistakes are either impossible, or are easily detected and corrected.

2

Categories of Poka-Yoke • Prevention -- engineer the process so it is impossible to make a mistake • Detection -- signal the user when a mistake has been made so that the user can correct the mistake

The “Small Dish” Solution • • • • • •

Simple Cheap Specific Immediate feedback Trades speed for reliability Not really “testing”

3

Poka-Yoke in Manufacturing B

A

A

A

?

B

B

Japan’s Quality Miracle “It is not one device, but the application of hundreds and thousands of these very simple “fail-safing” mechanisms that day after day has brought the quality miracle to Japan. Each one is relatively simple -- something you easily could do on your own. It is the totality, the hundreds of devices, that is almost frightening to behold.” - Norman Bodek

4

Everyday Prevention Poka-Yokes • 3.5” diskette • locking file drawers • sensor-equipped faucets

Everyday Detection Poka-Yokes “Seat belt unfastened”

“Liftgate ajar”

“Low fuel”

“Key in ignition” “Door ajar”

5

Shingo vs. Murphy

The Original Murphy’s Law

“If there are two or more ways to do something, and one of those ways can result in catastrophe, then someone will do it.” -- Edward A. Murphy, Jr. 1949

6

Murphy’s Law A

If anything can go wrong, it will.

B

A

B

Shingo’s Law If anything can go wrong, it doesn’t necessarily have to.

Poka-Yoke in Localization

7

Hello, World 1 hello.c: printf(“Hello, World!\n”);

Hello, World 2 hello.c: my_cat=catopen(“hello.cat”, NL_CAT_LOCALE); printf( catgets( my_cat, 1, 1, “Hello, World!\n”)); catclose(my_cat); hello.cat: $set 1 1 Hello, World!\n This example is adapted from “X Windows on the World” by Tom McFarland, Prentice Hall, 1996

8

Hello, World 3 hello.c: my_cat=catopen(“hello.cat”, NL_CAT_LOCALE); printf( catgets( my_cat, 1, 1, “Hello, World!\n”)); catclose(my_cat); hello.cat: $set 1 1 Bonjour, Le Monde!\n This example is adapted from “X Windows on the World” by Tom McFarland, Prentice Hall, 1996

English and French Menus

9

English and French Menus $set 11 17 18 19 20 21 22 23 24 25 26 27 28 29 30

N New O Open … I Include S Save A Save As P Print … C Close

$set 11 17 18 19 20 21 22 23 24 25 26 27 28 29 30

N Nouveau O Ouvrir … I Inclure S Sauvegarder A Sauvegarder sous ... P Imprimer … F Fermer

The Localization Process Develop I18N code with the default message catalog

Test with the default message catalog

Test with the localized message catalogs

Localize the message catalog

Verify message catalogs automatically (Poka-yoke scripts)

10

Common Menu Mistakes Mnemonic is not a single ASCII letter

Mnemonic is not unique in the menu

Mnemonic is not contained in the associated label

$set 11 17 18 19 20 21 22 23 24 25 26 27 28 29 30

NN Nouveau O Ouvrir … I Inclure S Sauvegarder S Sauvegarder sous ... P Imprimer … C Fermer

Poka-Yoke for Menus Mnemonic location

label location

C mnemonic

C label

11,17

11,18

N

New

11,19

11,20

O

Open …

11,21

11,22

I

Include

11,23

11,24

S

Save

11,25

11,26

A

Save As …

11,27

11,28

P

Print …

11,29

11,30

C

Close

11

Missing/Extra Messages What it should have said

What it actually says

hello.cat: $set 1 1 Bonjour, Le Monde!\n

hello.cat: $set 1 11 Bonjour, Le Monde!\n typo

Poka-Yoke for Missings/Extras English

French

11,17 11,18 11,19 11,20 11,21 11,22 11,23 11,24 11,25 11,26 11,27 11,28 11,29 11,30

11,17 11,19 11,20 11,21 11,22 11,23 11,24 11,25 11,26 11,27 11,28 11,29 11,30 11,78

12

Results ... • • • •

311 menu mistakes 89 printf() mistakes 383 missing messages 50 extra messages

Total: 833 defects!

The “Small Script” Solution • • • • • •

Simple Cheap Specific Immediate feedback No GUI interaction Not really “testing” - no application needed!

13

Questions NOT Answered • Does the application work? • Is the message catalog translated correctly? The Poka-yoke scripts check for necessary but not sufficient conditions!

Poka-Yoke in Software

14

Categories of Poka-Yokes Prevention: • • •

high-level languages structured programming object-oriented methodologies

Detection: • • • •

lint-type utilities: check, cchk, printfck, ... compiler flags assertions smoke testing

Poka-Yoke in Testing

15

Smoke Tests smoke test: n. 1. A rudimentary form of testing applied to electronic equipment following repair or reconfiguration, in which power is applied and the tester checks for sparks, smoke, or other dramatic signs of fundamental failure. 2. By extension, the first run of a piece of software after construction or a critical change.

-- The New Hacker’s Dictionary

Without Smoke Tests Bug reports

Development in other lab

Testing in our lab

16

With Smoke Tests in Our Lab Bug reports

S m o k e

Development in other lab

Testing in our lab

With Smoke Tests in Their Lab Bug reports

Development in other lab

S m o k e

Testing in our lab

17

Poka-Yoke in Programming

How the World Ends, version 1 if ( incoming_missiles = TRUE ) { launch( our_missiles); }

Output of freeware check utility: sdi.c: assignment in conditional context at or near line xx

18

How the World Ends, version 2 if ( incoming_missiles == TRUE ); { launch( our_missiles); }

Output of freeware check utility: sdi.c: IF with neither THEN or ELSE at or near line xx

How common are such mistakes? long n = LONG_MIN; while (1)

{ if ( Blackbox(n) == 32L) { cout << n << “ generates 32!”; break; } if ( n = LONG_MAX ) { cout << “Didn’t find 32!”; break; } ++n; }

Source: “Genetic Algorithms in C++” by Scott Robert Ladd (page 10)

19

Words to code by ... • How could I have automatically detected this bug? • How could I have prevented this bug? - Steve Maguire Writing Solid Code

Is It Regular or Decaf ?

“A trivial system for solving a common problem.” - Steve Maguire Debugging the Development Process

20

How to Make Good Coffee

“Now imagine a coffee shop that has a whole collection of such trivial ‘systems’ that produce better results with little or no extra effort…” - Steve Maguire Debugging the Development Process

How to Make Good Poka-Yokes • • • • • •

Think simple Think specific Think attributes Think early Think responsive Think re-use

21

Poka-Yoke Resources • • • • •



John Grout’s Poka-Yoke Page http://www.cox.smu.edu/jgrout/pokayoke.html Shigeo Shingo: Zero Quality Control: Source Inspection and the Poka-yoke System Nikkan Kogyo Shimbun: Poka-yoke: Improving Product Quality by Preventing Defects James Tierney: Eradicating Mistakes in Your Software Through Poka-yoke (video) Steve Maguire: Writing Solid Code Debugging the Development Process Harry Robinson’s Home Page http://www.geocities.com/SiliconValley/Lab/5320

Thank You!

22

Using Poka-Yoke Techniques for Early Defect Detection

Feb 19, 1998 - Open … 21. I. 22. Include. 23. S. 24. Save. 25. A. 26. Save As. 27. P. 28. Print … .... “Now imagine a coffee shop that has a whole collection of ...

297KB Sizes 4 Downloads 228 Views

Recommend Documents

Using Poka-Yoke Techniques for Early Defect Detection
Feb 19, 1998 - Page 1 ... The essence of poka-yoke is to design your process so that mistakes are either impossible, ... your own. It is the totality, the hundreds ...

Protein Word Detection using Text Segmentation Techniques
Aug 4, 2017 - They call the short consequent sequences (SCS) present in ..... In Proceedings of the Joint Conference of the 47th ... ACM SIGMOBILE Mobile.

Using Machine Learning Techniques for VPE detection
Technical Report 88.268, IBM Science and Technology and Scientific. Center, Haifa, June 1989. (Quinlan 90) J. R. Quinlan. Induction of decision trees. In Jude W. Shavlik and Thomas G. Dietterich, editors, Readings in Machine. Learning. Morgan Kaufman

Using Machine Learning Techniques for VPE detection
King's College London ... tic account (Fiengo & May 94; Lappin & McCord ... bank. It achieves precision levels of 44% and re- call of 53%, giving an F1 of 48% ...

An intelligent real-time vision system for surface defect detection ...
challenging in real-time in a hot rolling process: (1) The ... sampling requires a data acquisition rate of 80 MB per .... Unlike traditional classifiers such as artificial ...

Pattern recognition techniques for automatic detection of ... - CiteSeerX
Computer-aided diagnosis;. Machine learning. Summary We have employed two pattern recognition methods used commonly for face recognition in order to analyse digital mammograms. ..... should have values near 1.0 on the main diagonal,. i.e., for true .

Effective Worm Detection for Various Scan Techniques
that spread across networks by exploiting security flaws without human ... a number of detection methods using Internet traffic mea- surements to detect worms. ... matically and exhibits the trend of exponential growth, we are able to monitor the ...

Lithographic Defect Aware Placement Using Compact Standard Cells ...
Email: [email protected]. Abstract—Conventional ... done by repeated layout, retargeting and OPC, and verification through lithography simulation [1], [2].

Anomaly detection techniques for a web defacement monitoring ...
DI3 – Università degli Studi di Trieste, Via Valerio 10, Trieste, Italy ... exploiting security vulnerabilities of the web hosting infrastruc-. ture, but ...... the best results.

Anomaly detection techniques for a web defacement monitoring service
jack DNS records of high profile new zealand sites, 2009; Puerto rico sites redirected in DNS attack security, 2009) ..... Hotelling's T-Square method is a test statistic measure for detecting whether an observation follows a ... statistics of the ob

Pattern recognition techniques for automatic detection of ... - CiteSeerX
Moreover, it is com- mon for a cluster of micro–calcifications to reveal morphological features that cannot be clearly clas- sified as being benign or malignant. Other important breast .... mammography will be created because of the data deluge to

Anti-Forensic Techniques, Detection and Countermeasures by ...
1.1 Outline of this paper. Section 2 of this paper discusses traditional AF techniques such as overwriting, cryptography and. steganography. Section 3 discusses AF techniques that work .... 79. Page 3 of 8. Main menu. Displaying Anti-Forensic Techniq

Seizure Detection and Advanced Monitoring Techniques
analysis (e.g., power analysis, linear orthogonal transforms, and parametric linear ... Information on the start time and the sampling rate of the data collection can.

Lithographic Defect Aware Placement Using Compact Standard Cells ...
Email: [email protected] ... A modern standard cell is designed in such a way that litho- graphic defect never arises within the region of a cell. This is done by repeated layout, retargeting and OPC, and verification through lithography ...

Improved Matched-Filter Detection Techniques
This is especially true in the presence of limited scene data ... b gb g. (5) where xi is the spectral vector from pixel i and the ~ symbol implies an estimated .... that the CMFsat result is higher than both CMFcut and OBS between PCs 50 and 250.

Seizure Detection and Advanced Monitoring Techniques
analysis (e.g., power analysis, linear orthogonal transforms, and parametric linear ... Information on the start time and the sampling rate of the data collection can.

Sparsity Based Defect Imaging in Pipes using ... - Villanova University
... for real-time and in situ imaging of defects in thin-walled plate-like and shell- ..... F., "Compressive sensing for through-the-wall radar imaging," J. Electron.

Sparsity Based Defect Imaging in Pipes using ... - Villanova University
... ://www1.villanova.edu/villanova/engineering/research/centers/cac/facilities/aul.html ... Center for Advanced Communications, College of Engineering, Villanova ... then inverted via group sparse reconstruction, in order to produce an image of ...

Using Correlation Detection for IMA-IDS Architecture ...
Mar 9, 2004 - IMA-IDS is a global architecture for using intelligent and mobile agent ..... Bi-directional deduction rules : the description rules are in general bi-.