Tuesday, January 6, 2009

Was This Thing Programmed in England?

One of the side-effects of ubiquitous cell phones is that parents have become Ground Control when their kids head off on road trips. If you're a parent of a teen, or a twenty-something for that matter, you know all about this--the phone rings, and it's the fruit of your loins (or a friend thereof), calling from the middle of nowhere and asking how to get somewhere else. Of course, you are expected to figure out just where in the middle of nowhere said offspring are, and then plot a route to the desired destination. And you do, because you're a Parent and that's what Parents do, even if your "kids" are now grown-up and married and living in another country.

In the search for an uninterrupted night's sleep, many parents have looked for the technological fix, buying the kid a global positioning system (GPS), complete with turn-by-turn directions. But even technology can't solve all problems, as a friend of mine reports.

Seems his son was up in the hinterlands of Wisconsin, following the directions of his GPS, when it suddenly demanded that he make a left turn onto a road marked with a very clear "DO NOT ENTER" sign. He wanted to know whether he should obey the GPS or the sign. Now, at this point I could pause for a dissertation on how the kid's confusion over which to obey is a symptom of how we're becoming Tools of our Toys, but for now I'll put that tirade on hold. I want instead to consider just where the kid was when he got mixed up. Seems he was approaching a diamond-style interchange between the state highway he was on and a limited-access divided highway. Something like the one at right:

He's coming in from the west (which is the left side of the picture) and wants to end up going north on the four-lane. But when the GPS is demanding (quite insistently, or so he says) that he turn left at the first ramp--in other words, it's telling him to go north on the southbound off-ramp, into the southbound lane of the highway.

Which got me to thinking: why would the GPS want to send him down the wrong ramp into the wrong lane in the wrong direction? Is it just stupid? Is it in fact telling him to take the northbound on-ramp that's the other side of the bridge? (To this last, I have the answer: no; the GPS wants him to go north on the southbound ramp. We know this because once he passed the ramp, it started re-plotting his route.) Could it be that the GPS was programmed in England, where people drive on the left side of the road? Or, for that matter, China, where people also drive on the left side, and where most of the consumer electronics in the world are currently being made?

Or, perhaps, reality is even stranger. When the kid got to the other side of the bridge, the GPS again started telling him to turn left, this time onto the northbound on-ramp. This leads to the rather frightening speculation that the GPS really has no concept of which way traffic goes on a road. Which would make sense--the software's really just seeing lines connecting dots, and plotting a minimum-distance path between them. Which is why, on occasion, GPS units tell people to turn onto the wrong line--for instance a railroad track, as in this New York Times story. Or, as in this story from Germany, into a portable toilet. Who knows; maybe the "P" in GPS stands for something other than "positioning"?

Sunday, January 4, 2009

Blast from the Past!

The Buell Motorcycle Company celebrated its twenty-fifth anniversary this summer, and as part of the celebration their house organ, Fuell, printed a special retrospective issue with a silver cover and lots of pictures and such from the company's history. Including, on the third page, this picture from the 1987 motorcycle show in Rosemont, Illinois. Erik Buell, founder, head designer, president, chief cook and bottle-washer, is on the left, in that nifty (but vaguely out-of-place at a motorcycle show) business suit, explaining the virtues of his new RR1000 motorcycle. (For those who don't know, the RR1000 was a serious sporty-bike, propelled by the short-lived but powerful XR1000 Harley engine. It's one of the slipperiest motorcycles ever released to the public, and just a few years ago one of these twenty-year-old machines, with a newer engine, set a Land Speed Record at Bonneville.)

But who's that guy next to him, the furball in the Sturgis shirt, clutching a poster and a four-dollar cup of Budweiser? Yep, it's me. I'd bought my first Harley about four years earlier, and was by now up to four of them (two Sportsters, both of which I still had, and two FXRT Sport Glides, one of which I'd gotten through the peculiar combination of near-terminal poison ivy and Lamaze classes, but that's another story), and what drew me to chat with Erik was more his involvement in the project that first developed the FXRT. We talked a bit about the Sport Glide, particularly the rather lousy saddlebag latches that were on the first couple years of the bike. Erik gamely tried to redirect the conversation to his new bike, and eventually I was willing to listen to that, too.

As much as I liked the bike, I wasn't willing to buy one. It wasn't the $16,000 price tag as much as it was the dead-end motor (the XR1000 engine was a one-shot project at HD; the future was in the new 1100cc all-aluminum Evolution motor) and the fact that the bike lacked a lot of features I'd need to go touring, such as a passenger seat and luggage. Of course it lacked these things; it was, after all, more of a street-legal road racer, a bike optimized for going around corners very fast. Which was true... but when you live outside Chicago, going around corners fast means you either set up your bike for touring or buy a trailer, because the nearest place with roads even remotely worthy of this bike is more than a hundred miles away. And I don't like trailers. So, as I recall, before I finally shook his hand and headed off for another overpriced beer, I told him "give it the new motor, a passenger seat and some luggage, and I'll buy one."

Eight years later, he took me up on that offer by bringing out the S2T Thunderbolt... which I also didn't buy (though I sort of wish I had, preferably in that bright metallic purple they called "Parkway Blue"). Instead, almost exactly nine years after the Rosemont motorcycle show where I first met Erik, I bought a '96 S1 Lightning... a bike which had no passenger seat (heck, even the rider seat was best described as a "one-cheek wonder") and no luggage. And I took it touring. But that's another story, too.

Wednesday, December 17, 2008

Another Source of Instant Gratification!

If you've been slavering to read The Last Protector, but have been determined to do so on your Sony e-book Reader, slaver no longer! Just hop on over to the Instant Gratification section of the Last Protector page, and there you'll find a link to the Sony e-book Store site. Or, if your need is too urgent to click through two links, just CLICK RIGHT HERE. Thrills, adventure, romance, and the world's strongest hair spray are just seconds away!

Tuesday, December 16, 2008

NaNoWriMo, One More Time...

I went to the end-of-the-event "thank goodness it's over" party for National Novel Writing Month (the Naperville chapter of it, anyway) over the weekend, and picked up a couple more small insights into the ways in which NaNoWriMo reminds me of software projects I'd worked on (I've written two previous posts on the subject; you can read them here and here).

First, I heard from a few people that I'm wrong to assume they start with a blank piece of paper on November 1 and just start writing like mad. Many, it seems, plan for one or two months (some longer than that). They sketch out characters and setting, come up with plot, maybe even outline the whole book so that they're all ready to start hammering out words when the month officially begins. Hmm. At this point NaNo begins to look a lot like the coding step of a software project done under an old-fashioned waterfall model, doesn't it?

Let's look at this for a moment: some forty years ago, Fred Brooks observed that coding accounts for perhaps one-fourth to one-sixth the total effort in a software project. Another quarter-to-third is taken in design and architecture (if the project's being done well), and as much as a half is spent testing and bug-fixing. So, if somebody spends two months before NaNoWriMo planning and outlining (that is, designing), and three months afterward editing (testing and fixing), then producing an actual book that's ready to submit for publication should take about six months. Of course, most NaNo participants admit to banishing all other activities during the month of November, so it might be more accurate to say they get two months' worth of work (at a more "normal" level of activity) done during the NaNo event, which would suggest an overall book cycle of two months planning, two months (at a normal pace) writing the draft, and four to six months for editing and fixing.

So what? Well, probably nothing in the case of NaNoWriMo, as people are just doing this for their own amusement. But perhaps it is a symptom of a human behavior that shows up in projects as well: the tendency to see "the project" as only the stage where something countable is being made, and thereby underestimate its overall size. NaNoWriMo, like the coding stage of a software project, is the part of the iceberg that's above the surface. Perhaps that's why so few NaNo books have made it into print: when participants finish the month of writing and see how much work remains, they just quietly give up. Rather like software projects that get into unit test, only to find out how much work actually remains, and quietly fade away.

Then again, perhaps so many NaNo novels don't ever get through editing simply because their authors aren't interested in editing. Peruse the NaNoWriMo forums, and you'll see a lot of messages in which people are already planning or counting down to next November, already talking about the next novel they're going to write. Rather like people I knew who liked to write code, but didn't particularly like to do design, architecture or testing. Go figure.

So, what's the point? I'm not sure. David Schmaltz thinks I've got enough here for another article, but so far all I've got is a series of observations, particularly observations of similarity. Where's the aha!, the insight, the point? Stay tuned...

Thursday, December 11, 2008

The World Turned Upside Down

Some things in life you just expect will never change. The sun comes up in the east, goes down in the west. Spring follows winter. The Cubs fold in September, and the Bears drive the length of the field, only to stall out on the four-yard line.

And in political scandals, my brother's observation holds: Republicans get into trouble over money and power, while Democrats get into trouble over sex. 'Twas ever thus. Bill Clinton's dalliances in the White House led to his impeachment; George Ryan's bribe-taking landed him in the Big House. Gary Hart's run for the presidency ended aboard the good ship Monkey Business; Richard Nixon's presidency ended with the Watergate break-in.

Of course, there have been a few signs things are getting out of whack--Republican Larry Craig got into a spot of trouble in an airport men's room, while Democrat William Jefferson was found with ninety thousand bucks he shouldn't have had. But Craig didn't actually do anything more than tap his feet the wrong way in the presence of an undercover cop (word to the wise: do not turn on your iPod while in a public restroom), and Jefferson's ninety grand were stashed in a freezer, of all things (a pro like Jack Abramoff would have had that money safely stashed in the Cayman Islands). These could be seen as aberrations, the exceptions that proved the rule. And anyway, the Natural Order of Things quickly reasserted itself as Democrat Eliot Spitzer had to resign as governor of New York after being caught hiring prostitutes, and Republican Ted Stevens was convicted of taking bribes. Ah, reassuring normality...

But now, along comes Ill-Annoy governor Rod Blow-dry-o-vich, he of the expensive hair and more-expensive daily commute, upsetting the natural order of things with a bribery scandal that makes George Ryan look like a Boy Scout. What gives? Is this nominal Democrat really a Republican at heart? Or has the world really turned upside down?

NaNoWriMo, Revisited

Two whole weeks have now elapsed since I "won" National Novel Writing Month by convincing the automated word counters that I had composed 51,000 alphabetic strings separated by blanks and punctuation. A couple posts down, I compared the NaNoWriMo process to some software projects I've seen (not necessarily successful ones), particularly the emphasis on producing quantity, the intentional avoidance of testing and fixing (that is, re-reading and editing), and the assumption that the quality can be put in later.

Since then, I've had a couple more thoughts about the process. First, I found that I am going to have to do a major restructuring of my NaNoWriMo book if I want to whip it into publishable shape. I organized the major objects (that is, the scenes and chapters) in a more or less chronological order, so the point of view flips around. However, this gives a lot of stuff away too early, and makes it hard to see the characters develop. So I'm probably going to rearrange things, so that the story is told entirely from one character's point of view up through the point where everybody's in the same place together. Then, if I can make it work, I'll go back and catch up the essentials from the other characters' points of view. Hey, if Tolkein could make it work in Lord of the Rings...

Software people have a word for this: refactoring. You've got the right collection of interacting objects, but they're arranged incorrectly. Re-arrange them, adjust the interactions, reorganize the stuff so that it works the way you want it to.

I'm still stuck on the idea that it ought to be possible to write the 50,000 words of NaNoWriMo without simply ignoring quality, though. This leads me to wonder if I could apply the principles of agile software development to a book-writing sprint. The relevant concepts are these:
  • You build incrementally. Each new addition represents a meaningful new "story."
  • At all times, the thing you've built is functional. In the case of software, this means that you always have a working system; each addition simply extends the set of things it'll do. In the case of growing a novel, it means (I think) that you start with a simple story or scene, which is a complete tale in itself, but which grows in the telling.
  • You test continually. Each new feature is accompanied by tests to assure that all the old stuff still works. I think for a high-speed novel, this would require working in teams--I read yours while you read mine, every day.
I have no idea whether this would work, but I think it'd be interesting to try. And it gives me an excuse to attempt NaNoWriMo next year...

Monday, December 1, 2008

How Do Vampires Eat? Depends...

Between substitute teaching in a high school (at the time the movie Twilight hit the screen) and doing National Novel Writing Month, I've been exposed to a lot of chatter about vampires lately. I think the movie's number one at the box office this week and it seemed as if something like half the NaNoWriMo books involved them in one form or another. People seem to have a romantic attachment to the old bloodsuckers (oddly enough, they don't have the same attachment to leeches, which are arguably more useful than the undead).

I've never been quite as enamored of vampires as characters. For one thing, the physics always baffled me: how can a 150-pound human turn into a 200-pound wolf and then into a three-ounce bat? There's this little thing called the law of conservation of mass. Well, Andrew Fox dealt with this question in his most entertaining book Fat White Vampire Blues. I'm not going to give away the secret, but I will say it's a very satisfying resolution of the physics question.

But now, courtesy of NPR's Science Friday show, we've got a new problem in vampire engineering: fluid flow. According to biology professor and author Bill Schutt, blood is a pretty thin soup--almost entirely water, with a little bit of salt and protein, and no fat at all. Which means that vampire bats (and other creatures that live on blood) have to consume a lot of it. Which in turn means they have to get rid of a lot of water--if Dracula empties his victim's veins, he's going to ingest a gallon of water, which is about four times what an average person excretes in a day. No kidney stones for the undead, I guess, but a major disposal problem. According to Schutt, vampire bats solve this problem by simultaneously feeding and peeing. Well, doesn't that add a little something to the romantic vampire mystique?

However, I've never seen a vampire movie (or read a vampire book) in which the undead unzip before dining, so the question arises: do vampires just possess the world's largest bladders? Or are they all secretly going around in those NASA diapers, the ones that hold a full day's worth of urine?

The answer to that question is, of course... depends.