Photo for Glenn Fleishman



What I Do



Turning technology from mumbo-jumbo into rich tasty gumbo

« December 2008 | Main | February 2009 »

January 22, 2009

Test the New

By Glenn Fleishman

I’ve put up a beta of the new version of, 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.

Posted by Glennf at 4:50 PM

January 20, 2009

JavaScript Solution for Swapping Items in a List

By Glenn Fleishman

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 (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] = swap2;
swap2tag[0] = swap1;

Posted by Glennf at 12:09 PM

January 19, 2009

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

By Glenn Fleishman

My dad forwarded me this excellent Slate article in which Timothy Noah rakes 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.

Posted by Glennf at 9:59 AM | Comments (1)

January 17, 2009

The Miracle of Never Accepting the Status Quo

By Glenn Fleishman

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:

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.”

Posted by Glennf at 1:25 PM


October 2011
Sun Mon Tue Wed Thu Fri Sat
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          

Recent Entries


October 2011 | August 2011 | June 2011 | May 2011 | February 2011 | December 2010 | November 2010 | October 2010 | September 2010 | August 2010 | July 2010 | June 2010 | May 2010 | April 2010 | January 2010 | December 2009 | November 2009 | October 2009 | September 2009 | August 2009 | July 2009 | May 2009 | April 2009 | March 2009 | February 2009 | January 2009 | December 2008 | November 2008 | October 2008 | September 2008 | August 2008 | July 2008 | June 2008 | May 2008 | April 2008 | March 2008 | February 2008 | January 2008 | December 2007 | November 2007 | October 2007 | September 2007 | August 2007 | July 2007 | June 2007 | May 2007 | April 2007 | March 2007 | February 2007 | January 2007 | December 2006 | November 2006 | October 2006 | September 2006 | August 2006 | July 2006 | June 2006 | May 2006 | April 2006 | March 2006 | February 2006 | January 2006 | December 2005 | November 2005 | October 2005 | September 2005 | August 2005 | July 2005 | June 2005 | May 2005 | April 2005 | March 2005 | February 2005 | January 2005 | December 2004 | November 2004 | October 2004 | September 2004 | August 2004 | July 2004 | June 2004 | May 2004 | April 2004 | March 2004 | February 2004 | January 2004 | December 2003 | November 2003 | October 2003 | September 2003 | August 2003 | July 2003 | June 2003 | May 2003 | April 2003 | March 2003 | February 2003 | January 2003 | December 2002 | November 2002 | October 2002 | September 2002 | August 2002 | July 2002 | June 2002 | May 2002 | April 2002 | March 2002 | February 2002 | January 2002 | December 2001 | November 2001 | October 2001 |

Powered by Movable Type 3.33