Skip to main content

Fishing for bugs.

You probably don't know, but I'm keen on fishing (Honest! Ok, maybe not, but bare with me...) I spend my free time, by the river bank or out on the sea searching for 'the big one'. The big catch that'll stand as tall as me, and feed my family for a week. My dream is to be the guy standing next to his prize-fish on that black and white picture behind the bar.

Over the years, I've become reasonably skilled. I usually find a fish or two when ever I'm out on the imaginary water. I've learned where they live, where they spawn, and of course where's best to catch them. For example, There's a little bend in the river upstream from my home, that has some great fishing spots. The overhanging rocks protect small fish from the predatory eyes of birds, and people. Of course where there's small fish, there's usually the odd big fish or two.

Ok, lets imagine that fishing had a profitable side too, and wasn't just a [fictitious] hobby. For example, People would hire me to help remove fish from their lakes. It seems that certain large predatory fish can be quite a nuisance, and land owners are often keen to get rid of them. Take last year for example, I was up in Scotland fishing for Pike on the request of a local land owner. The land owner had become nervous after hearing reports of the 6ft man eating Pike, and hoped to avoid any nasty fish related incidents on his estate.

Monday, the first day of my holiday - I set out onto the lake, in my small rib boat: "John Frum". After a hour or so I caught my first Pike. I also found a few smaller fish, but these were not really what I was looking for. But again, my experience reminded me that small fish, might mean big fish are also lurking down in the depths of the lake.

Each day I ventured out onto the lake and each day I found at least one big fish, and somedays two. By the end of the week, the land owner was pretty impressed with my exploits. He was happy that I'd found the fish, and seemed reassured that something had been done about the fish problem. I was happy in my role as 'fisherman' and it felt good to be helping people out.

But then something confusing happened, I found I was suddenly out of work. I was going to have to find another place to [make up stories about] fish for a living. The landowner had decided that he didn't need any more fishing done on the lake, and anyway he'd decided to open the lake to holiday makers the next day. I mentioned the problem with 'man eating pike' and how sometimes they didn't distinguish between who or what they were eating and how this could harm business. But to my surprise he replied "You spent all week fishing the lake, each day you caught a pike and on Thursday and Friday you caught 2 each day".

"Thats my point!" I replied, "aren't you worried?"

"How could I be worried? The fish are all gone, you found them all!"

As you can see, The land owner and I had different interpretations of the same results. I, the tester-turned-fisherman visualises a massive test space of 'lake'. A lake so vast that my puny rod and line only manage to catch fish after extensive practice and hours of work. I see my work as a sample, albeit an intelligent sample that helps find things other 'anglers' have missed. But I don't ever claim to have fished the entire lake clear. In fact the more I find, the more evidence I have of a problem, not less.

The landowner, see's the results differently. He's motivated to open to the public. A confirmation bias is helping him to interpret the results in a positive light. In his view, there are a finite number of problems, and we have removed some of those or at least we know where they live and what they are. The unknown issues, that we might expect given our sample's results, are less visible to him, because of the bias to interpret the results as desired, that is as 'good news'.

Comments

Post a Comment

Popular posts from this blog

The gamification of Software Testing

A while back, I sat in on a planning meeting. Many planning meetings slide awkwardly into a sort of ad-hoc technical analysis discussion, and this was no exception. With a little prompting, the team started to draw up what they wanted to build on a whiteboard.

The picture spoke its thousand words, and I could feel that the team now understood what needed to be done. The right questions were being asked, and initial development guesstimates were approaching common sense levels.

The discussion came around to testing, skipping over how they might test the feature, the team focused immediately on how long testing would take.

When probed as to how the testing would be performed? How we might find out what the team did wrong? Confused faces stared back at me. During our ensuing chat, I realised that they had been using BDD scenarios [only] as a metric of what testing needs to be done and when they are ready to ship. (Now I knew why I was hired to help)



There is nothing wrong with checking t…

A h̶i̶t̶c̶h̶h̶i̶k̶e̶r̶'s̶ software tester's guide to randomised testing - Part 1

Mostly Harmless, I've talked and written about randomisation as a technique in software testing several times over the last few years. It's great to see people's eyes light up when they grok the concept and its potential. 
The idea that they can create random test data on the fly and pour this into the app step back and see what happens is exciting to people looking to find new blockers on their apps path to reliability.
But it's not long before a cloud appears in their sunny demeanour and they start to conceive of the possible pitfalls. Here are a few tips on how to avert the common apparent blockers. (Part 1) Problem: I've created loads of random numbers as input data, but how will I know the answer the software returns, is correct? - Do I have to re-implement the whole app logic in my test code?
Do you remember going to the fun-fair as a kid? Or maybe you recall taking your kids now as an adult? If so then you no doubt are familiar with the height restriction -…

How did you find that bug? Are we sitting comfortably, then I'll begin.

How did you find that bug? - They asked with a sort of puzzled "he dun't thunk like uz" look on their faces. An expression that suggested they were unsure whether to commend the discovery or gather their pitchforks and organise a well overdue witch burning.

Likewise, I now knew why they needed me. The team members were genuinely hard working people trying to build something new and exciting. But they lacked one thing, someone exploring & asking questions - trying to find out new things about their application. Exploring is literally a step into the unknown, and that can be uncomfortable for those not experienced in how to do it well.
So how did I find that bug? It's easy to tell a story of how I tried that particular input value because... Paragraph 3 of v4.6 of the requirements document stated that the user shall indeed on occasion X given input Y in Chrome v62 do... Or spout some other overly verbose explanation of why that broken 'scenario' came to be…