Skip to main content

Scatter guns and muskets.


Many, Many years ago I worked at a startup called Lastminute.com (a European online travel company, back when a travel company didn't have to be online). For a while, I worked in what would now be described as a 'DevOps' team. A group of technical people with both programming and operational skills.

I was in a hybrid development/operations role, where I spent my time investigating and remedying production issues using my development, investigative and still nascent testing skills. It was a hectic job working long hours away from home. Finding myself overloaded with work, I quickly learned to be a little ruthless with my time when trying to figure out what was broken and what needed to be fixed.

One skill I picked up, was being able to distinguish whether I was researching a bug or trying to find a new bug. When researching, I would be changing one thing or removing something (etc) and seeing if that made the issue better or worse. When looking for bugs, I'd be casting the net wide, trying to catch as many issues as I could.

Nowadays, as a full-time tester, I use both skills every day. When I think I've uncovered a curious result or behaviour I switch to investigating mode to zoom in on prevalence, scope and causes etc. A good programmer will also usually have very good investigative skills which they put into practice when debugging and researching anomalies. 

Some people attempt to formalise what we (programmers, testers etc) do, by copying what people appear to be doing and putting that into a script. For example, some teams often take the 'change/try one thing' approach from research & investigation and try to use that -alone- for testing. They use a (BDD, Excel, Notepad etc) script that checks a calculation by calling the feature with example parameters, and checking the answer is correct. Great, Job done, green tick, the feature works, move on. (Ok, maybe not.)

Step 1: How might we improve on that?

That might be useful. But for just a couple more lines of code (basically just a for loop) you could check 100,000 parameters. This scattergun of data is much more likely to catch a bug. Why? Well, for example, there are usually rounding issues, hidden boundaries etc. From my experience there usually are issues, that won't come to light with just a token couple of example musket shots through the logic.

Picture of a Flintlock Musket called Brown Bess
Bess fired a lead bullet 1.9 cm in diameter, but could only fire every 20 seconds.

Step 2: Change of approach

We can use these same techniques and tools when testing in real time. We don't need to have a fully automated solution straight away. This gives us the ability to also find these issues up front, as we test. This isn't so much a technology change but rather, a change of mindset.

We can stop thinking of 'the tests' as being an immovable, unchangeable detector of 'goodness' (or not bad-ness for things we have checked) and instead think of them as a handy tool that I can grab anytime I need to dig deeper, get a clearer picture of whats going on. The 'tests' become something you use, a toolset, rather than something you build.

You will soon find your code is more generalised, more configurable and helps you find bugs - quicker.

Comments

Popular posts from this blog

What possible use could Gen AI be to me? (Part 1)

There’s a great scene in the Simpsons where the Monorail salesman comes to town and everyone (except Lisa of course) is quickly entranced by Monorail fever… He has an answer for every question and guess what? The Monorail will solve all the problems… somehow. The hype around Generative AI can seem a bit like that, and like Monorail-guy the sales-guy’s assure you Gen AI will solve all your problems - but can be pretty vague on the “how” part of the answer. So I’m going to provide a few short guides into how Generative (& other forms of AI) Artificial Intelligence can help you and your team. I’ll pitch the technical level differently for each one, and we’ll start with something fairly not technical: Custom Chatbots. ChatBots these days have evolved from the crude web sales tools of ten years ago, designed to hoover up leads for the sales team. They can now provide informative answers to questions based on documents or websites. If we take the most famous: Chat GPT 4. If we ignore the

Can Gen-AI understand Payments?

When it comes to rolling out updates to large complex banking systems, things can get messy quickly. Of course, the holy grail is to have each subsystem work well independently and to do some form of Pact or contract testing – reducing the complex and painful integration work. But nonetheless – at some point you are going to need to see if the dog and the pony can do their show together – and its generally better to do that in a way that doesn’t make millions of pounds of transactions fail – in a highly public manner, in production.  (This post is based on my recent lightning talk at  PyData London ) For the last few years, I’ve worked in the world of high value, real time and cross border payments, And one of the sticking points in bank [software] integration is message generation. A lot of time is spent dreaming up and creating those messages, then maintaining what you have just built. The world of payments runs on messages, these days they are often XML messages – and they can be pa

Is your ChatBot actually using your data?

 In 316 AD Emperor Constantine issued a new coin,  there's nothing too unique about that in itself. But this coin is significant due to its pagan/roman religious symbols. Why is this odd? Constantine had converted himself, and probably with little consultation -  his empire to Christianity, years before. Yet the coin shows the emperor and the (pagan) sun god Sol.  Looks Legit! While this seems out of place, to us (1700 years later), it's not entirely surprising. Constantine and his people had followed different, older gods for centuries. The people would have been raised and taught the old pagan stories, and when presented with a new narrative it's not surprising they borrowed from and felt comfortable with both. I've seen much the same behaviour with Large Language Models (LLMs) like ChatGPT. You can provide them with fresh new data, from your own documents, but what's to stop it from listening to its old training instead?  You could spend a lot of time collating,