Is the Magic Gone?

I recently finished Terry Pratchett‘s Raising Steam, the latest installment in his [fifth-]elephant-sized Discworld series, and I fear the magic may be disappearing in a couple ways.

Story-wise, there are only a few things that happen that can be directly attributed to “the light fantastic”, with the vast majority of the plot dealing with technological changes intertwined with social changes. In and of itself this is not necessarily a good or bad thing; but when you pick up a book that is part of a fantasy series, you tend to expect, well, fantasy.

On top of that, I found the actual story-telling to be somewhat heavy-handed in its parallels to modern society, with Sir Terry seeming to spend too much time telling us instead of showing us what is going on. This may in part be due to having so much he wanted to say in combination with perhaps a few too many characters, leaving this reader feeling that I never had time to really relate to any of the several important characters. Unfortunately, I also can’t help but wonder how much the writing might be affected by Mr. Pratchett’s early onset Alzheimer’s, both its effect on the mechanics of writing as well as mental processes involved.

All that being said, it’s not a bad book: I just did not find it to be an exceptionally good book. For me it was in that range where I’m glad I read it, but doubt that I would ever have any real interest in re-reading it. (Note that I am the sort of reader who is more than willing to re-read books I loved or really liked, not the sort who almost never re-reads anything.) All in all, it’s probably a must-read for hard-core Discworld fans, but if you are new to this world, I’d suggest starting out with one of the earlier novels.

Is It Time for Marla Mason to Retire?

m4s0n501

I recently finished the last two novels in T.A. Pratt’s “Marla Mason” series, Grim Tides and Bride of Death. As usual, I enjoyed their fast-moving stories and the lively dialogue, with some unexpected twists and turns along the way (to be expected when Marla has to deal with chaos witches).

However, by the end of the latter book, I felt that perhaps the series has run its course for me. Part of it is due to the fact that Marla has become more powerful: she is now essentially a god who, if not immortal, is about as close as you can get to being so. As such, I think it becomes more difficult for this mortal to really empathize with her challenges and personal issues. It’s a bit like the old Dugenons & Dragons days for me, when I found I got more enjoyment out of playing low- to mid-level characters. Once the characters get really strong, the only interesting challenges have to be equally strong, and eventually you’re gaming with a character so much different from your average John Doe that it has almost nothing to do with your and my lives.

The other part of it is simply variety. I would like to see Mr. Pratt apply his not inconsiderable talents to fresh new endeavors: new characters, new plots, new worlds, even new styles. I’m sure it’s tempting to stick with a winner, and current fans may complain if he does not keep churning out MM stories, but even I can’t eat pizza every day, regardless of how much I like it. (Okay, I also can’t eat it every day because I’m on a low-fat, low-salt diet, but that’s another story.)

Using an Iterator Interface to Create “Round-Robin” Array

I had a requirement that seemed to need a way to cycle through a set of values in an array in such a way that when I got to the end of the array, it would start over at the beginning, essentially load-balancing the use of those array elements. Perhaps you might want to do the same thing for a set of ads, making sure a given user sees each available advertisement before starting again with the first (perhaps an array stored in $_SESSION?).

After exploring a few alternatives, one I found that I kind of like (for its elegance if not its lack of brevity) was to use PHP’s built-in Iterator interface. The concept here was to load any array into an instance of a class that implements the Iterator, and then simply using the Iterator::next() method to get the current value, then advance the array pointer, pointing it back to the beginning if it has reached the end of the array. Without further ado, the class:


<?php

class RoundRobin implements Iterator
{
    private 
$var = array();

    public function 
__construct($array)
    {
        if (
is_array($array)) {
            
$this->var $array;
        }
    }

    public function 
rewind()
    {
        
reset($this->var);
    }

    public function 
current()
    {
        return 
current($this->var);
    }

    public function 
key()
    {
        return 
key($this->var);
    }

    
/**
     * Get the current array element, then advance the pointer
     * @return mixed
     */
    
public function next()
    {
        
$var current($this->var);
        
next($this->var);
        if(!
$this->valid()) {
            
$this->rewind();
        }
        return 
$var;
    }

    public function 
valid()
    {
        
$key key($this->var);
        return (
$key !== NULL && $key !== FALSE);
    }
}

A sample usage:


<?php

$data 
= new RoundRobin(range(1,10));
$dbStuff getLotsOfStuffFromTheDB();
foreach(
$dbStuff as $stuff) {
    
$result getSomeMoreStuff($dbStuff['foo'], $data->next());
}

Danger, Will Robinson. Don’t do this, or you’ll have an endless loop:


<?php

$data 
= new RoundRobin(range(1,10));
foreach(
$data as $foo) {
    echo 
$foo "<br />\n";
}

My Infinite Quest Is Over

Around about this time last year, I decided to tackle David Foster Wallace‘s epic (in size and scope) novel Infinite Jest. I put it aside after about 100 pages or so, realizing that I wasn’t in a situation where I could really concentrate on it, and it does demand concentration.

I started over again a couple months or so ago, finally finishing it a week ago. I am not a slow reader, though certainly not fast, either. However, I found that I could only consume IJ in fairly small doses, in the meantime reading maybe 5 or 6 other books of less, shall we say, chewiness? Various factors came into play at different times which conspired to keep me from reading more than perhaps 50 pages at a clip. Sometimes it was the subject matter: substance abuse, suicide, loneliness (perhaps the last being the central theme resulting in the first two?). At other times it might be the writing style and vernacular, which changes depending on character viewpoint and other reasons perhaps only known to the author. Also, knowing that Mr. Wallace later committed suicide, it could be depressing wondering which parts (if not all, I suppose) of the book dealing with depression and/or suicide were autobiographical.

I’m not going to bother trying to tell you the plot (which is convoluted and multifaceted to say the least) or about the characters (ditto). You can get plenty of that on the web. What I will say is that, contrary to Amazon’s blurb (“A gargantuan, mind-altering comedy about the Pursuit of Happiness in America…”), it is not a comedy. Yes, there are some funny moments, and even more instances of absurdity that may make you smile, if a bit uncomfortably. There is also drug abuse, alcohol abuse, suicide, murder, animal mutilation, and so on — not to forget the aforementioned depression and suicide. I’m not saying it’s all a downer, but there is some serious stuff going on in a lot of it. A lot of that stuff can make the receptive reader think seriously and hopefully constructively about those topics, and in a few wonderful passages this reader had some almost revelatory moments when the author threw aside all pretenses and just let fly with some beautiful prose I could not put down until I reached the end of that section. Perhaps the best example of this was somewhere around Kindle location 4000, when he started describing things you can learn in a substance-abuse halfway house, gradually shifting from specific, rather mundane things to thoughts and revelations about life, in general.

That God might regard the issue of whether you believe there’s a God or not as fairly low on his/her/its list of things s/he/it’s interested in re you.

So, where does that leave me? I’m glad I read Infinite Jest, but it’s a book that probably requires more than one reading to get a lot out of it, and I’m fairly sure I won’t be able to convince myself to read it again. I can recommend it to those who like a challenge and want to exercise their brains while reading; but I’m pretty sure it’s not the right thing for those who mainly want characters they can relate to and plots that make sense. And if you demand an ending that wraps everything up in a neat package: fuggedaboutit!

I’m ba-a-a-ack

Life got in the way of optional things like blogging for awhile. I’m going to try to start posting again on what will likely still be an irregular basis, but at least hopefully more frequently than not at all.

In order to make life a bit easier on me if perhaps a bit more confusing for you, dear reader, I have merged in the content from another blog of mine which concentrated on web development with PHP. To that end, I’ll be seeing if I can come up with a way to make it easily apparent whether a given post is about e-books and Kindles, PHP and web development, and perhaps a neither one or the other category.

Enjoy, and if you run across any broken links or missing images, please let me know.

“Under the Wire” Released for Kindle

Sigh. Looks like it’s been almost a month since my last post here: too much work and not enough reading time (along with not picking up anything I’ve really been inspired to finish). However, in a convenient coincidence, I just found out that one of the books I mentioned in my last post, Under the Wire, by William Ash and Brendan Foley, has just been released as a Kindle e-book. Better yet, it’s available via the Amazon Prime lending library, so I think I may be downloading it soon for my December “freebie”.

From the Amazon.com blurb:

The bestselling true story of an American Spitfire pilot and legendary prisoner of war escape artist.

Bill Ash went from hobo to hero as he joined up via Canada to fly Spitfires for the RAF in 1940. Shot down over France in 1942, the Resistance helped him on the run until the Gestapo caught and tortured him, then sentenced him to death as a spy. He was rescued on the eve of his execution by the Luftwaffe and put in legendary Great Escape camp Stalag Luft III. Bill thanked his captors by escaping a dozen times, over the wire with ladders, under the wire in tunnels or sometimes straight though it with home made wire cutters. Bill became one of the greatest ‘escape artists’ of the war, risking all for that elusive ‘home run’. Bill Ash was the real life ‘Cooler King’ a role portrayed by Steve McQueen in The Great Escape, but as Bill pointed out “In the real war, there was never a motorbike around when you needed one,”

Bill’s adventures took him from the United States to Canada, Britain, France, Germany, Poland and Lithuania. He was described by one reviewer as “a cross between Huck Finn and Jack Kerouak on a wild, unauthorized tour of Occupied Europe”. This e-book edition is published to celebrate Bill’s 95th birthday.

While I’m not particularly a fan of video promos for books, since it’s in the spirit of the season and for such a good memoir, here you go…

Happy birthday and Merry Christmas, Mr. Ash! (And thanks for the heads up, Mr. Foley.)

Veterans’ Day

As we approach the eleventh hour of the eleventh day of the eleventh month, I am reminded that my father would have just turned 86 yesterday if he were still alive. He joined the US Navy late in 1944, going straight from boot camp to radar school to radar school instructor, and luckily never saw any combat. This then made me realize that there probably are not a whole lot of veterans of World War II left to share their memories, and the pool will only continue to shrink. As such, I thought I might take a moment to recommend a few WW-II memoirs my readers might find interesting.

Always Faithful, by William Putney — a fascinating account of the creation of a US Marine War Dog unit and its eventual use in the invasion of Guam, told by the unit’s veterinary officer (and a man who obviously loved his canine troops). Perhaps my favorite part is the post-war section where he worked hard to return as many as possible of the (surviving) dogs back to civilian life.

Under the Wire: The World War II Adventures of a Legendary Escape Artist and “Cooler King”, by William Ash, co-written with Brendan Foley (not enKindled) — the personal account of the man who was the basis for Steve McQueen’s character in the movie “The Great Escape”. I found the early part of the book recounting his time surviving the end of The Great Depression as fascinating as the bulk of the remainder of the book recounting his military experiences, much of them as a prisoner of war.

Stuka Pilot, by Hans Rudel — Some readers may have a problem with this book in that it is never apologetic about Hitler nor the invasion of the Soviet Union. However, it is an often gripping account by a man who is considered to have been the most highly decorated member of the German military in WW-II. He was shot down over two dozen times, but just kept coming back for more (sometimes after escaping from behind enemy lines).

Company Commander, by Charles MacDonald (not enKindled) — Recounts the experiences of MacDonald as a US infantry company commander in western Europe, seeing action in the Huertgen Forest and then The Battle of the Bulge. It’s been quite some time since I read this, but I remember feeling I was in the mud and snow with him and his troops.

PS: I always use any excuse to post this image of the war dog memorial on Guam that the author of Always Faithful worked so hard to help establish:
War dog memorial on Guam

“Agency Model” pricing on the way out in Europe?

According to a report filed by Reuters, it looks like Apple and several associated e-book publishers will be agreeing to a settlement that would allow Amazon to discount e-books in Europe, ending the alleged price-fixing that prevented Amazon from undercutting Apple’s prices.

Apple and the publishers offered in September to let retailers set their own prices or discounts for a period of two years, and also to suspend “most-favored nation” contracts for five years.

Such clauses bar Simon & Schuster, News Corp. unit HarperCollins, Lagardere SCA’s Hachette Livre and Verlagsgruppe Georg von Holtzbrinck, the owner of German company Macmillan, from making deals with rival retailers to sell e-books more cheaply than Apple.

The agreements, which critics say prevent Amazon and other retailers from undercutting Apple’s charges, sparked an investigation by the European Commission in December last year.

Pearson Plc’s Penguin group, which is also under investigation, did not take part in the offer.

This seems to indicate a trend moving us away from the so-called “agency model” whereby the publisher would set the price and the retailer (e.g. Amazon) had no ability to discount the final retail price.

Hal Spacejock: Mindless But Fun

Hal Spacejock, by Simon Haynes, is a fast-paced, light-hearted romp centered around the pilot of a tramp space freighter with the unlikely title name. He falls (often literally) into one hapless and hopeless situation after another, along with assorted robotic (and about equally inept) friends while being chased by assorted do-badders with an almost equal degree of ineptitude.

While the writing is generally fine and easy to breeze through, the lack of any meat on the bones in terms of satire or some underlying theme left it feeling like empty calories to me. (Hmm…what’s up with the recent food metaphors and me?). While our Hal is not an anti-hero, he really doesn’t have any particularly redeeming features, either — other than being basically good (though not averse to breaking the law when it won’t hurt anyone else who doesn’t deserve to be hurt). With the humor being mostly slapstick or otherwise fairly sophomoric (sorry any 2nd-year high schoolers, nothing personal), it felt closer to Benny Hill or The Three Stooges than the more sophisticated satire of Douglas Adams or Terry Pratchett. Mind you: Benny Hill used to be a regular guilty pleasure of mine, though I never got into Larry, Moe, or Curly.

If you like your humor quick, easy, and cheap (it’s free right now at Amazon, anyway — presumably to suck you into the sequels), give it a shot. I, however, probably will not be partaking of any second course.

A Taste of Eastern Cuisine

I was emailed by someone representing the English editions of Chinese author Liu Cixin to see if they could send me a free e-book so that I’d review it here. The idea piqued my interest, but since his short story The Longest Fall (or is it long enough to be a novella…I’m not sure what the demarcation is) was available for free at the time, I decided to read that, instead, as a quick taste that would not have me feeling in any way beholden to them (not that I really would have, mind you).

Anyway, I found it to be quite an enjoyable little read, reminding me to some extent of Asimov in its efficient prose and explanatory dialogues, if perhaps a bit darker in tone. Of course, I don’t know how much of the style should be attributed to the translator, Holger Nahm, but I will say that he or she did what appears to be a very good job: there was maybe one or two minor glitches that looked to me like a possible mistranslation, but most of the time it seemed seamless to me; the only clues that it was originally in Chinese being most of the proper nouns and some of the political subtext.

I’m not going to waste your time talking a lot about the actual story, since you can read it yourself in about the same amount of time it will take me to write this post (probably only a slight exaggeration for the faster readers). Here’s the blurb:

It was an idea right on the thin line between madness and genius: Penetrate the Earth and build a tunnel through its core. Using nothing beyond gravity and inertia one could now travel from the eastern to the western hemisphere in less than an hour. The future of travel was not the sky, it was deep below the earth. It all came crashing down when its inventor was accused of crimes against humanity. With its creator a monster in the eyes of the world the tunnel has fallen into disuse, but now it will be used once more …

For me, it was a spicy little appetizer that has me interested in trying one of his novels as an entree. As it appears they are all available for free via the Amazon Prime lending library, I suppose I could further extend the metaphor with some crack about getting more for your money than a Chinese buffet…but I shall resist the temptation.