August 21, 2007

The Shopping List

Posted by Ben Simo

A couple nights ago, my son and I were in a store with a list of grocery items to purchase. My wife had given the list to our son and he was calling out a few items at a time. If he called out too many items, I'd forget them all and ask him to start over. When he called out something that I knew was nearby, we'd head in that direction and get that item. Darting back and forth may not be a very efficient way to shop, but it likely costs me less than systematically going through the store. When I go grocery shopping with an always-hungry 10 year old boy, it is very likely that we will buy twice as much stuff as is on our list.

Although he will claim that I always say "no", my son is skilled at talking his dad into buying things. In this trip to the store, he first asked for some expensive pastries knowing that I would say no -- like I always do. :) Then he proposed the cookies that I think he really wanted and gave me a well-thought-out argument as to why these were better and cheaper. The cookies found their way into our cart.

I wasn't very concerned about the accuracy of our selections because my wife was elsewhere in the store helping our daughter find some new gym pants for school. I knew that my selections would be tested before I paid for anything. Should anything not pass the inspection, I knew I could put it back and replace it with the correct item.

This trip to the store reminded me of a shopping trip a couple months back. My wife gave me a hand-written shopping list containing the text shown below.

DVD Lens Cleaner
Toilet Paper - get extra
canned dog & cat, kitty litter
Tea Tree Oil
Lined paper - college ruled
Mech. pencil 0.7
hamburger meat, chicken tenders tenderloin
cone shaped coffee filters
white vinegar 64oz - same isle ^
canned tuna fish
crackers - saltines + Ritz
Doritos
Fig Newtons Maple Syrup
reg. coke + apple soda
Dairy section
coffee creamer, eggs, yogurt
cheese
variety juices from freezer section
plus lemonade
Grapes
Pears - bartlett

As I worked my way though the list, I noticed that the level of detail specified for each item varied. Some things contained specifics while others did not. However, there is much implied in the list that is not written. How do I know that there is much implied? I've been married to Sophie for 16 years. I know my wife and she knows me. At least that's what I like to think.


She knows that she has to specify regular Coke because I'd buy Diet Coke if she didn't tell me otherwise. She also knows that I know that when she writes "apple soda", she is referring to a specific brand of apple flavored soda pop.

She did not specify what kind of toilet paper to buy but I have learned from experience which brands she will find to be acceptable. I had no idea how much was extra, so I ensured that we would not run out anytime soon.

She wrote "canned dog & cat", knowing that I would joke about not finding canned dog or cat meat in the store while understanding that I should get canned dog food and canned cat food.

She specifically told me what shape coffee filter to buy because she had recently bought a new coffee maker that requires a different shaped filter. Had she not told me which shape, I would have likely bought the wrong kind: the kind I had been buying for years. However, I discovered that there is more than one style and size of cone shaped coffee filter. I did my best to guess as to what size the new coffee maker used. I had not yet used the new coffee maker, but I had seen it. Then, before I left the store, I called home to confirm that I selected the right size.

From a conversation before I went to the store, I knew that the "canned tuna fish" was for the cats. I made an executive decision and bought tuna flavored cat food because it cost less. If I didn't know this, I might have thought that the tuna was to put on the crackers for our lunch.

I knew that "Fig Newtons" did not require that I buy that specific brand of fig bars. I also knew from experience that there were some brands I should not buy.

I am intelligent enough to know that the maple syrup is a separate item from the fig bars. However, I did not know if Sophie wanted real maple syrup or if maple flavored corn syrup would do. I bought both.

The list did not say anything about what kind of cheese I should buy but I knew what kind of cheeses we usually eat and made a guess.

I knew that "coffee creamer" came with many unwritten requirements that I have learned from shopping with my wife.

I knew what "variety juices" my family will drink and what they will not drink.

I knew that if I made a mistake in my selection of items, I might have to make another trip to the store. I was more careful in my selections than I am when Sophie is in the store. I double checked my list before I left the store.

I got most of the items right. The coffee filters fit the new coffee pot. I didn't get the vinegar right in spite of the more detailed directions about type, size, and location. And, I totally forgot the most important item on the list: the chocolate.

So, what do my shopping adventures have to do with software testing? Very much.

  1. Written requirements are only part of the story
  2. Explicit written requirements cannot fully communicate user needs
  3. Requirements may be communicated in passing
  4. Communication before, during, and after implementation is essential
  5. Familiarity improves the success rate -- and makes requirements definition easier
  6. Unit testing by implementers does not ensure success
  7. User acceptance testing earlier in the process costs less than waiting until the end
  8. Context frames everything

After nearly 16 years of marriage, I failed to completely meet expectations implementing something as simple as a shopping list.

And yet we expect people on software projects, that hardly know each other, to understand each other's desires.

What else can we learn from shopping lists?

  Edit

9 Comments:

August 22, 2007  
Pradeep Soundararajan wrote:

I would be happy that a tester looking into this post understands that not all lessons of testing are in books but is available in our daily lives, too.

Consciously looking for it is one important thing that testers need to do in my opinion apart from asking "What did I miss here?" when they feel there wasn't any learning.

There might be situations and or scenarios that might not relate to testing context but there is certainly one if you could develop an eye to look for it.

Awesome post my dear friend!

August 22, 2007  
Pradeep Soundararajan wrote:

I wrote I would be happy that a tester looking into this post understands that not all lessons of testing are in books but is available in our daily lives, too.

and please permit me to re-phrase it. So here is how it would look:

I would be happy if a tester looking into this post understands that not all lessons of testing are in books and in certification courses but is available for free in our daily lives, too.

August 22, 2007  
TheRedheadedDevil wrote:

What an amazing post.

After just hearing some serious lipservice about how it is not only possible, but my responsibility to make sure that all requirements are testable, reading this gives me something to chew on indeed.

By the way, this is me from http://blog.testyredhead.com

August 22, 2007  
Joe Strazzere wrote:

Terrific analogy, Ben!

August 24, 2007  
Mother of QA wrote:

So where's my chocolate???
Hint: Today's our anniversary, have you seen my list lately and my requirements for celebrating the good the bad and the ugly? As we've worked out the bugs, you better get it right this time, there's no excuses because I'm not very subtle. P.S. Don't measure the success or failure of our marriage based on how the house looks but on the fact that we're still together and continue to grow and learn to get it right on a day by day, minute by minute, second by second basis! Must be doing something right, huh?

Sophie

August 24, 2007  
Debasis Pradhan wrote:

Hi Ben,

Excellent analogy! Testing lessons are lying loosely around us among our daily activities. It depends on our (the tester’s) ability to recognize them and learn from them. Recently I have blogged on Testing Lessons from Kitchen! Hope you will find it interesting. Thanks.

Regards,
-Debasis
Software Testing Zone

August 27, 2007  
Cem Kaner wrote:

Good example, I'll probably use it in class.
-- cem

September 07, 2007  
junk wrote:

Isn't that bringing to the conscious mind something that was always in the unconscious mind anyways?

SVJ

October 11, 2007  
Carlos GR wrote:

Actually I believe that we can learn another thing from this list. And the thing is, that staying at the time that the requeriments are being defined will allow us to ask until we really know what the costumer is trying to transmist in its requeriments and maybe it could save us another "trip to the store".