House style

Hands off the keyboard: it's in crash

Top three mobile application threats

Stob I'm not usually a great one for American TV comedy, the cartoons excepted. But recently I came upon a wonderful thing called House, featuring Hugh Laurie as the eponymous hero, a consultant at a New Jersey hospital. Laurie is an effective counter to that arch-enemy of all American hospdrams, Doctor Mawk.

The first pleasure to catch the ear is that Laurie uses exactly the same accent as when he and S Fry used to appear on Saturday Night Live as American sales executives, contriving to include lots of words that sound comic in a macho US growl, eg 'furdle' (fertile).

But House is much more than saying 'tooma' every episode, splendid though this is. Laurie enriches his character with a gaggle of hilarious affectations. He indulges in casual and gratuitous rudeness to his patients, fiddles with a Gameboy while he is supposed to be a-diagnosing, and persistently pops painkillers for a fake limp.

So far, so NHS. However, House's hospital is run on different lines from your local Royal Squeamish. Cases come into the building one at a time, serially, and all the doctors devote all their time to the cure of this single beneficiary. Most of the care is administered by a trio of dimbulb Dr Watson-style sidekicks over whom House insolently sherlocks (presumably there are also some nurses at this hospital to feed the patients, wipe up the poo and blood and so on, but we never see them).

Then there's diagnosis. It turns out that the familiar procedure with stethoscope, squeezy blood pressure thing and intrusive cold fingers is quite redundant. Even MRI scans are of but marginal use, a pity because they seem to have two MRI scanners in every lavatory. No, House knows that the only way to get a real diagnosis is to burgle the patient's house looking for clues. Never mind the X-ray; get an eyeful of that ghastly retro CD collection.

Anyway - arriving finally at the point - I wondered if House's unusual approach to diagnosis could be transferred to the art of software debugging. At least for the purpose of TV drama. Here's my script for the pilot.

Pre title sequence: Woman seated at a computer, clicking at it insincerely with her mouse. Doomy incidental music. Suddenly, she gasps and leans back.

Woman: Omigod!

Camera zooms in through screen - where we glimpse a crash dialog - dramatically descending to micron level in Fantastic Voyage style until we arrive at the ESI register, still containing its recently dereferenced zero address (quite how this will be visualised in an exciting way, I leave to the special effects department. Must I do everything round here?).

Crash in title sequence with spooky title music, properly arranged by Delia Derbyshire. The BBC National Orchestra of Wales can stand down, thanks.

Scene: office of a senior programmer, with big desk, whiteboard etc, but no PC.

Me (natch, allocating myself the plum role of grumpy genius): So, what have we got, people? Differential diagnosis!

Girly-girl sidekick with local monopoly on emotion: Well, we know that the MSI installation went in cleanly, so it can't be DLL Hell...

Me: Mmm, this is good news. I feel as secure as a Java module checked into a SourceSafe suppository.

Ggswlmoe, naively: Surely you mean repository Ms Stob?

Me, writing on whiteboard:

inadm db isibil

SAAB jet Alt. texture austrian tomcruisecontrol

hairpiece carnival memento

Neighbours escapee cursed with floppy hair, baffled: Is this part of the differential diagnosis?

Me: No. I supplement my meagre income by generating 'white noise' text to help spam messages skip those pesky Bayesian filters. Pays 5p per million words. It's hard work, but artistically satisfying. What the spammers can't use, Douglas Coupland buys to put in his next novel.

Necwfh: Do you think it could be a DLL problem?

Black sidekick improbably even thicker than the other two and pompous with it: The error message does imply some sort of dynamic linkage.

Me, gravely: Error messages always lie.

Necwfh: So what shall we do?

Me: Double the RAM, update the virus checker, scan the string tables, log the exceptions and put it on a sampling profiler.

Bsietttotapwi: How will this help isolate the problem?

Me: It won't, you moron. We've got 45 minutes to fill. It would be fatal to make a correct diagnosis this early in the episode. And while you're up, go have a look round the original programmer's auntie's holiday cottage in Cornwall. I've a feeling we may discover an Important Clue there. Take Necwfh with you.

Bsietttotapwi: Necwfh?

Me: Spot of breaking and entering might put some bristle in his hair.

(Exeunt omnes, as I'm sure they are always writing in TV scripts)

(Intermission: Me, doing 'thinking' acting. Playing with cane, rubbing forehead, throwing and catching ball, watching soaps on a miniature TV, leafing through pages and pages of printed memory dumps, playing the piano. After a minute or so of this, I am discovered back in my office, making up more spam filler on the whiteboard. My pager goes off.)

Me, reading my pager message out loud for the purpose of exposition rather than dramatic realism: I see that I am wanted immediately in the walk-in tech support clinic.

(I hobble out of the office, accidentally switching the limp to the other leg.)

(Scene: the walk-in tech support clinic.)

Lady in charge of clinic, to me: Booth four. A Delphi programmer.

Female Delphi punter: I don't know, it's like the compiler has gone mad this last week. I assign values to variables, but they don't 'stick'.

Me: Let me see you hands. Aha! Just as I thought. A touch of RSI in both wrists.

Fdp: Wha...?

Me: The pain in your hands made you decide to save typing by putting in with statements. Take them out, and suddenly your assignments will start working again, just like magic. Next.

Another punter: Ms Stob, we have this mature C++ program that's suddenly started AV-ing. But it only does occasionally - say once in a day's running. The AV seems to move around and the log doesn't show...

Me: You moved the database update to a background thread recently?

Ap: Yes, but...

Me: And you're red/green colour-blind I see. Just put a critical section around the singleton that owns the memory lookup. Or even better, do without the singleton.

Ap: How did you know...

Me: …you were colour blind? Wearing that shirt with those trousers?

Ap: No, I meant about the singlet...

(Enter Ggswlmoe, accompanied by the colleague who looks like a sheep - a non-speaking role in this episode.)

Ggswlmoe, excitedly interrupting: Ms Stob, you've got to come quickly. That application we have in ICU - it's flat-lining!

(Ggswlmoe and I depart.)

Ap: What is she on?

Lady in charge of clinic: About two pints of gin a day.

Ap: Eh?

Licoc: She says it helps her cope with slow C# applications.

Ap: But surely...

Licoc: I know. With anybody else I would be worried. The alleged sluggishness of managed apps is a false and malicious myth put about by those who for reasons of prejudice fail to recognise the technical superiority of the Microsoft design. But Stob is the best damn programmer we have.

Ap, coyly: Please can I be the best damn punter you have?

Licoc: No.

(Scene: the intensive care room. Various alarms are going off. Bsietttotapwi and Necwfh are staring at a CPU usage trend, which is stuck at 100 per cent. Enter Ggswlmoe and I, at a run.)

Bsietttotapwi: It's been like this for six minutes. I think it's fitting!

Me: Au contraire. I'd say it's actually rather inappropriate.

(This pun is greeted with a ghastly silence.)

Me, to camera: Did you see what I did there? ®

Top three mobile application threats

More from The Register

next story
Android engineer: We DIDN'T copy Apple OR follow Samsung's orders
Veep testifies for Samsung during Apple patent trial
This time it's 'Personal': new Office 365 sub covers just two devices
Redmond also brings Office into Google's back yard
Batten down the hatches, Ubuntu 14.04 LTS due in TWO DAYS
Admins dab straining server brows in advance of Trusty Tahr's long-term support landing
Microsoft lobs pre-release Windows Phone 8.1 at devs who dare
App makers can load it before anyone else, but if they do they're stuck with it
Half of Twitter's 'active users' are SILENT STALKERS
Nearly 50% have NEVER tweeted a word
Windows XP still has 27 per cent market share on its deathbed
Windows 7 making some gains on XP Death Day
Internet-of-stuff startup dumps NoSQL for ... SQL?
NoSQL taste great at first but lacks proper nutrients, says startup cloud whiz
Windows 8.1, which you probably haven't upgraded to yet, ALREADY OBSOLETE
Pre-Update versions of new Windows version will no longer support patches
Microsoft TIER SMEAR changes app prices whether devs ask or not
Some go up, some go down, Redmond goes silent
Red Hat to ship RHEL 7 release candidate with a taste of container tech
Grab 'near-final' version of next Enterprise Linux next week
prev story


Designing a defence for mobile apps
In this whitepaper learn the various considerations for defending mobile applications; from the mobile application architecture itself to the myriad testing technologies needed to properly assess mobile applications risk.
3 Big data security analytics techniques
Applying these Big Data security analytics techniques can help you make your business safer by detecting attacks early, before significant damage is done.
Five 3D headsets to be won!
We were so impressed by the Durovis Dive headset we’ve asked the company to give some away to Reg readers.
The benefits of software based PBX
Why you should break free from your proprietary PBX and how to leverage your existing server hardware.
Securing web applications made simple and scalable
In this whitepaper learn how automated security testing can provide a simple and scalable way to protect your web applications.