Test the New Isbn.nu

I've put up a beta of the new version of isbn.nu, my book price comparison site, with a new design and a whole reworking of how you search for books to get faster results. You can also create an account and then bookmark books (by title or edition) and authors for later recall, as well as set shipping and price display preferences.There's a new logo, too: Please give it a whirl and tell me what you think. I've already gotten some valuable feedback.

JavaScript Solution for Swapping Items in a List

This is very wonky, but I need to put it out on the internets, all of them, because it took me a good 20 minutes to figure this out.In revising isbn.nu (new version will soon be in beta for your viewing and testing pleasure), I have added a bookmarks option where you set up an account, and can mark books, authors, or works for later recollection. I wanted to let people re-order the items in their bookmark lists at will. And I wanted this to be live -- JavaScript (AJAX for the database backend), not a page reload. So I wrote up the code and it worked quite well, but the swapping seemed arbitrary after a couple of moves. Then I realized: I was using ID fields to swap items live, and I wasn't changing the ID of a particular row after I changed it. So, once swapped, it still had the old ID number but the new contents. Enter getElementsByTag, which lets you rename the ID of a given object in the DOM. In this case, I'm passing the swap_prefix (a name) which is combined with an underscore and an ID from a database. That defines the row. Then I swap the internals using innerHTML, and then the ID using getElementsByTagName. Behind the scenes (not shown here), all the database updating is happening. Here's the code, in case this helps someone at a future time. It requires Prototype.js, or you have to put in document.getElementById() instead of $().

var swap1 = swap_prefix + '_' + ids[1];
var swap2 = swap_prefix + '_' + ids[2];
var swapx_text = $(swap1).innerHTML;
$(swap1).innerHTML = $(swap2).innerHTML;
$(swap2).innerHTML = swapx_text;
var swap1tag = $(swap1).getElementsByTagName('div');
var swap2tag = $(swap2).getElementsByTagName('div');
swap1tag[0].parentNode.id = swap2;
swap2tag[0].parentNode.id = swap1;

Someone Finally Calls BS on Amazon's Highest Unit Sales PR

My dad forwarded me this excellent Slate article in which Timothy Noah rakes Amazon.com over the coals for their post-holiday press release in which the company claims they shipped more products on Dec. 15, their peak day, than ever before.When I first saw this release, I was incensed, because it's garbage. It's exactly the kind of press release that gives PR professionals (and the companies they work for) the reputation as hacks. Amazon is notably chary about releasing data about their operations and sales, but producing a release in which the unit volume is measured and no figures are available about dollars or margins makes them sound like a bunch of posing losers. The release came out during a slack time and Noah notes that many publications wrote about the story without questioning it. This is akin to the "bestselling car in North America" commercials, which have always led me to ask: Why do I want a car that everyone else has? Largest number of items shipped ever is the same as saying, "We don't have any significant or positive news to share about our company, so look at this shiny ball over here, while you're all distracted thinking you'll be laid off soon." Noah also points to breathless Kindle coverage, in which its sold-out status is equated to high sales. When I spoke about the Kindle in a year-end wrap-up segment for KUOW a few weeks ago, I noted that the number of titles has vastly increased, and it appears from a variety of other signs that the device is selling, but that it's impossible to know the actual sales. The Kindle has definitely provoked a lot more interest in books being delivered in electronic form, and to that measure has succeeded so far. Sony, meanwhile, which has been refining its Sony Reader electronic book, actually told the business press how many units have shipped: 300,000 since Oct. 2006. They also disclosed download volume: 3 million ebooks, not including "newspapers or blogs" as a Sony exec told the Wall Street Journal. I haven't used a Sony Reader, but I like its looks and its features better than the Kindle. It's possible the Kindle will do more to push Sony Reader sales than help Amazon. It depends how quickly Sony can respond to features people like and produce new products. The Kindle wasn't well designed to start with and is still the same model nearly 18 months later.

The Miracle of Never Accepting the Status Quo

The great miracle in the US Airways flight landing in the Hudson River and all 155 people surviving--and not just surviving, but apparently without any significant injuries determined so far--is that it validates about 70 years of constant striving in the commercial air safety world to learn from mistakes and never become complacent.The worst complacency in the face of difficulty was in the space shuttle program. Richard Feynman showed awfully conclusively that NASA had developed a thick skin about doing the impossible. Do the impossible often enough, and you assume that you cannot fail. The culture of success led to accept the result of all that hard work and ongoing vigilance as the status quo, and then built more risk on top of that. Feynman wrote in an appendix to the official Challenger disaster study report that the criteria by which safety for shuttle flights were judged non-risky enough to launch would be changed to ensure a lower probability of failure would result. "Let us make recommendations to ensure that NASA officials deal in a world of reality in understanding technological weaknesses and imperfections well enough to be actively trying to eliminate them." Amazingly, the FAA and commercial airlines, along with pilot and flight attendant unions, and Congress and the president and courts, have managed to create an environment in which there is enough knowledge of what works, and a culture of never assuming that what worked last time will work this time unless checked in the same fashion, that commercial flight has become incredibly safe. In the US Airways flight:

  • The pilot had been constantly trained and refreshed in how to land a craft with all kinds of problems, including how to ditch the craft.
  • A manual was in the flight deck that explained (in brief) how to prepare a plane for all kinds of forced landings and disasters.
  • Airbus had a ditch switch that sealed the bottom openings of the plane to keep it afloat in just this circumstance.
  • The revision a few years ago that required exit row seats to only be occupied by people who were capable of removing the exit doors was critical.
  • People in the exit rows felt deputized by sitting there, and reports are that most of them studied the aircraft card to better know how to get out.
  • People apparently have been listening all these years to those safety information videos and demonstrations, even if they think they haven't.
  • New York City was well prepared to deal with the unexpected, both public safety and the public.

You might note, too, that some of the first details coming out of the aftermath of the flight are about recovering as much data about the crash: first, to see what more can be done to prevent bird intake into engines (though quite a lot has been done), if that's the cause; second, to learn what the pilot and passengers did right to incorporate that into flight and crew training, and into passenger information. Flying is an inherently dangerous act rendered remarkably safe, with a margin of safety vastly more than anything else we do in regular life, because of the assumption that each time, every act must be carried out intentionally. More: Great quote in an AP story today from an NTSB member, Kitty Higgins: "Miracles happen because a lot of everyday things happen for years and years and years," she said. "These people knew what they were supposed to do and they did it and as a result, nobody lost their life."