Testing & Software Blog

The occasional thoughts of a freelance software tester, drawn from experience across the software development life-cycle.

Swiss Cheese at Plymouth

On the third of April there was a low-speed collision between two passenger trains at Plymouth station. A local train from Cornwall ran into the back of a stationary London-bound express. Though nobody was killed, thirty-five people were injured, a couple of them seriously.

The preliminary report makes it sound like an archetypal “Swiss cheese” incident.

If you imagine safety represented by several layered slices of Emmental cheese; each hole in the cheese represent an opportunity for human error to creep in, but an accident can only get through when all the holes line up. The more layers of safety the better.

This was what seems to have happened at Plymouth.

The normal pattern of operation was disrupted due to scheduled maintenance on the lifts, causing trains to be diverted away from their regular platforms. The signaller wrongly estimated the amount of space in the platform behind the express, and thought the local train would fit in behind it. The driver of the local train wasn’t expecting the platform to be part-occupied by another train. And because the approach at the western end of the station is on a very sharp curve, the driver didn’t realise the express was on the same track until it was too late to stop.

Posted in Testing & Software, Travel & Transport | Tagged | 2 Comments

The Trolling of Tay

TayThe story in brief: Microsoft created a self-learning chatbot designed to emulate the speech of Millenials. They let her loose on Twitter, where she immediately got trolled hard by members of one of the most notorious boards of 4chan, and she turned into a massive Hitler-quoting racist. Microsoft took the bot down, and are working hard to remove the worst of her tweets. Oops.

Aside from obvious conclusion that there are some awful people on 4chan, what can the testing community learn from this?

One seems to be that if you carry out testing in a very public space, any testing failures will be very public as well. An artificial intelligence turning into a noxious racist is a pretty spectacular fail in anyone’s books. Given the well-known nature of the bottom half of Twitter, it’s also an all-too-predictable failure; people in my own Twitter feed express very little surprise over what happened. It’s not as if anyone is unaware of the trolls of 4chan and the sorts of things they do.

What they should have done is another question. Tay was a self-learning algorithm that merely repeated the things she’d been told, without any understanding of their social contexts or emotional meanings. She’s like a parrot that overhears too much swearing. It meant that if she fell in with bad company at the start, she’d inevitably go bad.

The most important lesson, perhaps, is that both software designers and testers need to consider evil. Not to be evil, of course, but to think of what evil might do, and how it might be stopped.

Posted in Testing & Software | Tagged , | 7 Comments

Testing Blog Links

I haven’t blogged that much about testing of late, so here are a couple of recent links from the testing blogosphere that are well worth a read.

First, in response to some rather heated discussion on Twitter, a post from last year by Adam Knight in defence of the principle of hiring for cultural fit. It’s a concept that comes in for a lot of justified criticism, going from rejection of well-qualified candidates for superficial reasons that have nothing to do with their ability to do the job, to the much more serious concern over bias in terms of gender and ethnicity. Adam Knight recognises those concerns, but stresses that cultural fit should be about soft skills and style of working, not stereotypes.

Second, the always excellent  Mike Talks writes about blogging itself and asks “Are you your own Mary Sue?“. He users the example from the world of music; the famous Köln concert by jazz pianist Keith Jarrett, and imagines the story of the circumstances leading up to the performance from the different perspectives of Jarrett humself, and concert organiser Vera Brandes.

Posted in Testing & Software | Tagged , , | Comments Off

In defence of NULL

There was a blog post a while ago that declared that NULL was the worst ever mistake in history of computer science. The fact that nulls existed meant that code always has to be written to handle them, otherwise programmes would crash with Null Pointer Exceptions or their Windows equivalent Object Reference Not Set To An Instance Of This Object. Life would be easier and less error-prone if there was no such thing as NULL.

It may have a point when it comes to object-orientated programming languages, but when comes to databases, the suggestion that the concept of NULL is a dangerous bad idea is nonsense. The fact that some common beginners’ mistakes involve a lack of understanding over how to use NULL does not change this.

NULL has meaning.

Precisely what it means is dependent on the context, but it still has meaning. Consider an End Date. What does it mean if you have no End Date? It means, perhaps, that you are still employed, or maybe even still alive. Defaulting to some arbitrary date far, far into the future in this context is nothing but an ugly kludge. You still have to write code to handle that value, and you’ve probably got a greater potential for error than if you’d just used NULL.

NULL has meaning.

Another example. Imagine a stock control system. Each stock item has a re-order level. When the stock level reaches this point it will trigger an automated re-order process.

Now imagine there are some stock items where you want to keep track of how many you purchase and use, but you don’t want to hold them in stock; perhaps the value is high and lead time is low, and you don’t use them frequently enough to want that much capital tied up in inventory. You will only raise purchase orders manually when you know you’re going to need the thing.

So most of the time the stock level is going to be zero. But you don’t want that automated re-order process to touch it. What value do you give the re-order level?

Now, you could set it to -1, and one stock control system I know did precisely that. But that’s still a kludge, and there are scenarios that will break it.

What if the stock transactions are transmitted via a mobile network that’s not 100% reliable, which means they’re not guaranteed to be real-time and may be received out of sequence? Again, I know a system that works like this. For one thing you can’t enforce a database constraint that makes sure the stock quantity never goes negative. It’s possible that you might end up with a stock level of -1 for a short period because a receipt transaction has been delayed by an electronic sargasso. Then there’s a window in which that pesky re-order process could turn up and do mischief.

If you’d just let the re-order level be NULL for those items you only want to re-order manually, you would not have that potential bug.

This is why we have NULL.

Posted in Testing & Software | Tagged | 5 Comments

Why We Test

In the second weekend of December 1988, there was engineering work taking place on the busy main line out of London Waterloo, part of a resignalling project. A mistake was made; a redundant section of wiring was left in place without being properly disconnected or isolated.

Because of this rogue piece of wire, a signal showed green when it should have showed red, at the height of the Monday morning rush hour. A packed commuter train ran past this wrongly-green signal and collided at speed with the train in front. The Clapham Junction rail crash killed 35 people and injured nearly 500.

This is why we test.

This shouldn’t need to be said. But there are still people out there who really ought to know better who insist, despite all evidence, that testing is not a worthwile activity.

Posted in Testing & Software | Comments Off

In a lacerating blog post, Troy Hunt asks how are websites still screwing up these user experiences?!. Almost all these horrors are related to monetising the sites; examples of how websites are locked into a zero-sum game with each other and end up in a race to the bottom.

Posted on by Tim Hall | Comments Off

Now we’re into Panto season in Britain, I’m tempted to close off bug reports for bugs that have been fixed and successfully re-tested with the words “Oh no it doesn’t”.

Posted on by Tim Hall | 3 Comments

Noel Gallagher, The Gift That Keeps On Giving

So Noel Gallagher has a new interview out. His interviews are always far more entertaining than his records nowadays, and this one sees him try and pick a fight with One Direction fandom, amongst others.

But this quote takes the biscuit (I’ve left the swears in)

I was being asked about a reunion five weeks after I left the band. It’s a modern phenomenon. It’s a modern disease. All the bands that get back together, all those ones you’ve mentioned [Fleetwood Mac, Led Zeppelin] they didn’t have anybody in the line-up as fucking brilliant as me. What’s the guitarist out of Fleetwood Mac called? Lindsay Buckingham. I can’t remember him setting the world on fire. Jimmy Page? That’s debatable. He’s a good guitarist but I’m not sure how many solo albums he’s fucking made.

Oh dear, oh dear.

The software development industry, or rather the software development recruitment industry, often talks about “Rock star developers”. I have always found the concept utterly ridiculous, and the above quote goes a long way towards demonstratng why. In today’s world, the concept of “Rock Star” is far more about swaggering ego than it is about actual skill.

As a guitar player, Noel Gallagher is at best a mediocre talent who is not fit to tie the shoelaces of Jimmy Page or Lindsay Buckingham. If you read some listicle of supposedly great guitarists and see his name there, it’s as much proof that the list is a load of cobblers as the absence of Tony Iommi or Nile Rogers. And as a songwriter his work is so derivative and backward-looking that if he was a programmer he’s be writing in COBOL.

There was a day when “Rock Stars” represented the top talent of their profession. The larger-than-life personality was part of the package, but the talent had to be there. But the days of Freddy Mercury and Jimi Hendrix had long gone by the time Oasis arrived on the scene, and the worlds of creative artists and media celebrities have gone their seperate ways.

Anyone who talks about “Rock star programmers” is living in the 1970s.

Posted in Music Opinion, Testing & Software | Tagged , | 3 Comments

Web Advertising is Eating Itself

How often does this happen?

  • You click on a link that appears in one of your social media feeds.
  • You begin reading the article
  • Suddenly the screen darkens and and an unskippable video ad pops up, often with audio.
  • You close the browser tab without reading the rest of the article.

The web did not used to be like this. There used to be a time when not every online newspaper article had “sponsored links” to bottom-feeding clickbait garbage about celebrities who have aged badly or the sorts of barely-legal get-rich-quick scams that you only used to see in email spam.

It’s a classic tragedy of the commons situation. Now that internet usage in the developed world has plateaued, web advertisers are locked into a zero-sum game with each other for finite amount of web users’ attention. Making your own advertising more and more intrusive gains a temporary advantage, but it only leads to a race to the bottom in which everyone else is the loser.

It’s also the reason why a thousand-word article sometimes results in a browser-crashing multi-megabyte web page, bloated with third-party cruft whose only purpose is to serve ads that the reader doesn’t actually want.

The whole ecosystem is clearly unsustainable, and the way more and more people are being forced to install ad-blockers just to make the web usable highlights this. There has to be a better way.

So, once web advertising has finally eaten itself, what alternative economic models might replace it?

Posted in Testing & Software | 3 Comments

The Wootton Bassett near-miss

Battle of Britain Pacifit "Tangmere"(Wikimedia Commons)

The official report into the near-miss at Wootton Bassett (pdf) makes interesting reading, and demonstrates what I’ve often said about rail and air accident reports making useful reading for software testers.

In this case there were no injuries or indeed any damage to the train, although it could have been a very major accident; a collision at high speed with one train formed of 1950s-design rolling stock that doesn’t have the crashworthiness of modern trains.

The immediate cause of the incident was blatant disregard of rules and procedures which rightly raised questions about the levels of training and safety culture, so it wasn’t really a surprise that the operator’s licence was suspended.

Aside from the chain of events that led to the train overrunning a red signal, what makes it a worthwhile read is the details of how modern automated safety systems interface with literal steam-age techology in the shape of a 70-year old steam locomotive. It also highlights some user interface issues with the controls within the locomotive cab.

Posted in Testing & Software, Travel & Transport | Tagged | Comments Off