Friday, June 06, 2008

What is a bug ... A new meaning ...

Let me give a try to this one-liner ...(short post)

"A software bug is a reflection of the mind of a confused human user"

Analyse this statement .....

[Some updates]
Above one-liner proposed by me, seem to have generated interest in some ... Let me clarify further ....
This one liner of mine is a beginning of an effort to understand human thinking process while he/she sees a bug. A human goes through a series of emotions while dealing with a software bug. A dominant emotion among these is "confusion" - state of perplexity, chaos, uncertainty.
Let us say you are running a test, observing what is happening and doing a quick comparison with what were expecting ... Suddenly something "unexpected" happens, your mind starts remodelling all that is happening, you were expecting "x" to happen, where as you are seeing "a", "b" and "c" are happening - that is contradicting your model .... your heart beat goes up, blood pressure goes up ... lots of physiological changes happen ... your brain tries to stabilize, create a new model on the fly, comprehend a things on the ground and after a while, you calm down and begin to put up an explanation of what is happening and why? A bug report comes out at the end ....

So Bhargavi --- the life cycle of a bug begins with a "confused" mind of a tester. A confusion is a mental state where you are not able to comprehend and reason to the situations and problems that you are subjected to (imagine a traffic cop at traffic jam on road, a kid on first day in a new school etc). It is the confusion that triggers the thinking in the mind of tester, tester follows the trail of the thinking and builds up a new model and finally when is mind is settled, comes up with a explanation. So when a bugs gets nailed down, mind becomes calm.

Even an obvious bug - when you look at it deeply is a result of thinking process triggered by "confusion" what is expected and what is observed. As a normal human reaction to a state of confusion, you reason out the things and make them clear - then bug becomes obvious ...
If an obvious bug is at level "0", confused state is at "-1" level. Also the "sense" of confidence is always followed by a subtle at times quick state of confusion. When try to open your car door in wrong way, open your cupboard keys in wrong position, when you are trying to open a door by pulling that opens only on "push" mode ... our mind goes through a quick state of confusion ... you quickly notice the situation and gain your calm.

It is deep cognitive process .... Psychologists will be able to explain better ... "Psychology of a BUG" ?

Shrini

7 comments:

Anonymous said...

Shrini,
Can you please explain what do you mean by "reflection" here in the definition.And why is it "confused human user"?
There might be a case where it can be "obvious" and user is confident and not confused.

Regards,
Bhargavi M

Anonymous said...

Hi Shrini.

I liked the challenge here. 'A software bug is a reflection of the mind of a confused human user'

Well to be honest it doesn’t work for me personally I’ll try to explain why.

Using the phrase ‘Software Defect’ narrows the range of the types of testing services we provide. The word “Software’ implies that is ‘Dynamic Testing’ of something that has already been coded into ‘Software’. This overlooks ‘Static Testing’ including, inspections if your organisation is that advanced to walkthroughs of Business and / or System and / or Functional / Non Functional requirements.

My next issue would be the phrase ‘reflection of the mind of a confused human’. This seems to infer that the human doesn’t know what they’re doing which is generally not the case. I think that confusion is the wrong word in context of SDLC and testing. I'd opt for the word 'Ambiguity'.

Finally, the use of the word ‘user’, in the context of SDLC user has a particular connotation associated with ‘end user’ which to my mind are part of the bug detection lifecycle, but they generally don’t have anything to do with the coding, unless perhaps it’s software for the development team?

So where does that leave us: Well I’d rewrite your definition and it would look something like this…

‘A bug is a reflection of an ambiguous human mind’

Now looking at this definition, I could be happy with this and would offer one of my own to try on for size…

To err is human, to detect divine.
Cheers
Chris

Marie Walsh said...

Shrini,
I find your post quite interesting.... alas, I now know what my problem has been for the past couple of weeks - I'm "a confused human user". Of course the software I am testing is bug-free, and the bugs that I am finding are purely due to my confusion.

I'm assuming that your post was in jest, as it makes a complete mockery out of testing if not.

-- Marie - "the confused human user" aka "Tester"

Shrini Kulkarni said...

@Chris,

>>>Using the phrase ‘Software Defect’ narrows the range of the types of testing services we provide.

I am approaching this from a "philosophical level" and from thinking model of a human tester. At this point of time I am not going into specifics of operations etc.

>>The word “Software’ implies that is ‘Dynamic Testing’ of something that has already been coded into ‘Software’. This overlooks ‘Static Testing’ including, inspections if your organisation is that advanced to walkthroughs of Business and / or System and / or Functional / Non Functional requirements.

Again, when it comes human thinking model about bugs - at the core it is the same .. be it static testing or dynamic testing.

>>>This seems to infer that the human doesn’t know what they’re doing which is generally not the case.

Well, that is not the inference I am trying to arrive here ... In the context of testing, when you are running tests, you begin with a mental model of how "things" should work (knowing what they are expecting) ... as you go along you observe things ... that might challenge portions of your "expected" model ... there starts the confusion. Your mind then reasons/argues the anamoly. When you settle, a new model emerges that is placed next to your earlier model. The difference between old and new model is manifestation of the bug.

>>> I'd opt for the word 'Ambiguity'.

That is more or less same as "confusion" ...I need to do bit of English dictionary search to see where is the difference between these two words ..

Ambiguity - lack of clarity
Confusion - state of "not being" able to reason and comprehend.

I am not sure if this defintion helps a tester ... but this is an attempt to capture the "thought process" and build a model of thinking during early bug discovery process..

Shrini

Anonymous said...

I was waiting for this update when I saw the post was not there the next day after the comment.Needed a little research on this update to reply.

Thanks for the thoughtful reply Shrini.
I studied that information that comes to the brain leaves a trace of it and tries to recognize it next time. My understanding of this is from Lateral Thinking by Edward de Bono and from schooldays books.

But I am not sure during this process whether there it goes under a quick state of confusion or not. Did little research on it to understand the meaning of the definition but could'nt find anything as such yet.

It is true that we may get confused at times when we have to think whether it is a bug or not.

Regards,
Bhargavi M

Anonymous said...

I do not subsrcribe to your defintion of a bug

A bug is an error, flaw, mistake, failure, or fault in a computer program that prevents it from working correctly or produces an incorrect result. Bugs arise from mistakes and errors, made by people, in either a program's source code or its design. ...

Shrini Kulkarni said...

Hi Gaurav,

>>> I do not subscribe to your definition of a bug

First of all, I think this is not a definition of a bug in strict sense - meaning to be used in a formal sense. My intention to "paint" or describe bug as reflection (indication) of a confused human user is to bring out the cognitive elements that come into play when a user sees something that appears to be a bug.
This representation (not a definition) is meant for driving home the point that most of the time "what is a bug" and what is not is not very apparent.

>>> A bug is an error, flaw, mistake, failure, or fault in a computer program that prevents it from working correctly or produces an incorrect result.

This definition is too complex for me and is FULL of words that further could be defined and one can write pages about how one can see them. What is "correct" here and what is "incorrect"? Who is saying? to whom? Can the world be described in such narrow binary (0 or 1) concepts? what is the meaning of "working"?

>>> Bugs arise from mistakes and errors, made by people, in either a program's source code or its design. ..

Yes ....mistakes ... made by people. When people make mistakes .. when they are careless, when do know what to do, when they are confused and so on .... I think your are talking about programmers here who write the code (make that mistake in the first place).

Mind of confused user (whether developer or tester) is perfect ground for mistakes or bugs.

Most important point here ...Software Bugs are not very clearly identifiable physical entities.

Shrini