swiss_cheese_model_of_accident_causation

I often get into a debate with people about the type and the extent of testing that has to be done for software. One of the key arguments I hear is that developers should focus on creating only the happy path and leave the rest to the testers to find or have SDETs write extensive automated tests while developers can skip unit tests and focus only on writing useful code.

I have used the swiss cheese model to explain to people about the need for layered coverage instead of concentrating all the effort onto one layer. I first heard this term while watching an air crash investigation episode in nat geo. The narrator explains that though there are millions of parts in commercial airliners, the chance of getting into an accident is far lesser than motorcycles.

How an aircraft with millions of parts is able to get back on to the sky within a few hours after landing from a long trip? The answer lies in layered testing. The pilot has a pre-flight checklist, the ground staff do a routine check for visible damages, the maintenance crew notice the hours of usage and do preventive maintenance, there is a strong network of weather monitoring and routing, ATCs manned with trained staff and modern radars, aircrafts fitted with collision avoidance systems, a long series of protocols for ground and sky movements etc.

It is the same across many engineering and medical disciplines. The risk of something slipping through all the layers of test is very rare and if it happens then it is immediately plugged. In software engineering it is a combination of static checks, unit tests, integration tests, automated ui tests, heuristics & exploratory tests, performance tests etc. No one type of test can be removed altogether and replaced by another. We need the layers to move fast and yet deliver what is required.

Image courtesy: Davidmack, Swiss cheese model of accident causation, CC BY-SA 3.0

I went to a restaurant for a buffet which was a bit crowded. I thought the service at some of the live counters will be slow but was surprised that the people at the counters were able to serve large number of customers in a short span of time, especially the salad counters.

fruit-2305192_640

I was curious so visited one of the salad counters to see how was it possible for them to serve that many people at once. It was shocking to see that in the name of speed the person at the counter was cutting fruits in such a way that about half of them got thrown away along with the skin and the seeds. If this person had maximized the fruit content then it would have taken 4-5 times the amount of time taken now on fast cuts.

It is very clear that the restaurant can afford to waste as much of half of the food because they still gained from servicing a lot more people than operating efficiently. It was optimized for time not cost.

This is something people don’t understand while choosing tradeoffs, people often choose both cost and speed as key without giving a second thought that both cannot go hand in hand. If the same set of people had to do things much quicker and at a larger scale there has to be expenditures in tools, training and also some change in processes where there will be huge wastes before optimization kicks in. This is what happens in software development teams, often there is a tight budget and an impending doom if something does not happen; leading teams to easy burnouts.

I did not include the word quality here as it is non negotiable, you can do things quick and cheap but with a poor quality of work like serving the fruits with seeds still intact or skins not peeled well. That is not work done, there is no work without quality; eventually it drives away customers.

Next time when you have a debate about speed consider moving the cost sliders.

 

 

 

If you are a salaried person, then imagine that you are a business owner who serves only one client at a time. Won’t you keep looking to improve the product/service you offer, won’t you keep looking at emerging trends and stay on top of your business domain, won’t you find out who your next prospective client is? It is not that hard to answer these questions, a business owner always has to stay aware of the market and stay relevant.

children-2088382_1280

When it makes sense as a business owner to explore the market, find the options and stay relevant; why should salaried employees not be aware of what is going on around them? Each salaried person should always stay aware of the market and keep themselves relevant. I have often come across people who scamper for opportunities or rush to update themselves when they are either disgruntled or unable to perform with their current employer. This will lead to people making bad decisions as survival instincts kick in to stay employed. Your best decisions will come to you when you are least stressed.

If we treat our employment as a business that has to be sustained, we won’t be relying on the learning & development programs of the companies. We will constantly be in touch with the industry and will continue to stay aware and stay relevant. To be aware of what is going on in the market, time to time conversations has to happen about opportunities like any other business. If we are aware of the market, then we are aware of our abilities and will shape up quickly to always be a market fit.