Sun - December 12, 2010

New content now linked from the main page


As of the fall of 2010, I've stopped adding content to this blog. These pages will remain, but new content will be linked from the main page.

Posted at 05:42   Category:    Permalink

Mon - August 30, 2010

A little Python program to create to-dos in Things from a template file


I quite like the to-do list manager Things from the company Cultured Code. (Like plenty of other people, I expect, I'm waiting for repeating to-dos on the iPhone version, but even without that feature it's far the best one I've seen.) I also have a list of things to do in preparation for going on a trip that I've refined some over the years. (Make sure I have enough books, get any foreign currency I'll need, get a hostess present, etc.) Since some of the items on the list may require that I wait for something to be shipped or for other people to do things, I have various indications in the list of how long before I leave that I ought to begin each item.

I've sometimes thought that it would be convenient if Things could make use of that list without my having to go to the trouble of entering each item. That's the sort of thing that computers are meant to do, after all. I thought of emailing the folks at Cultured Code and suggesting a feature of that sort. And then I noticed that the Macintosh version of Things can be controlled by AppleScript. And there's a Python module that can send the necessary events (so I didn't have to figure out much about AppleScript). So I hacked up a little Python program to read my file and create the appropriate to-dos in Things.

It's unimaginatively called todosfromfile.py and it's licensed under the GPL. You can get it here.

The file it reads has two sorts of lines: "time-before" lines and to-do lines. The time-before lines specify how long in advance the subsequent to-dos should be due. So the file might look like this:

1 month
Make sure I have the clothes I'll need

2 weeks
Get books
Get hostess present
Foreign currency

1 week
Program phone with addresses
Make sure I have enough cash

2 days
Get weather forecast

1 day
Check in

On day
Pack laptop, chargers

Blank lines and lines beginning with a "#" are ignored.

The program creates a project in Things and adds the to-dos to it. It's run from the command-line and takes three arguments: the name of the template file (--file), the name to give the project (--name), and the date to count backward from (--date). The date needs to be in YYYY-MM-DD format. So I might run it as:

$ python todosfromfile.py --file trip.templ --name 'Trip to Maine' --date 2010-10-31

It requires the Appscript library and Python 2.7. It only needs Python 2.7 because I used the argparse module and that could easily be changed.

Posted at 07:04   Category:    Permalink

Fri - August 20, 2010

Book: When the Devil Dances by John Ringo


John Ringo
When the Devil Dances
Baen, 2003
ISBN: 0-7434=3602-4
ISBN-13: 978-0-7434-3602-1
678 pages
$7.99

When the Devil Dances is the third book in John Ringo's four-book "Posleen War" series of military science-fiction novels. (My reviews of the first two are at: 1, 2.) Considerable spoilers for the first two novels follow.

When the Devil Dances has the burden of being the "middle" book of the series. In the first book we met the alien adversary, the Posleen, and in the second one they began to invade earth but were sometimes brought to a halt. Notably at the Potomac river by Michael O'Neal's few troops using armored combat suits supplied by friendly aliens. As this book begins, it's five years later and the only organized resistance to the Posleen is in central North America. The Posleen can't cross mountains well and human defenses have held them west of the Rockies and east of the Allegheny/Appalachian mountains. Michael O'Neal is now a major and he and his ACS troops are pretty mentally worn out and badly diminished in numbers from having to turn back incursions that the Posleen occasionally make up even well-defended valleys. (High-tech resupply from offworld is almost non-existent.)

Worse, some among the Posleen have been learning from human strategy and tactics. They're no longer relying solely on superior numbers. And, of course, eventually one of those clever groups starts a very big incursion. And the book ends before the battle is over. As I said, it's the "middle" book and so things get as bad as possible consistent with there still being a ray of hope.

Still, there are some compensations. Such as an absurdly huge tank that's called Bun-Bun and a soldier who was nearly miraculously healed by aliens and is now something of a composite. Both of which come in handy. We also get to see some things from the point of view of the adversary and that always makes a book a bit more interesting.

There are certain things about the book that don't quite exactly make sense. Such as why the Posleen don't attack from the south. But I have said before that Mr Ringo's military thrillers are generally somewhat improbable even by the rather relaxed standards of the genre. And nevertheless I keep reading them. In this case, there's less payoff in terms of thrilling battles, but I imagine that that's being saved up for the last book.

Posted at 08:49   Category:    Permalink

Mon - August 16, 2010

Book: Wasp by Eric Frank Russell


Eric Frank Russell
Wasp
Gollancz, 2000 (originally published in 1957)
ISBN: 0 57507 095 1
175 pages
Out of print; as of this writing used editions seem to run above $20.00

The reader of Wasp, will find it unsurprising that its author, Eric Frank Russell, served in the British air force during the second world war. Apart form the existence of spaceships, there isn't much that's science-fiction-y about the book. It's really about a single (well-supplied) commando who is landed behind enemy lines -- er, on an enemy planet -- to create as much trouble as possible in civilian areas. That is, to act like an annoying wasp.

Conveniently, the aliens differ in appearance from humans mostly in that they're purple and bow-legged. Our main character, James Mowry, was born on one of their planets and so speaks the language fluently. Adding to the similarities to the second world war, the enemy Sirians have an authoritarian government and a somewhat northern-European-flavored culture.

Neil Gaiman finds the book somewhat prescient because James Mowry does very little actual damage and instead maddens the authoritarian government sufficiently that they do most of the damage to their society themselves. But James Mowry is a wasp, not a terrorist. He is interested in discomfiting the authoritarian government, not creating abundant civilian casualties.

If you're in the mood to read a story from the 1950s about a clever commando, this short book should do nicely.

Posted at 07:37   Category:    Permalink

Fri - August 13, 2010

Book: Blindsight by Peter Watts


Blindsight
Peter Watts
Tor, 2006
ISBN-13: 978-0-7653-1964-7
ISBN-10: 0-7653-1964-0
365 pages (main text)
$14.95

In the science-fiction book Blindsight by Peter Watts, it's the late twenty-first century and biological engineering has gotten pretty good. Good enough that ordinary humans aren't particularly useful. So when aliens make themselves known to humans and there's a signal at the edge of the solar system, the crew that's chosen to go on the first-contact mission consists of Jukka Sarasti, a vampire (they were extinct, but the genome has been brought back because they're very smart even though they present some disadvantages); Susan James, a linguist who's often called "The Gang" because she has four independent personalities that she can call on; Isaac Szpindel, a biologist who has a great many hardware upgrades; Major Amanda Bates, who mostly slows down her robotic soldiers; and the narrator, Siri Keeton, who interprets things for others and has had half his brain removed and replaced with machinery.

To my, um, mind that's a pretty good premise for a first-contact science-fiction novel. Add the fact that the aliens are thoroughly and persuasively alien and you have a book with a lot of potential. And there's some interesting investigation of themes of being and knowing as the book goes along. But there is also at least one impediment to enjoying the book. Mr Watts, or perhaps more exactly his imperfect narrator, uses metaphors even when they aren't especially illuminating. Take, for example:

    And when your surpassing creations find the answers
    you asked for, you can't understand their analysis and
    you can't verify their answers. You have to take their
    word on faith --

    -- or you use information theory to flatten it for you, to
    squash the tesseract into two dimensions and the Klein
    bottle into three, to simplify reality and pray to whatever
    Gods survived the millennium that your honorable
    twisting of the truth hasn't ruptured any of its load-bearing
    pylons. You hire people like me; the crossbred progeny
    of profilers and proof assistants and information theorists.
    (p. 49)

Whether that's a potentially interesting and distinctive voice or a prickly and tedious impediment to comfortable reading is probably up to the individual reader.

Posted at 09:02   Category:    Permalink

Wed - August 4, 2010

Book: Roseanna by Maj Sjöwall and Per Wahlöö


Roseanna
Maj Sjöwall and Per Wahlöö
Vintage, 2006 (originally published in Sweden in 1965)
ISBN: 978-0-307-39046-2
212 pages
$13.95

Roseanna is the first of ten novels by the Swedish partners Maj Sjöwall and Per Wahlöö which feature the police detective Martin Beck. As the book begins, a boat that's dredging a channel in a lake about 150 miles southwest of Stockholm brings up a woman's body. Martin Beck and some colleagues are sent from Stockholm to investigate. But no one has filed a missing-person report for anyone remotely like the dead woman and the police have no luck determining who she was. Without any knowledge of the victim, the police have no way to proceed and the case languishes for months. But then a report comes in from rather far afield. It seems that the woman's name was Roseanna and that she was a tourist and had been traveling on a passenger boat that had passed nearby. With that information in hand, the police begin to make progress.

What follows is a good, if fairly straightforward, police investigation. The book probably seemed fresh in the mid-1960s when it was published (and the Swedish mystery writer Henning Mankell suggests that it did in an interesting introduction to this edition) but this isn't the mid-1960s and whether the book is interesting now can't depend on that.

When discussing The Girl With the Dragon Tattoo, James Lileks said that that book made him think of the Martin Beck novels. And the books are similar in that they both convey a good deal of Swedish atmosphere. But of course the Sweden of the mid-1960s is very different from the Sweden of the turn of the twenty-first century in The Girl With the Dragon Tattoo. And, indeed, Martin Beck is very nearly the polar opposite of Mikael Blomkvist, who is self-assured and always good at relationships. But even if it's a different sort of Swedish atmosphere that comes through, what comes through is interesting.

Take, for example, this bit:

    Martin Beck sat on the green bench in the subway car
    and looked out through the rain-blurred window. He
    thought about his marriage apathetically, but when he
    realized that he was sitting there feeling sorry for
    himself, he took the newspaper out if his trenchcoat
    pocket and tried to concentrate on the editorial page.

    He looked tired and his sunburned skin seemed
    yellowish in the gray light. His face was lean with a
    broad forehead and a strong jaw. His mouth, under his
    short, straight nose, was thin and wide with two deep
    lines near the corners.
    (p. 11)

Or this one:

    Kollberg finished dressing and put his pistol in place.
    He took a quick look at Martin Beck and said: "You
    look depressed. What is it?"

    "Nothing special."
    (pp. 23-24)

Or when Martin Beck is interviewing someone related to the case:

    Martin Beck took a deep breath.

    "Did he make you happy?"

    "I..."

    "Try to answer."

    "You... you are asking such difficult questions. Yes, I think so."
    (p. 166)

Martin Beck has bad relationships with the members of his family, he gets sick a lot, and he sleeps poorly. But he is a very good policeman. The atmosphere in Roseanna isn't as shiny and cosmopolitan as an Ikea countertop but it's interesting and good even if it is a bit dark.

They drank a lot of coffee in Sweden in the 1960s too.

Posted at 08:46   Category:    Permalink

Book: His Majesty's Dragon by Naomi Novik


Naomi Novik
His Majesty's Dragon
Del Rey, 2006
ISBN: 978-0-345-48128-3
356 pages
$7.99

His Majesty's Dragon is the first book in Naomi Novik's (so far) six-book series of novels set during the Napoleonic Wars. That era has been a fertile setting for historical novels. I have written here about one of Bernard Cornwell's novels set at that time and three of Patrick O'Brian's (1, 2, 3). So it's safe to say that I'm inclined to like that sort of novel.

In His Majesty's Dragon, Ms Novik has added to the things usually found in the Napoleonic Wars an aerial corps of human-carrying combat dragons. The Napoleonic Wars present plenty of opportunities for drama and interest without the addition of dragons. But that doesn't mean that adding them is necessarily a bad thing.

As the book begins, navy Captain Will Laurence and the crew of HMS Reliant has just captured the French frigate Amitié. The French ship had been weakened by a recent encounter with bad weather but its crew put up an unusually fierce defense even though defeat was certain. The reason for that is quickly found: the ship is carrying a dragon's egg. Captain Laurence and his crew being naval men, most of them don't know much about dragons or their eggs. But since it's a British ship there's a naturalist aboard who can remedy much of that.

It seems that the egg is about to hatch (the French ship was far behind schedule) and when a dragon's egg hatches, there is generally only a single opportunity to bond the dragon to a human handler (and flight captain). None of the naval officers likes the idea of being attached to a dragon. Apart from that officer's having to leave the navy, aviators have something of a dodgy reputation. And since a dragon's handler can't stray for long far from their charge and you can't very well bring a dragon to a concert in town, taking part in any sort of society becomes impossible.

The unmarried officers of the ship draw lots to see who should attempt to engage the dragon's attention when it hatches. To his relief, Captain Laurence's name isn't chosen. But when the egg hatches everyone is on deck to watch. And the hatchling ignores the man chosen and instead strikes up a conversation with Captain Laurence. Knowing his duty, he follows the protocol he has recently read about and names the dragon Temeraire.

Happily, not everything that Captain Laurence supposes to be true about being a dragon's handler turns out to be true. And some things that might strike a naval officer as dodgy aren't so bad when viewed from the other side.

What follows is a very respectable adventure story. There are surprises, reputations gained and lost, heroic deeds, and famous battles. Patrick O'Brian's books are better literature but there aren't going to be any more of them. His Majesty's Dragon is entertaining and imaginative. A good adventure story is always very welcome.

Posted at 08:15   Category:    Permalink

Wed - July 28, 2010

Book: The Girl Who Kicked the Hornet's Nest by Stieg Larsson


Stieg Larsson
The Girl Who Kicked the Hornet's Nest
Knopf, 2010
ISBN: 978-0-307-26999-7
563 pages
$27.95

The Girl Who Kicked the Hornet's Nest is the Swedish author Stieg Larsson's third novel. It is also, alas, his last. He died in 2004 at the age of 50 of a heart attack. As with his two previous novels, The Girl With the Dragon Tattoo and The Girl Who Played With Fire, the main character is Mikael Blomkvist, a writer for the small Swedish news-magazine Millennium. The events of this book begin just after the and of the second one. Fairly minor spoilers for that book follow but the series is best read in order.

The book begins with Lisbeth Salander arriving at a hospital as a result of the rather improbable events at the end of the last book. And then, as the police come to figure out what those events were, we get a somewhat lengthy recapitulation of much of that book. When Lisbeth is well enough, she's going to be charged with assault and attempted murder for her part in those events. Mikael Blomkvist, with the aid of his sister, Annika Giannini, who's a lawyer, and several other people intends to make her trial into a trial of the system that failed Lisbeth so comprehensively when she was a young girl. And especially a trial of the secret and unaccountable section of the security police that engineered much of that failure and now wishes to damage her credibility so as to get her out of the way again.

There isn't much drama in the book. There are few plot twists and the team that's working on Lisbeth's side always has the upper hand over the team that's working against her. When tension is occasionally raised, it's almost as quickly resolved.

I praised the first book and, to a lesser extent the second one, for the Swedish atmosphere that is created by all the small details that Mr Larsson includes. There's a certain amount of that here. For example:

    He went down to the hotel's breakfast room and had a
    cup of black coffee and a slice of wheat toast with cheese
    and a little marmalade on it. He drank a glass of mineral
    water. (p. 124)

and:

    Lunch consisted of black coffee and a meatball sandwich
    with beet salad, which she took back to her office.
    (p. 225)

(They drink a lot of coffee in Sweden.) There's about as much of that here as there is in the second book, but not as much as delighted me in the first.

Still, the book is fun even if the plot pretty much runs on rails from the beginning. People who enjoyed the first two will surely enjoy this one.

Posted at 07:29   Category:    Permalink

Tue - July 13, 2010

Book: Crete: The Battle and the Resistance


Antony Beevor
Crete: The Battle and the Resistance
Westview Press, 1994
ISBN: 0-8133-2080-1
343 pages
$41.00

I have had occasion to say before (1, 2, 3) that Antony Beevor is a brilliant military historian whose particular genius consists of presenting an astonishing wealth of detail and making it sustain a historical narrative that is virtually novelistic in its readability. This time, Mr Beevor turns his attention to the second world war's Battle of Crete.

As the narrative gets going, it's the spring of 1941 and Germany attacks Greece from positions in Bulgaria. The Greeks fight a courageous but ultimately futile defense. Among the Greek troops were most of its Cretan division. The Greek government had brought that division to the mainland partly because of British assurances that they would see to the defense of that strategically valuable island. Mainland Greece surrendered on April 20th and Commonwealth forces that had been assisting in its defense began evacuating on April 24th. About 25,000 of them were evacuated to Crete, reinforcing the garrison of about 14,000 Commonwealth and 9,000 Greek soldiers.

Major-General Bernard Freyberg, commander of the New Zealand contingent of the forces on Crete, was placed in overall command. Unfortunately, General Freyberg misinterpreted the intelligence he was given and expected a sea-borne assault. (Or so Mr Beevor convincingly maintains; there is controversy on the point.) Instead, the Germans attacked by air on May 20, with paratroops and soldiers in gliders attempting to seize the island's airports. Landings of that sort were pretty chaotic in that era and the German troops didn't hold the island's main airport anything like securely for the first 48 hours. Even so, still expecting an assault by sea, General Freyberg didn't release enough troops from the coast (where they were guarding some stretches that were very unsuitable for an amphibious landing) to attack the German forces around that airport until it was too late and German troop transport aircraft were landing regularly.

From that point the Battle of Crete was effectively lost. There was more fighting, some of it heroic, but the allied forces began evacuating for Alexandria on May 28. Once they left, the story starts to get really interesting.

The first two parts of the book, "The Fall of Greece" and "The Battle of Crete", of which I have just given a too-brief summary, are good and interesting military history. The battle was of a new kind in a couple of respects. It was the first mainly airborne assault and it was one of the first battles in which radio intelligence and communications might have been decisive factors. It's also an interesting footnote that the novelist Evelyn Waugh was the intelligence officer for Colonel Robert Laycock on the island.

This book was published before Mr Beevor's books Stalingrad, The Fall of Berlin 1945, and D-Day: The Battle for Normandy and the first two parts of the book have the feel of a slightly younger Mr Beevor feeling out the powers that he would use so effectively in those later books on larger-scale events. If this book consisted only of the first two parts, it would be worth reading by a fan of Mr Beevor or by someone with a particular interest in the Battle of Crete. But the battle was short, not especially dramatic, and peripheral to the history of the second world war in general. There wouldn't be that much to interest the general reader.

But the third part of the book "The Resistance", which continues until the end of the war, contains more feats of derring-do than your average war movie. Some of the Commonwealth troops were inevitably left behind in the evacuation and some of them eluded the Germans for considerable periods. And some Cretans, especially in the mountains, formed fierce (and impressively mustachioed) guerilla bands. British intelligence arranged for many of the Commonwealth stragglers to be evacuated by sea and arranged for some irregular troops to be brought in by sea and had them and the Cretan resistance resupplied by sea and by parachute drop.

The Cretan resistance was a persistent thorn in the Germans' side. And it makes a cracking story. For example, there's the story of how about 15 allied soldiers ambushed three German trucks and several other vehicles, and finally an armored car which was dealt with by a British soldier climbing up on it and dropping a grenade down its hatch. And then there's the story of how, in the spring of 1944, a group of British and Cretans kidnapped General Heinrich Kreipe, the German commander on the island, and after a long march across the island, sent him by boat to Alexandria. There's also politics, personality clashes, and everything else you'd want from a war drama.

If Mr Beevor's other books of history are nearly as compelling as novels, the third part of this one is nearly as engaging as a movie.

American readers will be saved a rather odd image if they know in advance that "life-preserver" (p. 305) can refer to a short club.

Posted at 08:04   Category:    Permalink

Mon - June 28, 2010

Book: Gust Front by John Ringo


John Ringo
Gust Front
Baen, 2002
ISBN: 0-7434-3525-7
ISBN-13: 978-0-7434-3525-3
713 pages
$7.99

I've had occasions to say before (1, 2, 3, 4, 5, 6) that John Ringo's military thrillers are good fun even though the plots are generally a bit improbable even by the rather relaxed standards of the genre. That improbability must not bother me since I keep reading them. Gust Front is the second book in Mr Ringo's four-book "Posleen War" science-fiction series. (The first is A Hymn Before Battle.)

In the universe of the series, the habitable planets near Earth are all populated by a federation of peaceful aliens. It seems that warlike species wiped themselves out before inventing interplanetary travel. That worked just fine for them a hundred thousand years or so. But then the Posleen, a space-faring centaur-like race that's not peaceful, attacked them and has been invading their planets for about two hundred years.

The alien federation would normally have had nothing to do with warlike humans but they need some way of fighting the Posleen. So they give humans some advanced technology and transport through space. And humans have an incentive to fight since Earth is in the Posleen's invasion path.

In A Hymn Before Battle, humans go to fight the Posleen on other planets. In Gust Front, the Posleen have arrived on Earth and they're a little earlier and in greater numbers than had been predicted. All of the America is on a war footing but no one is quite as prepared as they'd like to be. In America, most of the landings happen in the southeast.

The Posleen use some advanced technology on the battlefield but not so much that ordinary human forces are useless. Mainly, the Posleen depend on overwhelming numbers to win. But to have any chance of survival, ordinary forces must fight them from prepared positions. Movement by humans on the battlefield is limited to those few soldiers outfitted with galactic-technology armored combat suits..

There are a few valiant-but-doomed defenses staged by isolated forces (notably combat engineers) and the Posleen also do a great deal of damage to the main American forces arrayed against them. Until, that is, Captain Mike O'Neal and his cohort of armored-combat-suit-wearing soldiers arrives.

The book is a cracking read and anyone who would enjoy a military science fiction page-turner will find a splendid one here.

Posted at 07:30   Category:    Permalink

Fri - June 11, 2010

Book: Musashi by Eiji Yoshikawa


Eiji Yoshikawa
Musashi
Kodnsha International, 1995 (originally published in English in 1981)
ISBN: 4-7700-1957-2
970 pages
$35.00

Musashi is a historical novel about Miyamoto Musashi*, perhaps Japan's most famous swordsman. He lived from the late sixteenth century until the early seventeenth century. The book was written by Eiji Yoshikawa and was first published in serial form in 1935 in the Japanese newspaper Asahi Shimbun. (This edition is ably translated by Charles S. Terry.) The book is an interesting look into how a Japanese writer of 1935 might think about and write about the life of a Japanese ronin (that is, a samurai without ties to a feudal lord) of three hundred years earlier. But a twenty-first century reader of English who is looking for either a cracking adventure story or ready insight into the culture of late feudal Japan is not likely to be entirely satisfied.

As the book begins, Musashi (then called Shinmen Takezo) and another young man from the farming village of Miyamoto, Honiden Matahachi, come back to consciousness in the aftermath of the battle of Sekigahara. They had gone to war seeking adventure and were lucky not to lose their lives when their side lost. They take refuge from the patrols that are looking for survivors in a nearby farmhouse with a mother and daughter, Oko and Akemi. Musashi and Matahachi recuperate until there's some trouble with a band of local ruffians. Musashi and Matahachi each kill one and drive the rest off, but enough remain alive that the district isn't safe for any of them any longer. Musashi and Matahachi plan to return home, but when Musashi wakes on the day they intend to leave, he finds that Matahachi has already left with the women and he doesn't know what direction they've gone in.

Musashi does return to Miyamoto but finds that soldiers are looking for him there and have arrested his sister. He resolves to free her but instead gets caught himself. He's not caught by soldiers, but rather by a clever and puckish itinerant Buddhist priest, Takuan Soho. Having received some useful spiritual lessons from the priest, he escapes with the assistance of Otsu, a young orphan woman who was being raised by the priests of the local Buddhist temple and who was betrothed to Matahachi. They leave town together, but Musashi soon says that he must go rescue his sister and that he will meet Otsu later. The pair's departure further enrages Osugi, Matahachi's mother, who is sure that something bad has happened to Matahachi and that Musashi is responsible. She summons her son-in-law, Gon, and they resolve to catch up to and punish the pair.

That summary takes up up through about page 85 and it's a fair taste of the book. Needless to say, it's a picaresque story, with numerous characters and many chance meetings between people (often inconvenient ones), meetings missed (often ones that would have been convenient), misunderstandings, and mistaken assumptions about people's intentions. The story goes on for a decade and more. In its course, the book contrasts Musashi with Matahachi (Musashi has a good deal more discipline) and also with another swordsman, Sasaki Kojiro (who has more native ability but less discipline to learn to use it). There's also a love-story of a sort between Musashi and Otsu.

The book is set in a relatively interesting period in Japanese history. The battle of Sekigahara is considered to be the pivotal event in Tokugawa Ieyasu's assuming the shogunate and ushering in the Edo period in Japanese history. And we get to see some of that. Merchants are becoming prosperous and we see the shogun's new palace being built in Edo (the city was renamed Tokyo when the emperor moved into that palace). That era was one largely of peace and prosperity, though at the cost of a rather rigid, stratified, and insular society. I'm sure that Mr Yoshikawa intends the reader to consider that Japan's greatest swordsman lived just as the era of wandering ronin was coming to an end.

The book reminds me of nothing so much as a Dickensian picaresque novel, albeit one in which the main character does get into a some swordfights. That's a perfectly fine thing for the book to be, but by modern standards it's not a page-turner and it's nearly 1000 pages long.


* In Japan, Japanese names are given family-name first. When Japanese people expect to have a Western audience, they (with characteristic politeness and accommodation) routinely give their names given-name first. But some texts in English strive to be especially authentic and so give Japanese names in Japanese order. Doing that, of course, can create a certain amount of confusion if the reader doesn't know which sort they're reading. This book gives Japanese names family-name first with the exception of the author's name. I have followed the book's style but have omitted some diacritical marks.

Posted at 08:17   Category:    Permalink

Wed - April 21, 2010

Book: The Fall of Berlin 1945 by Antony Beevor


Antony Beevor
The Fall of Berlin 1945
Penguin, 2002
ISBN: 0-14-200280-1
431 pages (main text)
$16.00

I have had occasion to say twice before (1, 2) that Antony Beevor is a brilliant military historian whose particular genius consists of making an astonishing and fascinating wealth of detail sustain a historical narrative that is virtually novelistic in its drama and readability. Not surprisingly, he carries that off also in The Fall of Berlin 1945.

As the narrative gets going, it's Christmas of 1944, the German counteroffensive through the Ardennes forest in the west (the Battle of the Bulge) is already out of momentum and the Soviet army having, at huge cost, retaken the land lost in 1940, is now in a position to threaten Germany. Hitler receives intelligence that, around the middle of January, the Soviet army is likely to launch a massive offensive from around the Vistula river (which roughly bisects modern Poland from north to south) and that the Soviet army now has considerable advantages over the German army in men and materiel. That intelligence would turn out out to be correct but Hitler ignored it.

Politics enters this story in a way that it doesn't enter Mr Beevor's books that I have written about earlier. For example, one of Stalin's reasons for insisting that his generals press on toward Berlin so brutally is that he had an eye toward the the post-war division of Europe that the Americans, who hadn't thought about it much and just wanted to go home, did not. Naturally, the politics is a bit less dramatic than the other parts of the story, but Mr Beevor writes about it about as interestingly as anyone could and the story would be incomplete without it.

The outline of the story will be known to anyone who has, um, read the book's title. There was no way that the Germans could have stopped the Soviet advance. Berlin was encircled by April 24th. The western allies played no part. Their armies were still 300 miles away. But, as with all good history, knowing how it comes out doesn't make the story less interesting.

The strongest impression from the story is of the brutality. You might expect the soldiers to be brutal to their enemy. You might, in theory, understand without condoning the Soviet soldiers' brutality toward German civilians in response to Soviet citizens' earlier treatment at the hands of German soldiers. (Though what transpires is beyond shocking and impossible to justify.) But these soldiers were even brutal toward their own side. Field Marshal Ferdinand Schörner's motto was "Strength Through Fear". He wanted his soldiers to be more afraid of him than of the enemy. Soviet prisoners who were liberated from German camps were viewed with great suspicion even if they had been wounded before being captured. So were Soviet civilians, often women, taken by Germans as slave laborers. Conditions for them were often hardly better after their liberation. The brutality continues even to Goebbels and his wife, Magda, murdering their six children before committing suicide in Hitler's bunker on the night before the Reich Chancellery fell..

This book is a brilliant and stomach-churning history of the end of a tragedy on a continental scale.

Posted at 09:00   Category:    Permalink

Errno 35 in Python's socket.sendall() under OS X


A little while ago, on the python-help mailing list, a question came up that took a bit of work to find the answer to. Since that list's archives aren't public and Google doesn't seem to have indexed a page with a good discussion of the issue, I thought I'd post about it here (with the original poster's permission, of course).

The poster was using Python 2.6.2 under Mac OS X 10.6.2.

The poster was using Python's ftplib module to upload certain files and some of them would fail consistently with the same number of bytes transferred and with a traceback that ended with:

File "/Library/Frameworks/Python.framework/Versions/
        2.6/lib/python2.6/ftplib.py",
line 452, in storbinary
    conn.sendall(buf)
    File "<string>", line 1, in sendall
error: [Errno 35] Resource temporarily unavailable

It's pretty clear from that that the OS was temporarily running out of network buffers. But why doesn't the socket's send() method just block until it completes?

The reason is that a socket timeout had been set. If you set a socket timeout in Python (whether through the socket module or something that uses the socket module), sockets are set to be non-blocking "under the covers". (That's pretty much the only way to implement that feature.) It's a somewhat awkward side-effect of doing that that errors resulting from timeouts don't always look like what they are.

[Edited April 27, 2010; the earlier version of this post was based on an incomplete understanding of the problem.]

Posted at 07:37   Category:    Permalink

Sat - April 3, 2010

Book: The Selected Works of T. S. Spivet by Reif Larssen


Reif Larssen
The Selected Works of T. S. Spivet
Penguin, 2009
ISBN: 978-1-59420-217-9
374 pages
$27.95

The title character in The Selected Works of T. S. Spivet is a twelve-year-old boy who lives with his parents and sister on a ranch outside Butte, Montana. His father is a rancher and his mother is an entomologist, engaged in a seemingly quixotic search for a specific beetle that has not previously been identified. T. S. (the initials stand for Tecumseh Sparrow) has something of an obsession with creating maps and diagrams (which are really the same thing as far as he's concerned) and he's quite good at it. T. S.'s friend and mentor, Dr Terry Yorn of Montana State University, has arranged for some of T. S.'s works to be published and T. S. has received some commissions. Without T. S.'s knowledge, Dr Yorn has submitted a portfolio of his work for a prize given by the Smithsonian Institution, which includes a year's fellowship there. Dr Yorn didn't mention in the submission that T. S. is twelve. T. S. is understandably a bit confused when the gets the telephone call telling him that he has won. He eventually decides to accept the award but he doesn't want to involve his family in it so he decides to travel to Washington by riding a freight train.

So, you won't be surprised to be told that the book is a bildungsroman. And it's a rather clever and charming one, at that. For one, the book's margins are full of the inventive and detailed maps and diagrams that T. S. makes. For another, T. S. takes with him on his journey one of his mother's notebooks. It turns out to contain, not notes on beetle investigations, but rather semi-imagined biographical notes about her husband's great-grandmother, another scientist, who came to Montana from Boston. So, in addition to T. S.'s journey that we see in two ways, we also have a somewhat different journey in a different era and in the other direction that we and T. S. are learning about at the same time. The two journeys and the graphical commentary play off against one another quite well.

In addition, when T. S. finally arrives in Washington, the administrators of the Smithsonian decide not to embarrass themselves and so claim to everyone that they knew all along that T. S. was twelve years old. Unsurprisingly, he becomes a public-relations darling. But we find that public relations is a sort of anti-map, not depicting the world as it is, but rather as someone would like you to think it is.

T. S.'s character is engaging, the maps are entertaining, and the mechanisms that the novel uses are clever but not obtrusive. I found the book a charming read.

That said, the book is not without flaws. One is that the time that the book is set in is a little odd. It seems to be quite contemporary (T. S.'s sister has an iPod). But no one makes any mention of computers or the internet. It's perfectly possible to imagine that T. S. prefers to work with traditional tools and in traditional media. And southwestern Montana is quite remote. Still, it's a bit odd that nobody so much as sends an email in the course of the book. And T. S. finds it natural to use as a metaphor "a record player left to skip endlessly" (p. 199).

Another thing that bothered me slightly is that to my (occasionally obsessive) mind, some of the things that T. S. says don't ring quite true. Take the book's title, for example. If you make a selection of someone's works, that implies that a different selection could be made by someone else. So you shouldn't call something "The Selected Works" because that implies that there can be only one. For another example, T. S. speaks of shelves "groaning under the weight of the notebooks" (p. 153, margin). That's a hackneyed and un-illuminating metaphor that no one concerned with accuracy would use.

But those are minor complaints about a novel that is both charming and interesting.

Posted at 07:59   Category:    Permalink

Sat - March 27, 2010

Book: Stalingrad by Antony Beevor


Antony Beevor
Stalingrad
Penguin, 1998
ISBN: 0 14 028458 3
431 pages (main text)
$16.95

Before reading Stalingrad by Antony Beevor, i knew that the events there during 1942 and 1943 were horrible. But I did not know how horrible. This is a brilliant book of military history and will be of interest to anyone interested in the eastern European theater of the second world war. But it should probably be read only by people with strong stomachs.

In 1939, Stalingrad (now Volgograd) was in industrial city on the Volga river with a population of a little less than half a million. Between July 1942 and February 1943, about a million and a half people died in the battle for the city. That's horrifying enough. The details make it much worse.

Mr Beevor begins the book with a brief account of the advance to the east of three large German army groups that began late June 1941 and was code-named Operation Barbarossa. The German armies made large gains, but Soviet resistance, long supply lines, and winter weather eventually brought them to a halt, in one case within sight of the Kremlin. The German armies were ordered to hold their ground during the winter, which they did, suffering considerable losses from exposure.

Come the spring of 1942, German advances began again and the German 6th Army was ordered to take Stalingrad as part of the plan to strike south and capture the oilfields of the Caucasus mountains. By the end of August, the Germans had besieged the city and the German Luftwaffe reduced the city to rubble. Even so, Soviet resistance within the ruined city was fierce and desperate. Once again, the weather turned bad before the Germans could secure a victory. In November the Soviet army, better able to operate in the winter, began Operation Uranus and succeeded in encircling the besiegers. Cut off from supplies and reinforcements and unable to be resupplied by air, the German 6th Army was eventually destroyed. The cost in death and suffering on both sides is staggering.

That pretty trivial account probably sounds worse than the bare numbers above. I assure you that, as the details accumulate, the story gets worse.

As in his later book D-Day, Mr Beevor maintains a thoroughly readable, even dramatic, historical narrative and at the same time provides an astonishing wealth of detail. The narrative never gets lost or bogged down (indeed, it reads like the next thing over from a page-turner) and the detail never feels tacked on. That's a considerable accomplishment and I am eager to read Mr Beevor's other books.

Posted at 07:03   Category:    Permalink

Wed - March 10, 2010

Book: Tokyo Vice by Jake Adelstein


Jake Adelstein
Tokyo Vice: An American Reporter on the Police Beat in Japan
Pantheon, 2009
ISBN: 978-0-307-37879-9
328 pages
$26.00

Tokyo Vice is a fascinating book, though it's not without some flaws. Happily, the flaws are pretty minor, especially in comparison to the book's virtues. The biggest flaw is that the book really contains two stories stuck together a trifle imperfectly. But both stories are good.

As for the first story, it's a good thing that the book is non-fiction because if this were a novel, it would be immediately dismissed as absurdly improbable. Jake Adelstein is from Missouri and ended up at Sophia University in Tokyo as an exchange student. Somehow (Mr Adelstein doesn't say how) he ended up with the right to stay and work in Japan. He decided to take the competitive exam to go to work as a reporter at the Yomiyuri Shimbun, Japan's largest daily newspaper. He passed (his Japanese must have been better than he lets on) and, more surprisingly, passes the subsequent interviews. Japan is a lovely and welcoming country but, like most countries, the number of foreigners working as reporters for its major media outlets is small. Mr Adelstein is clearly very smart, but again, I suspect that there's a little more to the story than he lets on. I'm willing to chalk that up to his desire to concentrate on the parts of the story that he thinks most interesting.

In any case, the story of his becoming a cub reporter assigned to the police beat and figuring out how police reporting is done in Japan is an excellent one and told well. (People who know something of Japanese culture will be unsurprised to find the relationship between crime reporters and police to be rather cozy.) Mr Adelstein turns out to do the job, which requires delicacy, tact, and judgment of a particularly Japanese sort, better than many Japanese reporters. And he investigates some interesting cases. That's not only an interesting story, full of memorable and entertaining characters, it's also a story you're not likely to read anywhere else. And it's also often very funny and Mr Adelstein doesn't mind making fun of himself.

The second story grows out of one of the stories that Mr Adelstein investigates when he's a more senior reporter. Members of Japanese organized-crime groups as called yakuza and they like to, or at least used to like to, think of themselves as having some honor. But as of Mr Adelstein's becoming a journalist (he worked for the newspaper from 1993 to 2005) some of them were engaging in trafficking of women, with all of the terrible human costs that inevitably follow. Furthermore, one of the yakuza involved in doing that is granted a visa to America and seems to have an unusually easy time getting a liver transplant at a UCLA hospital. As a result of his investigation, Mr Adelstein receives a very credible death threat. Getting the story out was part of Mr Adelstein's motivation to write the book. Now that the story has been published, there's little reason to try to silence him.

The second story is told rather like a news story. Mr Adelstein's writing about it is serious and her is very clear about what he knows and what he only supposes. And that's as it should be. But it makes the story a little less fun than the entertaining story of his being a reporter. Still, the book puts Mr Adelstein in the company of people like Theodore Bestor, John Nathan, and Alex Kerr , who have brought real insight into Japanese culture to readers of English.

Posted at 09:14   Category:    Permalink

Book: Caprice and Rondo by Dorothy Dunnett


Dorothy Dunnett
Caprice and Rondo
Vintage, 1999
ISBN: 0-679-45477-2
539 pages
$15.95

Caprice and Rondo is the seventh book in Dorothy Dunnett's excellent eight-book "House of Niccolò" series of historical novels. (Reviews of the previous books in the series are at: 1, 2, 3, 4, 5 , 6.) The series is set in Europe in the early Renaissance and the main character of the series is Nicholas vander Poele. He begins as a dyer's apprentice in Bruges with a head for figures and a knack for mimicry. In the course of the books he goes on fascinating and astonishing adventures. It is an indication of Ms Dunnett's skill that it sometimes appears that the history of early Renaissance Europe was arranged for her convenience.

Little needs to be said here. No one should begin the series except at the beginning and readers of the series who have gotten this far will not be surprised to be told that the book is at least as good as its predecessors. Significant spoilers for the previous books follow.

At the end of the previous book, To Lie With Lions, a reconciliation between Nicholas and his wife Gelis was spoiled, but it would have been based on false pretenses. The extent of some of Nicholas's schemes is revealed and he is effectively barred from his home. As this book begins, he has resigned his position at his bank and has run away to Danzig (modern-day Gdansk, on the Baltic, and then as now, part of Poland) where, going by the name Colà z Brugge, he plans to spend the winter with the boisterous pirate Paúel Benecke, who can always be relied on for drinking, womanizing, and fighting. While there, he finds that a mission from the Pope, the Holy Roman Emperor, and Duke of Burgundy will be passing through the city on the way to the Persians at Tabriz in the hopes of persuading them to attack the Ottoman Turks. Further, the mission includes Nicholas's sometime friend and sometime competitor Anselm Adorne as well as Lucavico de Bologna, the Patriarch of Antioch, and several other people, all well known to Nicholas. Anyone who thinks that Nicholas might be able to avoid that meeting or that its outcome might be simple hasn't been reading the series. Some of the subsequent arduous journeys are to the east and southeast where some of the people we meet are Mongols, from the previous emigration from central Asia.

A good many things are made explicit in this book that were indicated only by implication in previous volumes. And, as usual with the series, the women characters are generally more interesting, especially in their motivations, than the men. But that's not important.

Posted at 08:58   Category:    Permalink

Sun - January 24, 2010

Book: Transition by Iain M. Banks


Iain M. Banks
Transition -- Based on a False Story
Orbit, 2009
ISBN: 978-0-316-07198-7
404 pages
$25.99

The universe that Iain M. Banks's book Transition is set in is a "many-worlds" universe. In one of that universe's many time-lines there's an organization, called the Concern or sometimes l'Expédience, that has agents called transitionaries who can move from one time-line to another by temporarily inhabiting the body of someone in the other time-line. They also have methods for predicting how a particular time-line will develop. So they interfere with other time-lines occasionally to improve things for other worlds. But the organization is very secretive and hierarchical and agents don't generally see the extended outcome of the changes they make. An agent may make a tiny alteration that saves someone's life, but is it really true that that person would later go on to do great things? Is the Concern really what it seems?

That's not a ground-breaking premise for a book but it's a perfectly good one. For the book to be good, Mr Banks would need to take the premise in some new and interesting direction. Unfortunately, he doesn't do that. Instead, he spends quite a lot of time having his characters give long speeches about the corrosive and de-humanizing effects of unchecked power, how bad people can rationalize anything, and how terrorists are created when their societies become victims.

The only reason that I read the book to the end was in the hopes that Mr Banks would somehow pull a rabbit out of his hat by making a good book out of what increasingly seemed like little more than an unsophisticated political statement delivered via an unremarkable plot. My hopes were not fulfilled.

There are traces here of the skill that Mr Banks has shown any number of times. The characters and settings are interesting and memorable. I wish that they were serving a better story.

Posted at 08:03   Category:    Permalink

Book: D-Day: The Battle for Normandy by Antony Beevor


Antony Beevor
D-Day: The Battle for Normandy
Viking, 2009
ISBN: 978-0-670-02119-2
526 pages (main text)
$32.95

Antony Beevor's book D-Day: The Battle for Normandy is a brilliant book. It will be of interest to anyone who has an interest in the conduct of the second world war in the western European theater.

The period that the book covers is short: from June 1, 1944, five days before the landings began, to August 26, when the liberation of Paris was complete. (Of course there are a few flashbacks and anticipations of what's to come.) You can imagine that with more than 500 pages devoted to a period of less than three months there's a lot of detail. When I began the book I expected to like it but I expected to like it on account of my geeky fondness for for a wealth of intricate detail. Rather to my surprise, I don't think that it's necessary to be a geek to enjoy the book. Mr Beevor sustains a dramatic, interesting, lively and (at times) horrifying narrative though the whole book. You will need to refer to the maps from time to time to keep the battle's progress clear.

I haven't nearly enough knowledge of the second world war to have anything to say about the book's accuracy. But the 47 pages of notes and bibliography (and Mr Beevor's reputation in general) suggests that he took some pains to get it right. And there are any number of fascinating things to be found in the book. For example, in preparation for the landings, the initial diversions worked rather better than had been expected. But the advance air and naval attacks on German positions accomplished much less than had been hoped. The book also indicates that the Ultra radio intercepts were often very useful.

For a flavor take, for example:

    Some people became too carried away by the air
    of excitement at the apparently unstoppable advance.
    An American war correspondent, determined to beat
    his rivals, turned up in Chartres so as to witness the
    capture of the city. Unfortunately, he was two days
    early. The German 6th Security Regiment promptly
    took him prisoner. (p. 443)

Or, regarding a German tank on the Champs-Elysées:

    A Panther on the Place de la Concorde at the far end
    of the Champs-Elysées had spotted some of
    Langlade's tank destroyers move into position on
    either side of the Arc de Triomphe. Their commanders
    yelled their fire orders. One gave the range as 1,500
    metres, but his gunner, a Parisian, suddenly
    remembered from his schooldays that the
    Champs-Elysées was 1,800 metres long. He made an
    adjustment and scored a first-round hit. The crowd
    surged forward and sang the 'Marseillaise'.
    (p. 508)

Those quotes are a fair indication of the level of detail Mr Beevor goes into and also a fair indication of how readable he makes it.

Posted at 07:52   Category:    Permalink

Mon - January 18, 2010

Book: The Lost Symbol by Dan Brown


Dan Brown
The Lost Symbol
Doubleday, 2009
ISBN: 978-0-385-50422-5
$29.95
509 pages

As with Dan Brown's earlier novels The Da Vinci Code and Angels and Demons, The Lost Symbol is a thriller that's heavy on symbology. Or hero is once again the Mickey-Mouse-watch-wearing art-historian Professor Robert Langdon. As the book begins, his friend and mentor, Peter Solomon, who is also the boss of the Smithsonian Institution, has asked him to fill in at short notice for a speaker who has fallen ill. A private jet takes Robert Langdon from Boston to Washington, D.C. where a car is waiting for him. In fact, he is being lured to Washington under false pretenses. He is being manipulated by a much-tattooed man who calls himself Mal'akh. Mal'akh arranges for Professor Langdon to receive a grisly sort of invitation and hopes to force him to decode some Masonic symbology which he is convinced will reveal a symbol which will give him a great deal of power.

What follows is an improbable and entertaining night-long chase around and under Washington in which various people with various agendas attempt to figure things out and control what happens when they are figured out. It should be noted that all the Masons (well, except for one) in the book are perfectly sensible and likable people. The organization is a bit secretive and uses some unusual symbology, but it's entirely benign. The actual MacGuffin in the book turns out not to be all that interesting and the plots of The Da Vinci Code and Angels and Demons are grander and more entertaining, but the book is still good entertainment for a night or two's reading.

Mr Brown even pokes a bit of fun at himself when a character makes the sincere/without wax pun from Angels and Demons and Robert Langdon recognizes it as coming from a "mediocre thriller" he had read (p. 355).

Posted at 09:06   Category:    Permalink


©