Skip to main content

Software development is in the Doldrums


"Don't get off the boat."

"Seriously, never get off the boat," The instructor said, leaning forward and looking at each of us in turn.

"But surely if it's sinking..." We reply, somewhat confused and slightly incredulous. We've seen Titanic, we think to ourselves, we know how this sea survival stuff works...

"OK" He concedes, If things get really bad, "Get on the life raft if you can step-up from the boat to the life raft".

"But, But... the yacht is like 37ft long, Do we want to wait until that whole boat is lower than the life-raft? When less than 1ft of the yacht is above the surface? Meanwhile all the time the life raft is just there... floating happily alongside."

"Pretty much, yes," he said nodding.

Image result for apocalypse now never get outta the boat
The movie Apocalypse Now speaks the truth.

That was about 15 years ago. Not much has changed since. The reasons are manifold. Firstly, the yacht is a decent shelter. The thin plastic of a legal minimum life-raft isn't going to protect you from the debris and bad weather the sea can throw at you.

The sail-yacht costs hundreds of thousands of pounds, it has layers of redundancy and a spare everything. The life raft is a legally mandated glorified inflatable bag. Take your choice.

When the boatyard builds a yacht, it's not like they are developing an app. For example, there are very few single points of failure on a sail-yacht. And for an experienced sailor, a workaround can usually be found to the few that do exist. A sailor can usually test using those same workarounds/hooks to see what is actually broken.

For example, has the engine failed? Put up the mainsail while you investigate. Has the mainsail torn? Use the Genoa etc.

Batteries flat? No worries the engine should start, that has a separate battery. Run the engine, and that should charge all the batteries.

Helm not working? Control the rudder directly from the emergency tiller/winch handle. If that doesn't work maybe you've managed to break the rudder itself, you can deploy a drogue and use that to direct you. ( A drogue is a sort of cross between a bucket and a net that will add drag to the side of the boat it's placed on.)

On a recent sailing holiday, the first after a few years, I noticed this robustness once again. I also saw the places where the usual robustness was absent.  The areas where there is no redundancy and a reasonable chance of failure tend to be those added in the last couple of decades.

The GPS/Chart plotter for example. When you start to sail, you learn the old-fashioned way. No GPS, just charts, hand-bearing compass etc. I remember uttering more than a few remarks about how the communists seem to have won the cold war, at least in the arena of sailing navigation.

Me teaching the crew to second guess the machines.

But I was wrong. You need to use the old methods even when you have a GPS Chart plotter installed an running. Why? Because chart plotters are like much of software we use today. That is, they are a bit rubbish and are not geared to work in a way that makes your life much easier.

As you've probably already noticed, they are a single point of failure.  Chart plotters are a dependent system, requiring the battery to have juice before they work at all.  They are also prone to inaccuracy. For example, the GPS may assign you coordinates quite a way from where you are. Take a look at this plot:

That plot was off by several hundred yards.

I was on the same (East) side of the island on both occasions, but that's not what the plotter had decided. Imagine [foolishly] relying on that at night.

GPS Co-ordinates can be inaccurate. And this inaccuracy can be estimated by the device. But does the display indicate this? Nope, a handy circle indicating possible location range is not displayed.

What's the backup plan? Its either have your own handheld GPS (I do) or revert to tried and tested nautical navigation techniques (I also do). There's not much to jury-rig on a marine GPS system.

Modern software isn't rigged to allow things to be tested, modified or fixed. I can check the fuel, oil and coolant levels on the diesel engine before departure. I can check for oil leaks or a failure in the sea-water cooling. For the chart plotter, even after over 20 years in the software development business, I've had to resort to rebooting the GPS chart plotter repeatedly until it works.

With Investigating Software, I help make complicated systems easier and cheaper to build, test and deploy. Adding testability in from the start can dramatically reduce the cost of all forms of testing and fixing, be they highly automated or manually intensive. We can make better software, quickly and more cheaply if we use the techniques good mariners have used for hundreds of years.

Comments

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…