Software Testing "Popcorn" button

I made myself some microwave popcorn for a snack just now.  Placed the popcorn bag in the microwave, pressed the 'popcorn' button and then 'start'. Someone next to me said: "There's a popcorn button?" Um, yes, there is.  In fact, there has been a 'popcorn' button on every microwave oven I've ever seen.

I explained to my colleague that the recommended time on the bag (in this case it was 2 min 30 sec) doesn't work on every oven.  Different ovens have different power output and so the actual cook time may vary.  If I go with the default time, it might burn or be under-done and leave too many unpopped kernels in the bag.  You could figure out the correct time in a few ways.


Method 1: Math
Start by taking a look at the power output of the oven. Full-size ovens deliver 1,000 - 1,600 watts of power, and mid-size ovens yield 800 - 1,000 watts. Higher wattage heats food more quickly.  If it's not explicitly written on the bag, assume the default popcorn popping time is for a 1,000 watt oven.

Use a time/power ratio along the lines of: ( t_your_micro_oven / P_your_micro_oven ) = ( 150 sec / 1000 W)

I converted the 2:30 recommended time on the bag to 150 seconds for convenience.  The power of your microwave oven should be written on the back somewhere, probably close to the plug.  This leaves your popping time as the only unknown variable in the equation, so it should be straightforward to solve.

That might work.

Method 2: Brute Force/Iterative
Put the bag in the oven and follow the instructions exactly.  Make no changes.  When the time is complete, take the bag out and put the contents in a bowl.

If you are happy with the result, congratulations! You are done.  If not, we will need to change the cooking time for the next bag.

On a piece of paper (or in a document on your computer if you prefer), make some observations to capture things like: time settings used, quality of the popcorn output, taste, number of unpopped kernels, and so on.  Keep a note next to the microwave oven or on the container where you keep more popcorn bags -- a note to reference these 'test results' so that you can have something for comparison the next time.

Basically, you know where I'm going with this.  Pop the first bag with the default recommendations and keep varying the subsequent popping times until you are happy with the result.  This will require "n" bags to iterate through until you are happy with the end result.

This should eventually produce high-quality results.  It may take you some time and will be costly to do it this way as you may have to go through many bags until you get it just right.


Method 3: Popcorn button

Put the bag in the oven, press the 'popcorn' button, serve and enjoy.

I'm not certain how this works.  I shall call it "magic" for now.  I can speculate that perhaps the microwave oven manufacturer has a team of engineers dedicated to the "Perfect Popcorn Production" using their equipment and are responsible for programming the correct power and time settings into their ovens.

Maybe they use Method 1 above.  Maybe they use a combination of methods 1 and 2 above.  Maybe it's something else.

The point here is that someone has already done the thinking for me so that I can focus on the quality of experience of using their oven.

Wow.  I have so many comparisons and analogies back to Software Testing running through my head right now.

One that jumps to mind is development & testing terminology/jargon.

  • When is a test not a test? When it is a check. When it is an inspection. When it is a question. and so on.
  • Are your [agile] development sprints 2 weeks? No? Why not? That's the default value, so it should work for you, right?

What if software organisations were responsible for their own 'popcorn' buttons? That is, where the 'popcorn button' is a way to communicate the methods and models used within their organisations that produce the desired 'quality' result.

As a consultant, one of the first things I do is watch and listen to the development and project team members. I need to understand their terminology and way of doing things.  That helps set a reference frame for me.  If I want to make an improvement or change somewhere, I need to have an understanding of how to do that on their terms, not terms according to some industry standard or certification terminology dictionary that may not apply.

What would be the point?  Well, I think it would be handy if we could abstract out some of the desired practices from the terminology and implementation details that are specific and custom to every organisation, team or project.

Now that I think about it.  Maybe, we as consultants are the "Popcorn Programming Facilitators."  That is, the company wants to implement an automated regression testing activity.  What does that look like? How can that work for us? What kind of output do we get?

Some days we identify the required popcorn buttons (e.g. Regression Testing, Bug Tracking System, Produce Status/Progress Reports). Some days we help program them.

What do you think?

3 comments:

  1. I like your popcorn button metaphor!

    Often, teams want to know the exact recipe for how to succeed. They don't realize that they already have the answers - they just need time to think and experiment and find what works. I'm glad there are consultants such as you who look to facilitate that process, instead of feeding people the 'right' answers.

    ReplyDelete
  2. The heart of testing is understanding the "if this outcome is true, this follows also" for the domain involved. For popped corn the two second rule applies for most corn. Hear a pop, start counting seconds: "1 mississippi, 2 ...", when you can count 2 full seconds with no pop, the bag is ready.

    This has worked for me over a wide range of brands and a wide range of microwaves. And since effective power in the microwave is very dependent on the age of the 'wave it's a useful trick for determining the time for a bag of popcorn AND when it's time for a new microwave.

    ReplyDelete
  3. Very nice post indeed! I would like to take opinion from someone having experience working with an Independent Software testing company, what do they say about this?

    ReplyDelete