Poka-yoke
So I used poka-yoke (ポカヨケ) in a conversation yesterday. I am working on an update to an app that uses a web service. Under an extreme edge condition, the app would make an API call with a missing parameter that was required. This would error out on the service side and we caught it with the logs.
The simple fix was to change the API call so it would check for missing data coming in and just return without doing anything. I went full poka-yoke and also changed the app so it wouldn’t make the call until it had the required information. Easy enough fixes. When I was chatting with my boss about the fixes, I dropped the term poka-yoke into the chat.
Years ago, I worked on statistical process control (SPC) software for companies that made packaging material. The term poka-yoke was the buzzword of the day and it stuck in my brain. It’s a Japanese term to describe the methods used to prevent errors. If you can prevent your assembly line from making an error, your quality goes up.
To implement poka-yoke, at each manufacturing stage, there is something in place that prevents a faulty output from going on to the next step. A part that is out of tolerance could be automatically redirected to a rejected parts bin. Or a part can’t be welded if it’s not correctly aligned. By doing these checks inline, problems can be addressed earlier in the process. This saves production time and production materials.
An example would be a machine that cuts corugated cardboard sheets to make boxes. If the cardboard is not lined up correctly, you get box that doesn’t fold up correctly. We used an optical sensor to measure the position of the sheets as they went through the cutter to make sure they lined up correctly and then on the side to make sure that the cuts were in the right place and of the correct dimensions.
Through software, we can check those sheets faster than the operator. If something was out of alignment, we could stop the machine before too many sheets were ruined. We helped our clients reduce the amount of downtime and saved them a lot of money.
You have something in your kitchen that is an example of poke-yoke. Your microwave wont turn on unless the door is closed. That seems fairly obvious, but it’s a clear example of how poke-yoke can be implemented.
To apply the principles of poka-yoke to software, one goal would be to prevent an error from propagating through multiple services. We have that old saying. “Garbage in, garbage out”. If you apply poka-yoke to that, it becomes “Garbage in, garbage rejected”. My change to the app to not allow an API call with invalid data is another example of poka-yoke.
Poka-yoke was developed by an industrial engineer named Shigeo Shingo for the Toyota Production System (TPS) back in the 1960s. If you ever heard the term “just-in-time” manufacturing, it came from TPS. A translation of poka-yoke means “error-proofing”, from the words “poka” meaning mistakes and “yokeru” meaning to avoid. Which is better than the first term that Shingo used, baka-yoke. That translates to “idiot-proofing”, which was less than popular with the machine operators.
Comments