Wednesday, June 29, 2005

Book review: Hat Full Of Sky, Terry Pratchett

Last year at this time I mentioned to Mr. Pratchett that I was ready for another of his youth books. It took him until now to deliver; at least the paperback version, which I paid my $7 for. (BTW, my book trading site is gone now. I don't think they managed to build a community. Social software post another day!) The further adventures of Tiffany Aching are available, and it's quite a good book. Tiffany, now 11, goes off her home land to be apprenticed to a witch, but unbeknownst to her she is being tracked by a mysterious being who wants to eat her soul!

Boy, that summary makes it sound kind of iffy, doesn't it? It really isn't. The Nac Mac Feegle are back and as feisty as ever, although I think their dialect is significantly easier to understand than in the earlier books. I'm guessing you can't make major characters out of folks no one can understand. Tiffany's interactions with the other apprentices are nicely done, and Granny Weatherwax is fascinating as the other characters now talk about her the way she once spoke of Black Aliss Demurrage. Tiffany's progress as a witch is brought forth nicely, and Rob Anybody really comes across as a personality rather than a caricature like most of the Mac Feegle.

The ending is a bit nicey-nice, which I suppose is appropriate for a book theoretically targeted at younger readers. To me it came across a bit like when one of the great villains of all time, Darth Vader, decided he was really a nice guy after all and was redeemed in a single swoop. C'mon now, bad folks are a lot more fun when they're bad, now aren't they? The Mac Feegle queen was a bit wishy-washy too, and I didn't really buy into her mood swings. Finally, the climax of the book takes place at something called the Witch Trials, which appears to be sort of a renaissance festival for witches. Odd, but again maybe appropriate for the younger reader.

And for all of that, it's classic Pratchett and you can't complain. Most comedy writers, take Piers Anthony or Douglas Adams, get steadily sillier as they reach the later books in a series and have to try to wring one more gag out of the same scenario. But the great ones, like Pratchett and Wodehouse, just keep on kicking out one or two new terrific stories every year. This is one of those. Read it.

Wednesday, June 22, 2005

Living in the blurbs

Doug Jonstone comments on blurbs. (link from the idiosyncratic mind.) I'm intrigued by the correspondences between old-fashioned marketing and blurbs. As Doug says,

when such effusive hyperbole declares everything "brilliant", "superb" and "amazing" it all ceases to mean anything

which is more or less the problem with marketing - that is, the lack of credibility of the source. Are you going to read a book because it says "A real tour de force!" on the back, or are you going to read it because your buddy says it's pretty good? I would be a lot more likely to read a book if it was making the rounds in the blogosphere than for any other reason. So I guess book publishers are another on the list of people who need to learn to make blogs work for them. I know there are a few publisher-bloggers - wonder how effectively they use them to push books?

JetBrains onBoard Online Magazine :: Language Oriented Programming: The Next Programming Paradigm

The Next Programming Paradigm? I suppose it could be. Personally I'm not even completely comfortable with Test Driven Development yet.

Wednesday, June 15, 2005

VBS week

Getting Vacation Bible School organized has been taking all my time this week - when I haven't been doing that I've been stress-reading crime novels. So I have about six books on my list of reviews to write, but I doubt I'll do anything before next Sunday, the closing ceremony. I've been getting up at 5 in order to get to Indianapolis, put in a full day's work, and drive back again by 5:15 so I can pick up kids who need rides. So I'm pretty beat :) After VBS is done I'm just not going to know what to do with all my free time!

Saturday, June 11, 2005

So you wanna be a programmer?

Hazygrin links to Joel saying he agrees that you should start learning programming at a level as close to the metal as possible, i.e., C. I disagree, and I suspect that generally the people who are in this camp are the people who learned C first. (I'm not one of those; I learned Pascal before C, although a one-credit course in college in C might have been the most valuable class I ever took, practically speaking.)

Joel's alternate suggestion is a straw man, of course. No, obviously learning HTML or copy-and-pasting Javascripts is not quite the ideal learning experience. But I see absolutely nothing holy about C as being just exactly the right level to learn at, and I firmly disagree that learning the technical details about why strings are hard to manage is important for a beginner. That may be the single reason that more people aren't interested in programming, which is a shame considering the myriad of good string implementations that are out there.

But if you must get fairly close to the machine, why not start with a managed language? Being able to move from Java or C# to byte code is going to get you a long way to understanding how your source code is translated to something the machine understands, without having to really bury yourself under a load of machine code manuals.

I would replace this recommendation with Stroustrup's The C++ Programming Language, 3rd edition, which replaces all the stuff about byte copying with good object-oriented design. Going all the way back to C is, to my mind, no more necessary to a programmer starting out today than a recipe for bread has to start with "Grind down enough wheat to produce three cups of flour..."

Sunday, June 05, 2005

Book review: A Great Deliverance, Elizabeth George

I bought this first-of-the-series based on a newspaper review of the last. I'm a big fan of Elizabeth Peters' Amelia Peabody novels, and from the article I thought that it might be a similar sort of book. I was pretty much, well, wrong. About the only similarity is that Amelia and Thomas Lynley are well-off and English. Nevertheless, a good read. Lynley and sidekick Barbara Havers, members of Scotland Yard, have been sent off to York to investigate a teenager found near her father's decapitated body. As they investigate the possibility that she was not the murderer, they both have to come to terms with their own pasts, which they see reflected among the many dysfunctional characters that wander across the stage: the obligatory horrible American tourists, the drunken artist in love with the older, lonely spinster, the family man with the nympho wife who use their fights as an excuse for making up. But the murdered man's family wins the prize for "most dysfunctional", as they seem to be in the habit of simply wandering off and never being heard from again. As Lynley and Havers put the pieces together, they come to a gruesome conclusion that is not at all suitable for the genteel reader of Elizabeth Peters!

Luckily, my stomach is a little stronger than that. But I don't think I'll put this one on my wife's reading list.

Thursday, June 02, 2005

"It seems more complicated now"

A lot of programmers still believe in procedural programming even if they use an object-oriented language like C++ or C#. When you eliminate duplicate code, you can do it quite often by taking a big long procedure and replacing it with some objects. Consider this code:

for (i = 0; i<things.count; ++i)
{
Initialize( thing[i] );
}

for (i = 0; i<things.count; ++i)
{
Continue( thing[i] );
}

for (i = 0; i<things.count; ++i)
{
Finish( thing[i] );
}

There is clearly duplicate code here. Three times we run a loop over things. You can't just refactor all three calls into one loop, since the processing of the latter loops might depend on the first loop being finished.

So how do we remove the duplication? Let's create an abstract object, AThingProcessor, and use it to do all of the looping:

class AThingProcessor
{
void Run()
{
for (i = 0; i<things.count; ++i)
{
ProcessThing( thing[i] );
}
}

abstract void ProcessThing( thing t );
}

Now we can replace each loop with an instance of a class, for example:

class Initializor : AThingProcessor
{
virtual void ProcessThing( thing t )
{
Initialize(t);
}
}

And now the original code can be replaced with:

new Initializor().Run();
new Continuor().Run();
new Finisher().Run();

So what is the result? Our original code is now much more object-oriented and flexible. But without knowing the definitions of Initializor, Continuor, and Finisher, you don't know exactly what is happening here. The result is, some programmers will look at this code and say "It seems more complicated now". But it really isn't. It's just more object-oriented.

SCI-NUG

Hey, look what I found! Had no idea this group existed. Wonder if any of them blog?