Thursday, 29 September 2016

Alarming logic

I am faced with a small but satisfying logical puzzle in my office at Bristol University. When I come in first thing (actually, even if I come in about 10), the alarm is often set. In fact, the first time I ever entered the building the blasted thing started beeping at me, and no one had bothered to tell me there was an alarm. So now, as I belatedly know the code, I unset it. But the puzzle is - how and when does it get set?

I certainly never set it on leaving. I wouldn't know how to, and anyway I have no way of knowing if the building is empty. It's a tall, old house - my office is on the second floor and I can often spend the entire day here without seeing another inhabitant, though I regularly hear them. The same uncertainty must surely apply to any ordinary resident. So how is it done?

In principle it could be automated. To be safe, there would have to be motion sensors in every room, which as far as I can tell there aren't. So if it is automatic, perhaps they just assume there's no one here after, say, seven pm and set it. Pity the person trying to put some serious work in. The alternative is a security person pops in and does it. But if so, would he or she really bother to ascend the four flights of stairs to my room, night after night, when there's never anyone here? I somehow doubt it.

So it looks like it's likely to be a case of set the alarm and fingers crossed. Remind me not to work late.

Friday, 23 September 2016

Roald Dahl's Marvellous Medicine - review

I've never tried that US favourite of combining peanut butter and jelly (jam, for those who use proper English), but sometimes unlikely combinations do work well together - and that's the case here, where neuroscience professor and medical doctor Tom Solomon manages to bring together Roald Dahl's life story and medical popular science. Don't be put off by the university press publisher - this is not a heavy title.

The thing that links the topics together - the sandwich for the peanut butter and jelly - is Dahl's stays in an Oxford hospital, when Solomon was a junior doctor there. The two struck up a friendship, and Solomon very effectively makes use of their conversations as leaping off points both to take us through Dahl's fascinating life story and the medical incidents that peppered the author's life. We also get a few of Solomon's own experiences (if anything I'd have liked more of these), though it's not long before we are back with Dahl.

Apart from Dahl's own medical experience through to his final injection of morphine from Solomon, which included being rebuilt after a traumatic plane crash in the Second World War, Dahl's family had more than its fair share of medical tragedy. Two of his daughters died in his lifetime - one aged just seven from measles complications, his first wife had a serious stroke, and his son's pram was hit by a car, resulting in a serious brain complication, which led to Dahl helping to design a new kind of valve to reduce pressure on the brain and contributing to a paper in the Lancet.

According to Solomon, Dahl was always curious about medical matters, and they occur regularly in his writing as well as his family experiences. Whenever anything medical comes up, Solomon takes us through the detail of what's involved - though this is in no way a morbid book, lifted as it is by Dahl's life story. I'm personally not a great audience for medical matters (I can't even watch a medical drama on TV), but with a bit of judicious skipping of the more detailed medical aspects I still managed to thoroughly enjoy this book, both in finding about more about this remarkable author, and also in the sensitively handled conversations in the hospital - boosted by Solomon's recent visit to Dahl's home town - all of which really give the reader a sense of being there.

It's an oddity of a book, but one I am very glad that I read - what's more, all the author royalties are going to Dahl's favourite charities.

Roald Dahl's Marvellous Medicine is available from and

Thursday, 22 September 2016

Sugary science?

Sucrose - image from Wikipedia
It is well known that the cigarette companies were aware of the dangers of smoking long before the general public, yet spent large amounts of money on attempting to counter the science. Similarly, many of the oil companies have actively sponsored attacks on global warming. Now it appears there is a new bad guy on the block - the sugar industry.

It is only in the last few years that we have displaced some of our concern about fat in the diet to take on sugar as a dangerous substance to over-consume. And it's easy to assume that this awareness also took the sugar industry by surprise. But research undertaken by the University of California, San Francisco suggests that the US sugar giants were aware of the risks of sugar consumption as far back as the 1950s.

To make matters even worse, the paper tells us
Together with other recent analyses of sugar industry documents, our findings suggest the industry sponsored a research program in the 1960s and 1970s that successfully cast doubt about the hazards of sucrose while promoting fat as the dietary culprit in [coronary heart disease].
This is astounding if true. Not only was the risk from sugar played down, but it appears that the sugar industry used a distraction technique by overplaying the role of fat.

There's the possibility here of tobacco-style mass law suits. But what interests me more is whether or not US big business (Europeans do it as well, but not on the same scale) is still playing this kind of bait and switch game with our health. We know that the oil companies are still trying to play down climate change - but what about the food industry? Or pharmaceuticals?

I'm no enthusiast for conspiracy theories, but this kind of behaviour defies belief. Don't these people have children?

Monday, 19 September 2016

Listen to the infinite

I don't think it's particularly surprising that my bestselling book so far is A Brief History of Infinity. Infinity is just one of those topics that grabs your interest, not because it necessarily has any impact on your everyday life (though thanks to calculus, it does), but because it's genuinely mind boggling and has fascinated people for millennia.

Now, philosophy professor Adrian Moore is bringing a touch of the infinite to your ears with a 10 episode series of surprisingly bite-sized 15 minute programmes, starting today at 1.45pm on BBC Radio 4 (or listen later on iPlayer).

I know Adrian does a great job, as I appear in episode 5 on Friday, so I've seen him in action. It was also fascinating to discover that Adrian was inspired with an interest in philosophy by the same teacher who inspired me to write the book - it's really true what they say about a great teacher.

So buckle in to your radio/computer/phone or however you get hold of it for a fun ride...

Friday, 16 September 2016

Splice the mainbrace and read me a novel

Image modified from Wikipedia
Last year I had the pleasure of appearing at the Manx Literary Festival alongside other, more stellar literary luminaries including Chocolat author Joanne Harris. Generally, I find Joanne's words of wisdom on the writing life spot on - particularly her recent campaign to get writers paid for appearing at literary festivals (I'm pleased to say we were paid for the Manx Festival). However, I've got mixed feelings about her recent, interesting piece on piracy.

Don't get me wrong. I absolutely agree that piracy is wrong. People should pay for a book (or borrow it from a library) if they want to read it. I am not in any way condoning piracy.  Book pirates should be locked up and the key thrown away. Full stop.

The only point I'm not sure about is whether piracy is as much of an issue with books as it has been for music. There are two big reasons for this. One is that when music piracy was at its height there were glossy sites like Napster to get the free downloads, while there weren't easy ways to get paid downloads. By comparison there are easy way to get paid ebooks (though some publishers still stupidly price them as if they are hardbacks - I have some ebooks priced at over £13), but the pirate book download sites tend to be sleazy sites that feel as if they are going to give you a virus, and in many cases they will.

The other reason is the demographic of the customer base. The kind of people who tend to access the most music also tend to be the kind of people who are most likely to download pirate material. But the kind of people who read lots of books tend to be the kind of people who shy away from pirated stuff and prefer to be legitimate. It's a generalisation, I admit, but I think it holds true pretty well.

I get tens of alerts a week that pirate copies of my books have been put up. I used to pass these on to the publishers, who muttered that half of them didn't work anyway, but they'd work through them. Now I tend not to bother. I could be wrong, of course, but I genuinely believe that I am not losing many sales at all to pirates, and as such it's not a big issue for me. I still hate it. I still want it to stop. But for most authors I doubt that it has a huge impact on earning a crust.

Tuesday, 13 September 2016

The Bestseller Code - Review

Despite all the efforts of publishers, it has always seemed impossible to predict whether or not a book would be runaway bestseller. This isn't too surprising - it's the kind of thing that is inherently unpredictable because there are simply so many variables involved. Yet a newly published book suggests it is possible to do just that. Are the authors crazed or brilliant? Neither, really. They have put together a mechanism based on computerised text analysis that is good at spotting bestsellers - and yet, oddly, this doesn't contradict that inherent unpredictability. Why? Because there are two different levels of bestsellerdom involved - and because I think there's one bit of information missing from the book (apologies to the authors if I've missed it).

So what does the software do? By looking at various word uses, patterns and shaping, it can make a good shot at predicting whether or not a book is likely to have featured on the New York Times bestseller list. This is very impressive - and, along the way, Jodie Archer and Matthew Jockers give some excellent advice on things that authors can do (or at least try to do) that will make their books more like these bestsellers.

This isn't a universal panacea. In fact the authors admit that what their algorithms spot is not what most would regard as great fiction. The system laps up the like of the output of Dan Brown and 50 Shades of Grey. But interestingly, it also is useful counter to those who say they can't understand why these kind of books sell because they are terribly written. In fact, in a number of respects these books are very well written - it's just that the criteria for 'well written' are not those used by the lit. crit. brigade.

Not only is this not a recipe for producing great literature, it's not about producing books everyone would like either. Taking a quick skim through the top 100 books selected by the analysis, there are perhaps three I would consider reading. But many of us are not 'bestseller' readers. We like our own little niches, and that's fine. This system isn't for us - it is about finding likely hits for the traditional bestseller market.

This genuinely is all very interesting, although the book has surprisingly little content for a full price hardback (it's large print, and there's a lot of dancing around exactly what they are doing). However what absolutely isn't true is the assertion made here that 'mega-bestsellers are not black swans'. The system uses a number of measures, and though it's true that most mega-sellers like Harry Potter and 50 Shades do well on some of the measures, they pretty well all fall down on others. So, for instance, to write a bestseller we are encouraged to avoid fantasy, very British topics, sex and descriptions of bodies. What the model seems to do well is to recognise what you might call the run-of-the-mill bestsellers, rather than pick out most of the real runaway successes as being stand-out.

There was also that missing bit of information. The authors are enthusiastic to tell us how many books that scored highly from their system were on the bestseller list, and that really is impressive. But they don't mention false positives - how many books the system thought should be bestsellers but weren't. That would have been interesting to discover more about.

I'm sure we'll hear more of this kind of analysis, but I really hope publishers don't put too much stock by it - because it is very much a lowest common denominator approach (certainly from the viewpoint of someone who wouldn't consider reading more than 95% of their recommendations). That's not to say that the book isn't interesting - and for an author, there are some excellent insights into some of the things that attract this generic group of readers (or put them off) that are worth considering even if you do write science fiction or British crime fiction (say).

A fascinating piece of analysis, provided you don't take it all too seriously.

The Bestseller Code is available from and

Monday, 12 September 2016

Smart queues, dumb queues and Metro queues

A shop - contains checkout queues
I've done a fair amount of work on queuing in my time, which is why I was very doubtful to see a Metro headline 'Why you're better queuing behind one person with a full trolley than people with baskets.' And I had good reason to be doubtful, because the argument was, well, total rubbish.

'Do you queue behind the person with a trolley filled to the brim, or do you wait behind the line of people in the "10 items or fewer" queue?' the article asked. Then it introduced Dan Meyer 'a former high school maths teacher' (a queuing expert, then), whose research tells us that transactions have a fixed time of 41 seconds, plus 3 seconds per item scanned.

'This means,' says the article, 'that queuing behind a line of people who have fewer things will take longer than a couple of people with full trolleys'. Again, I'm afraid, this is total garbage.

The article points out that one person buying 100 items will take 5 minutes 41 seconds, while four people with 20 items each will take 6 minutes 44 seconds to go through the till. This is true but irrelevant.

There are two big problems with this argument. Because of that 41 second overhead time, you can get through more items in the same time from a single trolley than lots of baskets. But I have never been in a basket queue with more than three or four people in front of me. And clearly they aren't going to have '20 items each', if it's a 10 items or fewer queue. Doh! Those four people with 10 items each (in practice some will have fewer than 10) will, according to Meyer's own numbers, only take 4 minutes 44 seconds to get through - so queue behind them, not the bloke with the full trolley.

The other problem with Meyer's analysis is that I can't think when I last went into a supermarket without self-checkout for baskets. These operate on the much more sophisticated single queue, multiple server system. So there may be five or six people in front of me in the queue - but we are waiting for 6 or 20 checkouts at my nearest supermarket (6 one end of the store, 20 the other*). Which means in practice you will be unlikely to have to wait for more than a few seconds to start scanning.

Three lessons then. The media, even the Metro, should think more about a maths or science based story before they publish it. Secondly, just because someone's an ex-maths teacher doesn't make him a queuing guru. And finally don't queue behind people with big trolleyfulls unless there's something seriously wrong with the basket checkouts.

* This is a much more interesting problem of which end to go to, as it is often quicker to go through the 6 checkout end, as far fewer people use it.

Friday, 9 September 2016

Shock, horror, BBC News in Star Trek ignorance probe

I generally ignore people who moan about how the quality of BBC News reporting is going downhill, but now they've reached a new low. They quote actor Robert Picardo on how Star Trek inspired scientists, naming him as the ship's doctor in the original series - there's even a picture of Dr McCoy... the character who unfortunately was played by DeForrest Kelley, who died in 1999. Ricardo was in the much later (and lesser) Voyager series.

You can listen to Picardo's words of wisdom by clicking through here (the BBC corrected their text after I tweeted about it, but you can still see the original text opposite), or even better you can take a look at my book Ten Billion Tomorrows on the relationship between science and science fiction which explores just how various works of science fiction - with Star Trek one of the big hitters - has influenced scientists, just as much as SF is, of course, influenced by scientific discoveries.

Tuesday, 6 September 2016

In defence of Victoria

Image from Wikipedia
I would like to defend Victoria. This is not the railway station, nor the monarch, but the ITV drama of that name. There have been moans about the accuracy of the series. Now some of these are based on historical supposition, where a degree of drama has been added for the sake of being, well, interesting. So, for instance, Victoria certainly hung on Melbourne's every word... but probably didn't have a crush on him (he didn't look a lot like Rufus Sewell). You can take this kind of thing either way - I'm sure even Wolf Hall took the occasional liberty with historical accuracy to make the drama work better.

No, what really gets my goat are the two allegations: Victoria is too tall and she's too pretty. Or to be precise, former Dr Who sidekick Jenna Coleman is. I find these moans both irritating and frankly sexist. At 5 foot 2, she's all of three inches taller than Victoria. Big deal - she's still quite short, and that's enough. She's an actress, not a stand-in. Why sexist? When Michael Sheen played Tony Blair in the film The Queen, I don't remember anyone saying, 'But Michael Sheen is too short' - yet he's more than three inches shorter than Blair.

Similarly with the 'pretty' remark (not that Sheen/Blair are pretty). Some have said that the comparison is unfair, because we're thinking of the old Victoria - at this age (the character was 18/19 in the first two episodes) she was quite pretty. Now it's perfectly true that Coleman is prettier than Victoria was, and specifically it is true that Victoria had a rounded face, where Coleman's is quite pointy. But again, Coleman an actress playing someone, not a look-alike. I mean, good grief, if Robert Redford could play Bill Bryson who I'm sure would agree about himself that he isn't exactly a matinee idol, anything goes. It's a ludicrous complaint.

Victoria isn't great literary drama - it's a Downton Abbey replacement as warm Sunday evening fluff. So it may not always be historically spot-on. But there's absolutely nothing wrong with the casting. And it's far better than the alternative on BBC1.

Monday, 5 September 2016

Warlords of Llantatis review

I was puzzled to receive an offer of a review copy of Warlords of Llantatis as I'm not a fan of swords and sorcery fantasy, but I was reassured that it was in reality science fiction - which it is, despite being virtually a fantasy.

The keyword here is 'virtually'. The majority of the book is set in the (fictional) total immersion fantasy adventure game that the book is named after. Like Neal Stephenson's Snow Crash, what we get is a mix of the main characters' experiences in the real world and in the game, which is far more detailed than is currently possible - so this genuinely is science fiction. In parts this works brilliantly, in parts there are issues.

The book starts with page after page of fictional non-fiction, describing the writing of the virtual world system and the setting up of Warlords. This background is quite interesting (especially if, like me, you have an IT background) but not as engaging as fiction should be, making it a risky opening. Then, however, Warlords segues into an intriguing story, though you have to cope with the main characters starting off as unpleasant slobs before becoming good guys.

At the centre of the plot is a mysterious nameless younger character who appears in the game - although his identity is obvious to the reader after a page or two, the central quest to find out who he is and where he is located in the real world before he dies in the virtual world is very clever and genuinely engaging. In fact, the writing generally works well, but the verbal interchanges are far too long and can get tedious - at least a quarter of the book could probably be trimmed.

Part of the problem here is that this is a humorous thriller - and the humour, sometimes ladled on very thickly, reuses the basics weaknesses of derivative adventure gaming over and over. Oddly, the game in the book doesn't make much of the Welsh name and associations (which extends to Dylan Thomas classics like the place name Llareggub). Instead, it relies more on intentionally heavy-handed cod-Tolkien combined with various other fantasy clich├ęs (Amazonian female warriors, and a sparkly magical kingdom with dubious evil furry creatures, for instance). There are some great humorous lines - for example, I loved 'As your company's legal representative I advise against fun.' But a lot of the humour is decidedly basic and reliant on (mostly female) bodily parts.

The other issue is that Dominic Green, a Hugo-nominated SF author for his short story Clockwork Atom Bomb, piles in far too many plot lines. We have two sets of main characters who are thrown together, plus the differing intentions and special interests of the game's writers, the company that runs the game, a gang of rogue moderators, a North Korean despot, a Chinese company that sells in-game gold, Singaporean criminals, a police force, the FBI... just as the book is too long, there are too many threads for sanity and it's easy to get lost or to lose interest occasionally.

This is a shame, as the central storyline about finding the mysterious character is excellent, as is the trickster AI character Kayoki, who really comes into his own towards the end of the book. With some strong editing this could become a top-notch piece of science fiction. As it stands, you either have to be tolerant, or to be prepared to skip through some of the more excessive parts. The best of it was good enough that I've given it four stars - but without that edit, it only really deserved three.

Warlords of Llantatis is available from and (only on Kindle).

Friday, 2 September 2016

Science writing at its best

I suspect both of my blog readers know about the Popular Science book review site that I run ... but just in case you don't, it has been running for around 14 years now and - as the name suggests - contains reviews of popular science books.

If you're looking for some interesting/inspiring reading about science from black holes to the nature of life it's well worth a visit.

What's more, sign up for the free mailing list during September and (along with existing subscribers) you can enter a competition to win one of three free books from my catalogue - you even get to choose your own title. What's not to love?

Thursday, 1 September 2016

What are the chances?

Randomness is something that most of us struggle to understand - it's one of the main reasons I wrote my book Dice World to explore the influence of randomness and probability on our lives. I try to make randomness something that's better understood by the reader.

However, not everyone has read the book (yet) and confusion caused by randomness often comes up in the media. So, for example, in a recent article on jury service entitled What Are You Chances of Being Called up Again and Again we were regaled with the statement
Plenty of people go through their lives never being summoned; others are called repeatedly. Is selection really, as the government says, entirely random, or is something else at work here?
Now, to be fair to the writer of the article, Patrick Collinson, he does go on to explain that, yes, it is entirely random. But there is definitely a strong implication in that statement that the selection process can't be random if some people get repeated calls and others none.

This is an indirect example of the process known as clustering. We tend to assume that randomness means that the results are well spread out, but actually something that occurs at random tends to crop up in groups, with gaps. When a series of events happen one after the other (clustered in time) or at the same location (clustered in space) we tend to assume that there is a linking cause, that this can't be a totally random occurrence. Historically this effect might have resulted in, say, a cluster of illnesses being blamed on a witch - these days (in many countries, at least) it's more likely to be a phone mast, power lines or a nuclear plant that gets the blame. This doesn't mean, of course, that clusters can't have a cause - however, just because there is a cluster doesn't mean that it has a cause.

So, if selection is truly random, we should expect some people to be called for jury service many times and many never. (Me included, so far.) A useful analogy is to think of taking a tin of ball bearings and dropping them on the floor. You would be really surprised if the balls were all neatly, evenly spread out across the floor. It seems perfectly reasonable that in reality some will be clustered together and there will be gaps with nothing. That's because we don't expect causality here. But in any circumstance with a little more room for causality, such as jury selection, our brains lose their grip on randomness, look for conspiracy and get it very wrong.