FREE Subscription to Dr. Dobb’s Digest: Same Great Content, New Digital Edition
Site Archive (Complete)
Testing & Debugging Blog: Multiple Set Answers
Testing and Debugging
BREAKPOINTS

Test, Debug, Release, Rinse, Repeat ...

by Kevin Carlson
THE BOOK OF TESTING

Thoughts From a Braidy Tester

by Michael Hunter
September 11, 2006

Multiple Set Answers

A while ago I posed a few puzzles I stole from Jerry Weinberg's An Introduction to General Systems Thinking. The first was to see how many different plausible next members you could think of for the set

{ 1, 2, 3, ... }

It seems there should be tons, but I only came up with the following:

  • The set of integers, making the sequence { 1, 2, 3, 4, 5, 6, 7, ... }
  • The set of prime numbers, making the sequence { 1, 2, 3, 5, 7, 9, 11, 13, 17, ... }
  • The Fibonacci Sequence, making the sequence { 1, 2, 3, 5, 8, 13, 21, 34, ... }
  • A pattern of odd-even-odd, making the sequence { 1, 2, 3, 5, 6, 7, 9, 10, 11, ... }
  • A sequence of random numbers that just happens to start with three numbers in order, giving an infinite variety of sequences


The second puzzle was to see how many different plausible next members you could think of for the set

{ Mathew, Mark, ... }

Reader Rob B. came up with

  • [ The set of all words ]
  • [ The set of all words that begin with "M" ]
  • [ The set of all words that are either four or seven characters in length ]
  • [ The set of all words that use at least one letter from each of the three rows on a Qwerty keyboard ]
  • [ The set of all words made up only from the letters A, E, H, K, M, R, T, W ]
  • [ The set of all words that do not include the letter B (or the letter C, or... There are nineteen of these) ]
  • [ The set of all words that include neither the letter B nor the letter C (or neither B nor D, or … ) ]
  • [ Lots of variants on words that do not include a specific sequence of letters ]
  • [ Repeat all these sequences for "the set of all names" rather than "the set of all words" ]
  • [ Repeat all these sequences for "the set of all male names" rather than "the set of all words" ]
  • [ Repeat all these sequences for "the set of all Christian disciples " rather than "the set of all words" ]
  • [ Repeat all these sequences for "the set of all Christian apostles" rather than "the set of all words" ]
  • [ Repeat all these sequences for "the set of all names from the Bible" rather than "the set of all words" ]
  • [ Repeat all these sequences for "the set of all male names from the Bible" rather than "the set of all words" ]
  • [ Repeat all these sequences for "the set of all names for and types of currency" rather than "the set of all words" ]
I came up with several of these, and also with:
  • The gospels in the Bible, making the sequence { Mathew, Mark, Luke, John }
  • People who have ever been members of the United States Congress, making the sequence { Mathew, Mark, Maxine, James, Louise, ... }
  • [ Lots of variants on governing bodies ]
  • People who are dead
  • People who are alive
  • People who were born overseas but are American citizens by birth
  • [ Lots of variants on groups of people ]

So how does this apply to testing? The answer is yet another set of probably infinite size.

One way it applies is as a reminder that there are always several different solutions to every problem. Keep this in mind as you ponder how best to test your feature. For example, find out how your developer implemented your feature, and then consider how else they might have implemented it. Think about how each of those implementation options is likely to break, and then try breaking your feature in each of those ways.

Another way this applies to testing is as a reminder that other people think differently than you. Rob and I came up with several of the same possibilities for the second set above, but we also came up with several different answers as well. If you run your planned test cases past the other testers on your team, and your devs, and whomever else you can get to listen, not only will they have a better idea of what you are doing, but almost certainly they will suggest tests that you did not think of. That certainly can't hurt the quality of your product!

How else? Let me know.

Posted by The Braidy Tester at 07:30 AM  Permalink




 
INFO-LINK