Home

Sunday, April 11, 2010

Bulls and Cows

There is an old proverb - Necessity is the mother of invention. When a scientist invents something there is always a need. The Need is the final motive of any invention.

What is Need?
Need is a condition or situation in which something is required. In short need is requirement.

But what if the need is wrongly interpreted, Is the invention possible in that case? Might be possible but it would not be right invention; it would not actually do what we needed.

Now we change the above proverb according to IT Industries.

Requirement is the mother of every product.

Now what if requirement is wrongly interpreted, is the product possible in that case? Might be possible but it would not be right product because it would not do actually what stakeholders needed.

To provide a quality product to client, it is very important to understand the needs of the client. The purpose of testing can't be fulfilled if tester doesn't understand the requirement properly.

Why the requirement is mis-interpreted?

There may be various reasons such as:
• The clients/ users actually don’t know themselves what they really want or what they need?
• When it is impossible to know who yours users will be and it is quite often if we don’t consider the narrowly defined situation such as an EHR application.
• In general Requirements are not detailed enough to understand the exact needs of the stakeholders.

How the situation can be avoided?

The best solution is questioning. Questioning can be used as a tool to understand the exact requirement of a client. More you ask questions, more you clear about the product.

To depict the power of questioning and how it helps to understand the requirements of a client, we can take example of a game called “Bulls and Cows

What is Bulls & Cows? - In childhood, you might play this game. This is also known as Cows and Bulls or Pigs and Bulls or Bulls and Cleots. This is a code breaking game played between two players.

How the Game is played?
- On a sheet of paper, one player writes a 4-digit secret number. The digits must be all different. Then, the second player tries to guess this number. If the matching digits are on their right positions, they are "bulls", if on different positions, they are "cows". Example:

Secret number: 9374
Opponent's try: 4873 and asks “Is this correct?”
Answer: 1 bull and 2 cows. (The bull is "7"; the cows are "3" and "4".)

On the basis of answer, the opponent tries again until he finds the secret number. By asking a single Question again and again, Opponents finds the correct number.
When a single question can help to find a number then imagine how many questions you can ask in a requirements document. Asking Questions is a skill and it comes with lots of practice and time. But if you know the skill of questioning, there is no way to mis-interpret the requirements.

My Suggestion:
If you find problems to understand the requirements then you should practice “Bulls & Cows”. If there is nobody to play with you, don't panic we have an open source version of “Bulls” and “Cows” called 4 digits.
The game's objective is to guess a four-digit number in 8 times using as less time as possible.

4 comments:

Ajay Balamurugadas said...

Hi Mohit,

Isn't it three cows (4, 8 and 3)?
Please help me understand.

Regards,
Ajay Balamurugadas

Mohit said...

Hi Ajay,

There is 1 bull i.e. 7 because 7 is the number present in the secret number and also has the same position as it has in secret number.

There are 2 cows only - 4 and 3. Both the numbers are present in the secret number but they are not on the right place.

As 8 is not present in the secret number, so it neither a bull nor a cow.

Santhosh Tuppad said...

@Mohit,
I did know this story ( Your childhood was better hehe ). I think I had heard about the title though. Thanks for the story.

Cheers,
Santhosh Shivanand Tuppad

Mohit said...

@Santhosh
I think you mean you didn't know this game :) But as you said you heard the title, it is because this is an ancient game and children usually plays. Might be few of your friends have played this game.