Review: A Study In Scarlet – Arthur Conan Doyle

A Study In Scarlet – Arthur Conan Doyle

I suspect like many people who are currently working their way through The Complete Stories of Sherlock Holmes, my recent interest in Sherlock Holmes has partially come about as a result of the two Guy Ritchie Holmes movies, but mainly due to the Stephen Moffat/Mark Gatiss modern interpretation, Sherlock. So good is the Moffat/Gatiss Sherlock, especially series two, that I was driven straight to The Complete Stories to find out the origin story, if you will.

And boy, what a challenge. OK, so I’m in no way comparing my mission of devouring the Conan Doyle back catalogue as in any shape, way or form as monumental (for there is no better word) as my BFaM Matt’s The King Long Read epic, but still, The Complete Stories clock in at 1408 pages of relatively small print. Well, it’s a mission for me, at least.

So I start at the very beginning, which many consider a pretty average place to start, all things considered. The Holmes canon consists of four novels and 56 short stories. Chronologically, there’s two novels to start, then the other two interspersed amongst all the short stories. The book I’m reading (both hardback and Kindle – who says men can’t multitask?) has the novels up front, then the short stories afterwards. This is disappointing, as the consensus (including The Complete Stories editors’ notes) seems to be that the novels (at least the first two) are a bit crappy, and Conan Doyle only hits his stride with the short stories, defining the Holmes we know of today.

A Study In Scarlet is first up, then. It’s the origin story of Watson meeting Holmes: the characters are introduced and developed, detective and logic skills are thrown in, and personality quirks and idiosyncrasies quickly become entrenched; all this set against the backdrop of a particularly puzzling crime. And so it passes that clues are discovered, reasoning and deduction occurs, false leads are pursued (though mostly by the Scotland Yard detective buffoons who Holmes so likes to mock), all of which leads to the miraculous apprehension of the perp at the end of part one. Miraculous is the right word, as Holmes’ arrest of said criminal occurs out of the blue, with no real prior reference to him. Fortunately, part two of the book takes us 35 years prior to the setting of the story, to the frontiers of the West in America, a setting in to which Mormon frontiersmen are introduced, along with non-believers, forbidden love, and revenge, and fleshes the back story out quite nicely.

The weaving of the two parts of the story into a coherent whole is quite neat – at first the disjoint between the two seemed jarring, but I got on board with it quite quickly, and grew to enjoy it. I think I suffer from being too forgiving when reading, as I really quite enjoyed this. As an introduction in to the Holmes canon, consider me hooked. If the short stories are, as alleged, much better than this, I await them eagerly.

Review: Pantheon – Sam Bourne

Pantheon – Sam Bourne

OK, I’ll admit it. I’m a fan of trashy, Dan Brown-style, fiction. Anything with a slightly preposterous plot, involving a murder and/or a conspiracy and I’m in. When I first heard about Sam Bourne, he was sold as “the new Dan Brown!”, or “better than Dan Brown!” Tragically, this was enough to get my attention.

It was only after I picked up his first book that I realised Sam Bourne was the pseudonym of Guardian columnist Jonathan Freedland. Interesting. Whilst superficially his first four books are very much in the Dan Brown vein (albeit far better written), it was book number three, The Final Reckoning, that made me pay more attention to him. The basic premise of the book, that of a team of avenging Holocaust survivors traveling the world murdering Nazis, is apparently based in fact. This instantly renders the book, and the author, more interesting to me. Fact is always stranger than fiction, and fiction based on fact is surely the strangest of them all.

And so Bourne’s fifth book, Pantheon, appealed to me in the same light. The MacGuffin, a man travelling to America during World War II to search for his family, leads to a larger plot that, again, is based in fact, and makes for fascinating reading, of both the book, and the inevitable Wikipedia trawl afterwards. Sure, the fast-paced page-turning parts of the book are familiar, bordering on formulaic, but I don’t mind that when they’re building towards a bigger picture. It’s the stuff that’s rooted in truth that’s the most fascinating and unsettling.

So yeah, I liked this book. It’s contrived in places and ends poorly, but for a page-turner, it’s perfectly acceptable.

Cross-casting

I’ve been a software engineer for nearly 12 years now, and still I often manage to encounter C++ tricks or techniques that are new to me. This, by the way, is more often than not not down to the ever-evolving nature of the language; more that a lack of formal computer science education and no real propensity to read around the subject has left me with *ahem* gaps in my knowledge.

Yesterday’s neat1 new trick was cross-casting, which allows casting across inheritance hierarchies between unrelated classes. This sounds like it should be illegal, but as long as there’s a common sub-class of the two classes between which you’re trying to cast, and the object you’re trying to cast’s actual type is this sub-class, then the cross-cast will work. For example:

class A
{
public:
virtual ~A();
};
class B
{
public:
virtual ~B();
};
class C : public A, public B
{
};

A* ap = new C;
B* bp = dynamic_cast<b*>(ap);

An interesting2 use-case for this is highlighted in the Capsule pattern which, as the summary states, reduces coupling between application layers. For the uninitiated, reducing coupling is an important goal, and anything that can help achieve that is a useful tool. The example presented in the capsule pattern is the communication of error messages from low-level components to high-level components, without exposing to all the intermediate levels unnecessary details of those errors. It looks like a useful trick. I might just even use it.


1 – Warning: may not be neat.
2 – Warning: may not be interesting.