DEV Community

Cover image for Master The Five Whys Method for Problem-Solving as a Developer
Danila Petrova
Danila Petrova

Posted on • Updated on

Master The Five Whys Method for Problem-Solving as a Developer

Programming is essentially problem-solving both on a small and a large scale. And the best way to resolve an issue is to identify the core reason for it. Considering how big a part of the work process debugging is, you need to use methods that are adequate and reliable as far as analysis goes.

What I learned, working in a java development company is that the approach towards solution-building makes a great difference. The results are clearly measurable both in term of time efficiency and the quality of the end product.

That being said, the five whys method is one of the most useful tools for in-depth Root Cause Analysis (RCA).

Method Origin and Purpose

The origin of the method lays with the basis of Toyota’s scientific approach. More specifically, aiming to isolate the cause of the issue and target it precisely. By repeating the question why five times, both the nature of the problem, as well as the solution, become clear.

Alt Text

Each next “why” refers to the answer provided to the previous one. Seeing is believing, so here, let me show you a practical example:

Start with Context and Problem Definition

You can apply the method to analyse any issue you encounter. You need to have the situation’s context to make the most of using the Five Whys method. In your work as the developer, or QA using the available documentation, you would have all the information you need to start asking your whys.

Let me set the scene:
I am in Paris for the first time. I have never used an electric scooter before so I rent one - a Lime. I get used to the motion for 5 to 10 minutes and go on to ride it on the bike and bus alley as I intend to use it as transportation to the hotel. I hold my phone in my left hand while riding, for the purpose of using Google Maps to avoid getting lost.

I am at a stoplight, currently red. The light turns green and...

Issue definition:

I dropped the phone on the lane on my left. It got ran over by a car. Twice. Now it is unusable.

The phone has a silicone back cover but no screen protector. The tire ran right over it and the glass shattered to tiny pieces. To determine the root cause of the problem - dropping my phone - I applied the Five Whys Method:

Why did I drop my phone?

Because I pumped the brake too suddenly after the light turned green. To hold onto the handlebar, for better control, I had to drop my phone and it fell on the middle lane.

Why did I pump the break too suddenly?

Because I sped up too quickly when the light turned green and had the potential to lose control of the Lime and hurt myself.

Why did I speed up too quickly?

Because I pushed the starter to the end at once, instead of gradually accelerating.

Why did I push the starter too hard?

Because I was not fully familiar with the mechanism of electric scooters. I had never used one on full speed before. I was not aware that pressing the switch all the way down at once, gets the vehicle to the maximum speed immediately, rather than slowly accelerating.

Why was I not fully familiar with the mechanism of electric scooters?

Because I did not take the time to test it out with all its functionality before introducing my phone as a GPS to the equation.

Root Cause - The Takeaway From the Five Whys Method

I was too impatient. I did not take the time to get fully accustomed to the Lime before introducing a distraction. By adding too many new elements at once I ended up sacrificing my phone for the sake of safety.

Alternative conclusion:
As Limes are targeted to be used in a combination with a mobile device and GPS, they should be equipped with phone holders to accommodate the target user's need to place their phone safely, where they can see it and use navigation.

However, as a believer in Extreme Ownership, I choose to use this experience to learn.

As a result of my analysis I have discovered a few potential upgrades to my Lime-riding mindset:

  • Do not speed up too quickly on a Lime
  • When trying new transportation - get used to controlling it well before adding distractions and additional challenges
  • My phone goes either in my pocket or attached to my wrist in an appropriate holder so my hands remain free

Technical Example by Toyota

If you want to know more on this example click here:

“Why did the robot stop?”

The circuit has overloaded, causing a fuse to blow

“Why is the circuit overloaded?”

There was insufficient lubrication on the bearings, so they locked up.

“Why was there insufficient lubrication on the bearings?”

The oil pump on the robot is not circulating sufficient oil.

Why is the pump not circulating sufficient oil?

The pump intake is clogged by metal shavings.

Why is the intake clogged with metal shavings?

Because there is no filter on the pump.

Try it Out!

As you see, you can apply this method to any situation, from a travel anecdote to technical setbacks. Try it out for yourself. Remember to be specific with your answers, and keep asking why. Make sure to direct the question to the response on the previous one - actively zeroing-in on the true cause.

And if you want to check out more examples there are plenty out there! For the League of Legends gamers, here is a game-specific one. And if you want even more click here.

Make sure to add to the discussion by telling us what problem you applied this method for? Did you find it helpful and easy to use?

Top comments (9)

rjmoise profile image

Why am I reading this article?
Because I usually start my workday off with some misc reading.

Why do I start my day with some misc reading?
Because I do not like jumping directly into my workload.

Why do I not like jumping directly into my workload?
Because I am not always confident in my abilities to solve the problem at hand.

Why am I not confident in my abilities to solve the problem at hand?
Because I am suffering from Impostor Syndrome.

Why do I suffer from Impostor Syndrome?
Because I do not focus 100% on work and therefor am not as knowledgeable about our infrastructure as I feel I should be.

Well really can use this method with anything.

theodesp profile image
Theofanis Despoudis

I'm pretty sure that whatever the first question is, every last question always circulates over the same reason...

Why do I suffer from Impostor Syndrome?
Why do I suffer from Impostor Syndrome?
Why do I suffer from Impostor Syndrome?
Why do I suffer from Impostor Syndrome?

danilapetrova profile image
Danila Petrova

That is a perfect application. Way to go showing us how it is done!

murrayvarey profile image

The Five Whys (or any similar system) is extremely useful. It's always worth digging deeper. I find myself repeatedly asking "What's the real problem here?"

That said, it's worth treading carefully -- depending on where you focus your questions, you can end up at very different conclusions. In your phone example, you could dig deeper on (a) the scooter, or (b) the unsecured phone, or (c) the busy Paris roads, or (d) the psycho driver who ran over your phone, and so on. If you get the wrong focus at the start, you can end up wasting a lot of time. (After all, there's not much you can do about those psycho drivers!)

danilapetrova profile image
Danila Petrova • Edited

I agree with you, depending on the questions you will reach different conclusions. However, isn't that the beauty of the method? You can explore multiple different options and gain an understanding of the bigger picture.

While some will lead to a dead-end such as not being able to control other people's actions or reactions (as with the driver), others will be helpful.

I find it particularly useful when I am trying to "kick" a bad habit. For example, my sweet tooth turned into a coping mechanism with stress. Over time it became an automatic action I did not think about when under stress.

By applying the five whys when I get the urge, I can "override" the initial impulse with a decision to opt for something healthy instead!

Feel free to try it in different situations, and always take the outcome with a grain of salt, so you can determine if it is accurate or not. And be sure to explore different interpretations.

Hope this helps!

murrayvarey profile image

Yeah, you're absolutely right, it forces you to dig into questions that you might otherwise have skimmed over. And, as you've shown, it can be used in any part of life (though I think my sweet tooth needs more like eight or nine questions ...) I would just add that, for me, it's worth regularly checking -- "is this line of questioning helping me?"

csmikle profile image

The problem (ie the first why) is that you were holding your phone in your hand, unsecured, while trying to ride a scooter. Once we skipped past that point and never came back I was pretty puzzled

paulasantamaria profile image
Paula Santamaría

I've heard of this method before, but never actually learned how it worked. Thanks for this!

danilapetrova profile image
Danila Petrova

Hope it helps you!