Wednesday, March 26, 2014

testing lessons learned from a dum biryani

One of the better analogies I've heard about testing starts with the notion of preparing a dish that you will be serving to someone. As a chef you would probably ask what the customer wants and you would perform the due diligence of getting the ingredients you need, prep the ingredients, make sure you have all the necessary utensils, cookware and equipment. Then you can cook and serve the food to the customer.

There are subtle nuances in-between that whole cooking process that will most likely spell the difference between the quality of the food that's being served. A chef normally tastes the food as he cooks it. Carefully adds the ingredients and tweaks the taste by adding salt, pepper and other spices while tasting after a new change is introduced. This is heuristically true with testing. Whenever there there is a change, a risk might have been introduced and the effects of that change needs to be evaluated. That change is usually evaluated through testing, whether you are confirming the known effects of that change (bug fixes or new features), or performing "regression" testing of features that you know and care about, or performing exploratory testing to find out more things about the product  or system under test.

Test as you go, taste as you go.

For a while, this testing analogy was closest to how my understanding of testing has evolved over the years. Until March 25, 2014 (last night, as of this writing) ... when I was introduced to the Dum Biryani.


The Dum Biryani is an Indian dish that contains rice, marinated meat, spices among other ingredients. What's really fascinating with this dish is how it's cooked. The chef, layers (basmati?) rice, vegetables and meat in combination with spices in a clay, ceramic or copper pot then cover the top of the container with dough then cooked in low flame for a long, long, time. The dough cover mimic the effects of being in a pressure cooker. The result is a really good rice dish with an amazingly tender meat that goes really well with the rice.

Did you notice the gap and how this fails the tasting analogy with regards to testing? This is what really blew my mind. After the dough is closed, there is no way for the chef to correct the dish through tasting. I was also told that a really good chef will know how the Dum Biryani will taste like based on the aroma that the food releases while the ingredients are pressure cooked. The smell doesn't help the analogy either because the cook still can't effect change while the dough is closed.

What I learned was that these chefs don't need to taste the dish despite the myriad of variables that may affect the taste. To name a few, these variables are the type of rice, the water used to cook the rice, the elevation where the dish was cooked, the material of the vessel where the dish is cooked, the type of saffron being used, etc, etc, etc.

After further discussion, I realized that these chefs have learned how to cook this dish to the point where tasting can be done by feeling the ingredients through their fingers. Tasting was indeed done but not through "regular" means. The chef has attained a new level of expertise by leaning towards learning through experience and has most likely continued to work on his craft through experimentation. As testers, we should strive to do just that.

To date, no one has heard of anyone that became a respected dum biryani cook after taking a test. 

I digress.

No comments: