Saturday, April 20, 2013

Root Cause Analysis for dummies: Part 2 - Definition


What is a Root Cause?

The word speaks for itself: the root of the cause. That simple? Yes! 
BTW, I like my another version from the practical point of view: 
A Root Cause is defined as any cause when it is removed, it can eliminate the reoccurrence of an effect. 
What's the root of a tree? There are many components of the tree: leaves, truck, body, bottom part, ROOT: the most bottom part inside the soil. Is it the ROOT the only root cause of a tree? (The answer is NO, below will tell you why.)

Every single problem or an issue is an effect of a cause. If there is a effect, there is a cause.
A cause is the reason behind causing the effect. Cause -> Effect. From now on, the symbol -> will be used to mean causing.  For example, the Cause is no electricity and the Effect is Lamp malfunction. No electricity causing the Lamp malfunction.

No Electricity -> Lamp Malfunction

Cause A -> Effect A

So, in the example, if we remove the Cause A, we can eliminate Effect A. 

For instance, the main switch is turned off causing the lamp malfunction. The cause of the lamp malfunction is the off main switch. According to the definition above: the root cause of the lamp malfunction is the off main switch.

That simple?! Yes! That simple. Do I need to find out who turn off the switch? That may be the root cause. Do I need to find out the reason behind the person turn off the switch? That can be the root cause too, right?

Let me draw the diagram to clarify how to single out this chain of effects and identify the root cause.

Reason behind the person turning off the switch -> The person turn off the switch -> Main switch is off -> Lamp malfunction. 

If you look at above diagram, we can rewrite it like below.

Cause A -> Cause B (Effect of Cause A) -> Cause C (Effect of Cause C) -> final Effect

So, let me ask the same question again. What's the root cause of the final effect?

..... give you 5 minutes to think about it :)

......

......

Answer: Cause A, Cause B, Cause C

What? Why all three are the root causes of the final effect?
The answer is: if removing the cause will removing the final effect. This fit the root case definition.

Cause A: Reason behind the person turning off the switch -> 
Cause B: The person turn off the switch -> 
Cause C: Main switch is off -> 
Final Effect: Lamp malfunction. 

Eliminate Cause C: If we turn the main switch on, the lamp is functional now. The effect is gone.
Eliminate Cause B: If the person did not turn off the switch, the switch is on, the Lamp is functional. Effect gone!
Eliminate Cause A: If the reason behind the person turning off the switch is removed, the person did not turn off the switch. The switch is on and the Lamp is functional now. The effect is gone too.

So, the root cause of an issue is depending how the issue is defined. If you want to solve the issue of Lamp malfunction. You can just turn the main switch to solve this issue. The immedicate cause of lamp malfunction is good enough to resolve the issue.

If you want to resolve the issue to prevent the person turn off the switch, we have to find the reason behind why the person did that.

So, my point is: It is not necessary to dig too deep of a cause unless you want to address deeper issue.
If not, immediate cause is good enough in most cases.

Points to remember:
a. Cause can become an effect if there is a cause creating this cause. 
b. Eliminating a cause to remove an unwanted effect, this very cause is weighty enough to be a ROOT CAUSE.


2. How about I have 2 causes of a effect (issue or problem)?

Cause A: Main Switch is off -> Lamp is malfunction
Cause B: Light Bulb is broken -> Lamp is malfunction

Both Cause A & Cause B cause the lamp malfunction.

To resolve this issue, we can resolve Cause A and Cause B. That is to turn the main switch on and replace the light bulb. 

To be creative, i give you 5 minutes again to find a creative solution yourself that can solve this problem with ONE solution.

..... give you 5 minutes to think about.

......

......

Cause C: No one monitor the main switch and the Light bulb. That's the cause of Cause A & B. 
So, we can resolve this issue by finding the Cause C, exactly speaking to define the cause C and resolve it. 

We can just search what behind the Cause A & B. 

Cause C -> Cause A & B -> Final Effect
Not Monitor Main Switch and Bulb -> Main Switch is off & Bulb is broken -> Lamp malfunction.

In this, Cause A & B, a combined cause can be a root cause of Lamp malfunction.
Or, Cause C can be a root cause of Cause A & B. 

Either eliminating only cause C or eliminating cause A & B will resolve the Lamp malfunction problem.

Points to remember: 
a. An effect could have multiple causes. 
b. The multiple causes can be a root cause.
c. Or the cause behind the multiple causes can be a root cause. 


3. How about a cause has multiple effects?
Main switch is off -> Lamp malfunction and Alarm clock malfunction
Cause A -> Effect A & Effect B

This is similar to the previous cases. The root cause is Cause A. 
Resolving Cause A will eliminate effect A & effect B. 

Points to remember:
a. A cause could have multiple effects.
b. Resolve this cause could resolve multiples issues/problems.

Conclusion:
Isn't it nice and effective using one stone to hunt for two birds?

If you can put the very definition in mind, you would not be afraid to identify the root cause. 
By this, you will get more chance to tacky the issues in your work and your life. 

Hopefully, this can help to remove the hassle of finding a root cause.

Friday, April 19, 2013

Root Cause Analysis for dummies: Part 1 - Introduction

Introduction
The first time I learned Root Cause Analysis (RCA) is from a training class in a chemical company 15 years ago. They put safety in the first of the first priority. Since if there is any major safety incident, the plant manager can be fired or even the whole plant will be closed. For this reason, they introduced Root Cause Analysis to every employee for part of continuous improvement to avoid occurrence of the same incident, big or small.

I picked it up and kept it in my arsenal to use it daily to resolve IT problems. It became my arm and leg just embedding in part of my mind. The merit of this tool is: once the root cause is identified and being resolved. The similar problem or issue will be disappeared forever. 

When surfing the Web, there are a lot of website talking about RCA. Most of them embrace tons of methodologies combining with unnecessary problem solving skills and steps. If I first learned it from them, I'll be intimidated that RCA is belongs to the intellectual or at least a Master degree person could have a grab of it. e.g. http://en.wikipedia.org/wiki/Root_cause_analysisThis is totally untrue.

So, I tried to share my own simple version of Root Cause Analysis. To let all the layman like me, pick it up and become part of themselves. 

Let's go to: Part 2  the definition of Root Cause. 

Pretty much if you define the Root Cause well, in 50% you can identify the root cause right away.

Sunday, April 14, 2013

Google TV - Authentication Error Resolved - Upgraded to Android 3.2

I got a free Google TV in 2010. It was fun to play with. And in 2011, it gave me an upgrade to Android 3.1. It was extremely nice. However, today, when I hooked this Google TV again. It prompts me the Google Talk failed to login error and doesn't allow me to login the Market (now should be Google play).

I tried the some web users suggested two way verification. I got no luck. Even I created another Google account, it still gives me the same error. And because of this authentication error. It doesn't allow the Google TV to upgrade the software to the latest Android software, 3.2 I believe. Simply get me stuck in the middle.

Google for a while, it lands me to this page. http://productforums.google.com/forum/#!topic/mobile/m1l8Sw4hnmY

Below steps work for me. It is in "Manage Application" under "Setting" of Google TV. When I go to Above->System Upgrade again, it shows me the screen to download the latest software (211MB).


da da.... The Google TV is upgraded to Android 3.2 and re-live again. :)


Follow the steps below to if you are experiencing issues with downloading apps from the Android market:

1. Open the Market app and press the home button in the upper left corner to return to homepage
2. Go to Settings \ Applications \ Manage \ Running
3. Press "Market"
4. Press "Clear cache" (do not clear data)
5. Press "Force stop"
6. Return to "Settings \ Applications \ Manage \ Running"
7. Press "Google Services Framework"
8. Press "Clear Data"
9. Press "Force Stop"
10. Go back to home screen and press Market app to Start Google Market, it will give an error message
11. Shut off and turn the tablet back on; once back Market should work, if it gives an error it could need another minute to work
12. At this point the Market should work

Friday, April 12, 2013

Retrieve Linux local mailbox with command lines non-interactively

I need to automate reading email from Linux. So, I google to see if there is any available posted methods to do it in command line non-interactively. Surprisingly, there is no simple scripting method found. The web is either full of how to send email thru command line or how to read email interactively.

So, I dig into mail commands and I did some trials and errors. I discovered "echo" command can enter command to mail thru pipe. And combining with mail command, the command combinations will return the mail command output nicely to Linux stdout after each. Below are 6 handy command combinations.

1. Print all email to stdout
> echo "type *" | mail
> echo "type 1" | mail   # print the first email to stdout
> echo "type 3-5" | mail # print the emails from 3 to 5

2. Check if mail box is empty (i.e. "No mail for [username]" is found)
> echo q | mail 2>&1 | grep "No mail for [username]"

3. Purge the mail box
> echo "d *" | mail

> echo "d 3" | mail     # Delete the 3rd email

4. Save all emails in a text file
> echo "s * test.txt" | mail

5. Save emails between a range in a file
> echo "s 3-6 test.txt" | mail
This will save email from #3 to #6 to the file test.txt

6. Read one email from mailbox
> echo 1 | mail
Read the first mail from mail box
> echo 5 | mail
Read the 5th email from mail box
> echo 6 | mail
If there is no 6th mail from mail box. It will prompt you below error:
6: Invalid message number

The error message "Invalid message number" tells you that there is no 6th email in the mailbox. If the 5th email is successfully returned. You can treat the error message "Invalid message number" as end of mailbox just like the EOF of a file. Combined this with a loop, you can browse thru all the emails inside the mailbox. 

It was fun to dig those command combinations out. Just like resolving puzzles. :)