YOU know where you are with a Chris Brookmyre thriller, and most times you’re enjoyably escaping from reality. Even in journalism’s rapidly retreating golden age, for example, there never was a crime-busting investigative journalist quite like Jack Parlabane.

Yet though Brookmyre’s plots often only hang onto credibility by their fingertips, of late they have a growing ingenuity: it’s surely this – plus his usual satirical sass – that nudged Black Widow ahead of the pack to win the McIlvanney Prize for the best Scottish crime novel last year. Coming up with a plot for an engrossing murder mystery is hard enough, but the one in Black Widow worked even when turned inside out and upside down in the finale – and that takes some doing.

With Want You Gone, we’re back following Jack Parlabane, this time on the trail of a company called Synergis which is about to unveil a life-changing invention. For reasons too plot-spoiling and complicated to explain, he is doing this with the help of Sam, a 19-year-old black girl from Barking who is, he realises, “quite possibly the most dangerous person he has ever met”. She’s certainly had a lousy start in life: dad dead, druggy mum in jail, and bullied at school. The only source of love in her life comes from her 11-year-old sister Lilly, who has Down’s Syndrome. Looking after Lilly with next to no money is hard enough, yet Sam is further ground down by the DSS and a McJob. And that’s even before local thugs break in and cart off the family telly and computer.

Yet that’s IRL: in real life. Online, as a hacker, Sam is virtually unstoppable. And she’ll need to be, because even teamed up with Parlabane, the Synergis HQ positively bristles with security. “Like doom, with a postcode” is his verdict after an initial recon.

Crime writers unsure about how to handle hacking might well leave it at that, with an unlikely couple yoked together on a Mission Impossible-type heist. But Brookmyre knows his way round cyberspace (how many other novelists have developed their own computer game?) and it shows. There’s an airy confidence about his cyber-plotting, and by the time Sam and Parlabane tackle Synergis, we have already been treated to a convincing demonstration of just what mischief hackers can get up to when they put their minds to it. In the opening pages, a bank’s website is hacked in order to highlight its corporate greed. This is such a well-worked sting that many novelists might have made it the main course; here it’s merely the hors d’oeuvres.

Throughout Want You Gone, Brookmyre explains the hackers’ dark arts in terms that even the non-geeks among us can understand. It’s frightening stuff. Before reading this, for example, I’d have put money on bank security officials never divulging their passwords. Now I’m not so sure. And if you think you’re immune from such trickery, ask yourself the last time you saw that thread on Facebook in which friends ask each other for their “pornstar name” – a combination of the name of your favourite pet and your mother’s maiden name. And guess what are the two most common default security questions you’re ever going to be asked? Not so funny now, is it? But even while explaining hacker techniques – like, for example, how to get round 2FA by spearphishing (using targeted phone calls to bypass two-factor password authentification) – Brookmyre never makes it sound like bolted-on research. It’s all firmly part of his plot. just as is the hackers’ essential disconnectedness from real life. The whole point of what they do – those for whom it’s not all about money – is its intellectual excitement. Yet what in cyberspace might seem like a game could have very bloody consequences indeed in real life … You can get an idea of Brookmyre’s skill as a plotter not from the impossible mission at its core, but from the fact that he has made sure that Sam and Parlabane are, for different reasons, working on it against their will. And it’s not just a heist but – well, here the spoiler alert curtain does have to come down, so let me put it another way.

The best plots are those that wriggle and squirm so much that they escape from you. They slither off and you try to recapture them. You guess where they’re going because you’ve read something like them before. Well, that certainly didn’t happen with Black Widow, and I’ll be surprised if you find it happens here.