My Experimental Ajax FeedReader

Disclaimer: I’m not claiming either my code or design are especially original or high quality. I just have fun teaching myself this stuff and am writing about it for my own future memory. Having said that if you’d like a copy of the code and instructions for use as is and with no support, drop me a line and I may send it back.

The idea for this Ajax feedreader came to me last week at the Google Developer Day. My code, written in PHP, takes as input an OPML file (I used a file generated by Vienna’s export subscriptions function) and puts each folder of feeds into its own tab. Separate Google FeedReader controls are instantiated for each tab but not drawn until the specific tab is clicked using MooTool’s event handling; the tab labels come from the OPML folder names. The first tab is auto-loaded.

You need three key pieces to follow along:

  • MooTools, which I’m already using for the top of page slide in menu
  • SimpleTabs by Harald Kirschner, a MooTools add-on (I may also try and integrate his HistoryManager, but it isn’t in yet)
  • Google AJAX Feeds API

The first two are open source and must be downloaded and installed, to use the last you must sign up for a (free) API key.

Note that my code has some significant limitations:

  • I didn’t work out how to constrict the width of the tab menu to the containing div so the number of tabs was whittled down to fit the space.
  • Feeds must be inside a folder, since the top level elements in the OPML file are used as the tabs–this could be corrected by testing the outline element but not something my sense of neatness needs.
  • Folders within folders are not supported for the same reason as mentioned in the previous bullet.

Consider it a permanent beta.

PHP pseudo-code:


// My own CSS for the tabs and feedcontrol is after this pseudo-code block

// MooTools, SimpleTabs and Google Feeds JavaScript and CSS files
// must be included, e.g.:
$st = "<script type="text/javascript" src="http://www.google.com/jsapi?key=YOUR-GOOGLE-API-KEY"></script>
<script type="text/javascript" src="/includes/js/mootools.v1.1.js"></script>
<script type="text/javascript" src="/includes/js/simpletabs.js"></script>
<link rel="stylesheet" type="text/css" href="/includes/css/simpletabs.css" />n";
// $dynamicJS is the JavaScript result of the PHP code below,
// so it obviously must be run before before this line
$st .= $dynamicJS;

if(!$src = simplexml_load_file("your_sub_list.opml", "SimpleXMLElement", LIBXML_NOCDATA)) die('failed to load xml');

// $jsFeedControl holds the dynamically generated JavaScript
// $t holds the HTML text
$jsFeedControl = "<script type="text/javascript">
window.addEvent('domready', function() {
new SimpleTabs($('tab-block-1'), {entrySelector: 'h4'});n";
$t = "<div id="tab-block-1">n";

// $sections is the array of top-level elements, i.e., the folders
$sections = $src->xpath('body/outline');
$first = true;
foreach($sections as $sct) {
$sa = $sct->attributes();
// the tab's label
$ot = $sa['text'];
// name of the FeedControl for this tab
$fc = str_replace(" ", "", "fc".$ot);
// SimpleTabs converts the list of <h4> elements to the menu,
// with the subsequent div the place where the FeedControl will be drawn
$t .= "<h4><div id="".$fc."_id" class="stmenu">$ot</div></h4>n<div id="".$fc."_view"></div>n";
// JS to create a FeedControl
$js = "var ".$fc." = new google.feeds.FeedControl();n";
// $af is the array of feeds in the current folder
$af = $sct->xpath('outline');
foreach($af as $a) {
$a = $a->attributes();
// JS to add the feed to the FeedControl
$js .= $fc.".addFeed('".htmlspecialchars($a['xmlUrl'])."', '".htmlspecialchars($a['text'], ENT_QUOTES)."');n";
}
// this tab's click event handler JS
$js .= "$('".$fc."_id').addEvent('click', function() {
".$fc.".draw($('".$fc."_view'));
})n";
if($first) {
// auto-load the first tab
$first = false;
$fjs = $fc.".draw($('".$fc."_view'));n";
}
$jsFeedControl .= $js;
}
$t .= "</div>n";
$jsFeedControl .= $fjs."});n</script>n";

// related CSS, some of which is needed to counteract the styles
// set for the top of page slide-in section:
.stmenu {display: inline;}

.tab-wrapper .gfc-resultsHeader, .tab-wrapper .gfc-results, .tab-wrapper .gf-result .gf-snippet, .tab-wrapper .gfc-result .gf-result .gf-author, .tab-wrapper .gfc-result, .tab-wrapper .gf-result, .tab-wrapper .gf-result .gf-title {display: block; width: auto;}
.tab-wrapper .gfc-results {background-color: #ffffff; color: #000;}
.tab-wrapper .gfc-resultsHeader .gfc-title {font: 146% bold; color: #000; background-color: #DBDBF0; margin-bottom: 0; border: none; border-top: 1px dotted #003366;}
.tab-wrapper .gf-result .gf-title a {text-decoration: underline; margin-right: 10px; color: #0000ff;}
.tab-wrapper .gfc-result .gf-result .gf-spacer, .tab-wrapper .gfc-result .gf-result .gf-author {display: none;}

Books: Kim Stanley Robinson’s Science in the Capital trilogy

The Science in the Capital trilogy is comprised of:

Kim Stanley Robinson has focused most of his novels on the impact of humanity on the environment, winning many awards for his Mars trilogy (Red Mars, Green Mars, Blue Mars) and 2002’s alt-alternate history The Years of Rice and Salt. Overall I think Science in the Capital is good writing and important reading despite suffering from unrealistic optimism as well as trilogyitis–this should have been one solid book as was Rice and Salt and the denoument more wishful than scientific thinking. Specifically, Robinson’s concern is global climate change and the political will we require to successfully deal with it.

Charlie Quibbler and Frank Vanderwal are the two point of view characters. Charlie is a high level political advisor to Phil Chase, a senator at the opening who’s elected President early in the last volume; Frank is a biologist and UC San Diego professor taking a turn at National Science Foundation headquarters, where Charlie’s wife Anna is a brilliant colleague and because of this Charlie and Frank are friends. Frank, a native Californian, is an avid outdoorsman and naturalist and through this shared avocation becomes close to Nick, the older of the Quibblers’ two young sons.

Right at the open of 40 Signs Anna meets the staff of the Khembali embassy, which has just taken space in the NSF building for offices, and thus Frank and the Quibblers befriend them. Khembali is a fictional Asian nation, sort of a proxy for Tibet, which has existed for many centuries but in different locations as events dictate. They originated in the also fictional Shangri-La but presently occupy an island in the Bay of Bengal threatened by the rising ocean level. These Buddhists have profound effects on the story’s other characters despite rarely taking direct action.

Robinson uses many things from his own life in this story: He grew up in southern Californa an avid naturalist, attended UCSD (BA and PhD), taught in the UC system, was a working stay at home dad while his wife worked in Washington, D.C., for several years and loves to play frisbee golf. (Charlie is a working stay at home dad for most of these books and Frank plays a great deal of frisbee golf.)

The author presents a sequence of increasingly severe climatological events for which Frank attempts to find scientific solutions and Charlie works the political side. Meanwhile both men have personal issues, though Charlie mainly struggles with being pulled back into an office role. Frank has serious health traumas, multiple romantic entanglements and, in the second half of the series, a spy subplot thanks to one of the women.

Frankly, I think this is where Robinson wastes pages. In 60 Days (the title refers to the first two months of the Chase Administration), for example, Frank and Charlie go off on a weeklong hike in the Sierras with a few of Charlie’s old school buddies. While the writing is beatific, this is 18 pages that are totally unnecessary, contributing nothing to the plot except to give an explicit liturgy of what we stand to lose. Each of the books have several similar segments, pleasures to read but wasteful of momentum and energy.

Finally, the ending reads like Robinson sort of threw his hands up in literary defeat. Possibly this is due to the lack of a personified antagonist but I felt that there was no climax, even allowing for the fact that climate change is a process without a definitive, er, finish line.

recommended

reCAPTCHA and email contacts

reCAPTCHA logoI came across a new project this week called reCAPTCHA that promises to deliver some social good while helping block spambots from harvesting email addresses. This project from the School of Computer Science at Carnegie Mellon University has two pieces: on-demand generation of those odd images containing letters and number one must correctly type before, say, creating an account or posting to many websites and a similar feature that blocks access to an email address by requiring the same thing be done before it’s revealed.

CAPTCHA is the geek made up acronym for those images, which are generally random strings. The reCAPTCHA project puts a community twist by getting the string from images of book image scans from the Internet Archive, so not only are our resources protected but the effort in deciphering the image also helps get more books digitized. To decrease the probability of spammer-controlled machines beating the image–real words are considered simpler to recognize by software, which is why random sets are used–users must type in two words. For accessibility support, an audio test is available as well.

On billsaysthis.com I’ve used it to link my name, towards the bottom of the right sidebar, to my email. Please give it a try and let me know if it works for you. I expect to use it in a new Ruby on Rails project that will be out soon and wherever I put an email or create resource link.

Here at Google Developer Day 2007

Unlike Yahoo, who capped participation in last year’s Hack Day at the comfortable carrying capacity of their campus, Google decided (since there’s no sleepover component) to take more folks and move to the San Jose Convention Center for GDD07. Social event for the evening is still back at the ‘Plex, wonder if they’ll match Beck?

Registration is very smooth, plenty of organized tables so no big waits–although that’s changing now as we get closer to 10–and lots of coffee, fruit and pastries for the breakfast-deprived; nice black t-shirt for everyone. I came with the Big Guy but lost him as we had to go to separate registration tables. Lots of people (1500 if everyone showed up) and many have their laptops out like me.

Big news came out of yesterday’s event Down Under, the release of Google Gears and under a sweet BSD open source license. Not surprisingly, the breakout session devoted to it is being held in the biggest room, same as the opening keynote. The impact on ‘little’ projects like Dojo Offline and Joyent Slingshot is unclear at this early point, though I expect Brad Neuberg’s baby will feel more than the Rails-specific effort from my hosting company.

(Update: I ran into Chris Messina at lunch and he said the DojoToolkit folks are here and assured him their stuff is compatible, the impact may not be that serious especially since the Offline package is a small part of their whole. In fact, Brad announced in his presentation that their own runtime is being replaced by Gears and then builds much useful horizontal functionality atop it.)

Jeff Huber, VP Engineering, lead the keynote and introduced three new products: Gears, MashupEditor and Mapplets. Gears is very neat and I’m waiting now for the breakout session to see more details. MashupEditor is a fairly high level tool that enables even non-developers to build interactive web apps, which are then hosted on Google’s own infrastructure so no need for the deployment and sysadmin skills that cause problems for, say, Rails developers. Mapplets is a combination of the existing Gadgets and Maps API products and ought to drive even deeper adoption of Google Maps on non-Google sites.

Sergei Brin gave a few minutes of welcome at the end but was a bit off. I’ve not seen him speak before but thought he would say something more meaningful and use fewer platitudes.

The Gears session was a bit disappointing, to be honest. The first section, maybe 15 minutes or so laying out the problem space and the abstract solution, was too high level and therefore not enough time was left for diving into technical details. There’s another session at 4:30 which I hope will have more of this kind of information.

Lunch was good; as one other attendee put it, the free food is a little taste of the Google lifestyle. A variety of tastes, buffet-style and with multiple tables of each set to minimize waiting in line. Among the desserts were a selection of mini-cheesecakes, two or three bites each, and very difficult to resist–so I didn’t and had two.

I attended the Ajax API sessions in the two post-lunch blocks, the first with Marc Lucovski and the latter with Marc, Dion of Ajaxian fame and several other API Googlers. Both gave me a lot of food for thought, on using things like map and calendar on the new JHTC site I’m building, and ways to improve some of my hobby sites to make them more attractive (in the sense of attracting additional visitors).

The snack break was very bad. They put out too much food and I had a brownie and a hot pretzel. Bad! Though I did run into Robert Scoble, who always attracts interesting people around him which in this case included Peter Norvig and Brad Templeton, and Scott McMullen, who I know from early JotSpot days. Of course, Scott wouldn’t tell me when the Google version of JotSpot is launching.

Robert is the featured guest for the July 10 JHTC meeting, so if you’ll be available and in the area plan on coming–it’s free!

Last session for me was Nuts and Bolts and Gears. Brad Neuberg, who looks nothing like what I expected, used half the time to explain how DojoOffline was adapting to and using this new project and was followed by an engineer from the Google Web Toolkit team to explain the same for his product (but since I don’t work on Java it didn’t mean as much for me). These guys provided a really good technical explanation on using Gears and how DojoToolkit builds substantially atop it.

I think people will quickly create PHP and Ruby on Rails wrappers for Gears as it’s clearly going to be important for web app builders who want to drive usage of their products even while disconnected from the web. Many people asked security related questions about Gears (and the Ajax APIs too, to be fair) but I think while one must always be cognizant of the threat models one should also accept that not all apps are suited to offline use. Google Reader: yes, online banking: probably not.

Overall a really good day, plenty of inspiration and education, and a very good job from the Google staff in prepping and execution. Good assortment of speakers and topics, facilities well set up, plenty of food and drink, few long lines for anything and more than enough t-shirts to go around. Though, poor me, I missed out on the SketchUp socks.

Book: The Woods

The 2007 release from the pen of Harlan Coben, this is a standalone story and, while set in the same mileau and sharing a few secondary characters, not part of the Myron Bolitar series. Mainly that means one key character, the now chief investigator of the Essex County DA’s office Loren Muse, and cameos from the likes Cingle Shaker and Hester Prim plus being set in the same geography.

The Woods focuses on the newly-appointed Essex DA, Paul Copeland, a young single father (his beloved wife died of cancer a few years before this opens) and the eruption of another family tragedy from his youth. Unlike several of Harlan’s novels, Copeland is never really a suspect in the murders that occur in the story’s present but he is called upon to help solve them, plus find the truth of that earlier crime, to save his life and heal some gaping emotional wounds.

Coben has clearly hit his stride as an author with this, his 14th novel, and readers seem to agree as its been on the NY Times hardcover fiction bestseller list for four weeks now and Promise Me, his 2006 release, also spent several weeks on the paperback list after its recent debut.

I ate it up, finishing the whole book in big gulp on our return flight from New Jersey last week. Harlan really understands how to constantly set up plot traps, large and small, right to the end so that the readers are continually attempting to figure things out rather than coasting along with stretches of exposition. This is actually a key difference, for me, between mysteries and science fiction as mysteries should have very little explaining and ought to deliver the few required as active dialog or terse flashbacks.

Copeland’s one flaw as a character for me, shared among many of Coben’s protagonists, is an unbelievably deep love for his or her family. Don’t get me wrong, I love TS1, my parents, sister and her family and believe that family is incredibly important, but there is a line of how much an author ought to convey in this regard and Harlan generally goes well beyond it. The rationale for this is not clear to me and may simply reflect how he truly feels since much of his writing closely follows the “write what you know maxim” but I’d still like to see him tone it down. Having said that, it’s more like one of those positive negatives interview coaches urge us to prepare.

definitely recommended

AC Milan 1 – Herbert Fandel 1 – Liverpool 1

Did Liverpool lose the Champions League today? Not unless amateur refereeing, headlined by Herbert Fandel, is the legitimate standard in this ultimate level of European club football. The first goal for the Rossoneri, just before half time, clearly came off the arm of Pippo Inzaghi yet was allowed to stand; even ESPN’s Tommy Smith called it as the second coming of Maradona’s Hand of God score in the ’86 World Cup. And the German whistlebearer seemed to think every foul was on a red shirt, even when Gennaro Gattuso bundled under Harry Kewell after Kewell took possession, and he held off our last sub for nearly five minutes despite numerous stoppages when Arbeloa could have come on.

The Reds certainly had enough chances to score and went wide, high or soft and Milan made the most of the few which came their way. I have to question Rafa Benitez’s decision to hold Peter Crouch until the 75th minute because our attack was completely different once the tall boy was in.

All in all, a good season for Liverpool Football Club. Third place in the Premier League and runners up in the Champions League by the skin of a bad officiating crew. The new American owners have promised a big stack of money for bringing in new players and I hope the squad will be big enough to challenge for both titles again next year.

Book: Glasshouse

Set centuries after the events of his amazing novel Accelerando, Charlie Stross’s Glasshouse is an attempt to deal with the issues of identity and self when technology has divorced the essence of individuality from any specific physical form. The Singularity of that story is so far in the past that individuals who remain recognizably human have chosen to forgo the option of ascending to that higher plane of existence, for the most part, and thus remain emotionally understandable to us.

Stross is, for my money, one of the stronger writers assessing the impact of technological trends, as illustrated by a recent talk he gave to a corporate audience. In this novel he posits that one’s mentality (for lack of a better, non-spiritual term) can move between nearly any imaginable type of body or other processor-capable object (humanish or not, of either gender or none at all), be copied and simultaneously occupy many different objects and then re-merge those instances back into one or be scanned and instantaneously shipped to a distant star system through a wormhole and re-instantiated in physical form; further, sophisticated surgeon-confessors are able to deftly excise specific memories. In such a context, how does one answer the question “Who are you?”

Robin/Reeve, our protagonist, has done a lot of living in the more than 200 years (or seven or eight gigasecs, since this star-spanning culture measures time in large groups of seconds rather than days, months or years) since being born. Most recently he was a soldier for an army battling an unknown but omnipresent enemy that used a computer worm called Curious Yellow to corrupt the network of gates that underlie the galactic polity and destroy the single, uber-Libertarian minimalist government that organized human space. For most of his enlistment Robin was a battalion of tanks (see the previous paragraph) but reverted to orthohuman form (what you and I think of as normal) and joined the intelligence group just before his side won.

What did winning mean, though? The perpetrators of the worm were unknown and remained so to a large degree even after defeat. The Linebarger Cats, Robin’s army, won by capturing or destroying a significant majority of the infected gates, replacing them and shipping every human through the clean ones. But the worm was, as you’d expect, quite capable of forcing the infected people to fight on its behalf so the war was extremely bloody and traumatic. Robin, even after memory surgery to remove the worst of it, is still in need of therapy to recover and signs up to participate in an experimental polity that offers hope of just that.

He wakes up ‘inside’ as Reeve, a petite female, having undergone further surgery that deleted his memory of choosing to switch genders and deciding to go in to a Truman-show like recreation of the late 20th Century. And she is not very happy, especially when her cohort of ten new citizens are told to divide up–immediately–into male/female pairs. Leaving things until a bit late, her choice of mates is reduced to a quiet man called Sam.

You see, the years from 1950 through 2040 are (at the time of Glasshouse) considered a dark age, dark in the sense that very little knowledge remains of the period when humanity went from the steam engine to the Singlarity. Records were lost due to inefficient, incompatible storage mechanisms and so society’s understanding of its formation has vanished. Three scholars, Doctors Yourdon, Fiore and Hanta, have proposed this experiment as an attempt to recreate the lost knowledge.

If it were that simple, the novel would more than likely have been trivial and unworthy of Stross’ talent, so of course that’s not it at all. Robin’s military past is very much a part of why he volunteered, as is Curious Yellow. And Charlie, despite dropping dazzling sci-fi tech left and right (lesser authors would have milked this for a bloated trilogy), focuses on the emotional battle of Reeve, Sam and a few others against the three experimentalists.

definitely recommended

Back from Jersey

TS1 and I flew out for a long weekend to visit my parents, and my sister and brother-in-law brought my now two year old nephew Jake from their Long Island manse. Very enjoyable time, not long enough of course, and the boy is something else. So blond, friendly and nearly unlimited energy; fortunately, unlike last year’s visit neither he nor my mom were sick. I should have a photo or two soon, once my sister sends them along.

Jake is old enough now to have a small, barely understandable vocabulary but he quickly picked up on calling us Uncle Bill and Aunt Viv. Hearing that was a real rush! Trying to keep up with him as he ran around the house backyard, ha!, that was another story. You’d think going to the gym and such would have made it less taxing; big props to my sister and Larry for doing it every day.

While there I expanded my use of MooTools by updating my gallery page class (click any on the list page to see) to use Sam Birch’s Lightbox for managing the image display and some code from MooTools Gallery to generate thumbnails as needed. Because of my less than stellar graphics skills, the gallery thumbnails may look squished but I’m working on it.

The trip home was not one of the best, though. When we got through security and checked the departures board, though, our flight had been delayed an hour; let’s just say Newark/Liberty International Airport is not my idea of a place to sit and wait, especially since they don’t provide free WiFi. We got jammed in the takeoff queue thanks to the change and lost another half hour waiting for our turn at the runway. The flight itself was a bit on the rough side but something I ate earlier in the day must have really disagreed with me as my stomach felt like an angry goblin was inside, poking me with its claws; I am not good with pain.

We walked halfway around SFO after claiming our bag looking for the SuperShuttle pickup point courtesy of crap signage, only to find that the company decided to jam eight people into one van. Not super-thin people either, and when I complained to the driver he laughed–not mailiciously, I’m sure, more from a combination of nerves and inability to do anything about it. Of course the driver is a (recent?) immigrant from eastern Asia with poor English speaking and comprehension skills and driving ability to match. TS1 and I agreed that on future trips of five days or less we are driving ourselves and using the longterm parking.

Midnight California time we finally got in the door here and got a brief second wind to handle a bit of necessary immediate unpacking before extremely welcome collapse in our own bed. I love seeing my family, not being able to do so more often is the one bad thing about living on the other side of the country from them, but sleeping in your own bed is, as the commercials say, priceless.

Missed the 1 May deadline, but a reboot is now in place

There’s a web designer tradition, or vogue, that one should freshen up one’s website each May Day and though I’m neither a web designer nor a follower of fashion I do enjoy using this site as a learning environment. So if you’re reading this post from the RSS feed or on some other aggregator/content stealing site please click through to see what I’m writing about here.

There are three changes in the new design:

  1. The main navigation element has been pulled out of the right side column into a top of the page horizontal menu.
  2. The right side column has been significantly simplified. In fact, if it wasn’t for the $100 check from Google every six months or so I’d probably remove the column completely and go with a one column layout.
  3. Clicking the top menu link next to Movies labeled Latest slides open a list of the five most recent entries in my movie blog.

This last item was inspired by a similar, albeit more substantial content-filled, implementation at Lather Rinse Repeat (click the image that says Click Me at the top of the page), which came to my attention via the redoubtable web celeb mathowie.

Previously I used the Yahoo User Interface Library to deliver the last 5 block, using its very nice Panel widget and Event utility but some months ago I started having problems with retrieving and processing the movie blog RSS feed. After experimenting with many different open source RSS libraries in both PHP and JavaScript and several different JavaScript user interface libraries, the solution was the very new Google FeedControl and the MooTools JavaScript library.

Since I am more of an enlightened amateur than a professional programmer these days most of the difficulty was surely due to my skill level rather than any shortcomings in the various libraries I was unable to make work for this small implementation. Even now I don’t really think the code does precisely what I’d like, mostly due to the FeedControl delivering each RSS item as a separate and complex set of divs, but it does appear to work on OS X and Windows, and on Internet Explorer, Firefox and Safari.

If you see any problems or nits I should fix, drop me a line. Or just to give me your two cents on the new layout, I always enjoy hearing from people who read this site.

Book: Bad Boy Brawly Brown

This is another of Walter Mosley’s Easy Rawlins mystery novels, set in early 1964 just three months after A Little Yellow Dog. Mouse is presumed deceased but still on Easy’s mind as there was no funeral nor even a definitively dead body, Bonnie has moved in with him, Jesus and Feather and, sure enough, the cops and white folks in general have him under pressure.

In Bad Boy Brawly Brown, Rawlins’ long time friend John the bartender and John’s new wife Ava ask him to find Ava’s son Brawly Brown. The boy’s had a difficult 23 years, further handicapped by an inability to control his temper and a body built to deal out hurt, and seems to have fallen in with a very bad crowd. Sure enough we learn right away that Brawly’s a member of the First Men, a group of black radicals that appear to be a precursor to the Black Panther Party.

No sooner does Easy see the boy walk in to a (regular, weeknight) public meeting at the First Men’s storefront headquarters when an LAPD flying squad crash in, leading with their nightsticks. Easy helps Brown’s girlfriend escape and they jump into a car with Brown and another radical.

Meanwhile, there’s trouble at home too. Mainly adjustment pains to living with a woman who truly loves him but his teenage son is having problems at school that need attention and a creative solution.

Mosley shows how the environment is changing, or at least starting to change. The First Men are group that couldn’t have existed 10 years before and while Rawlins has no choice but to deal with the LAPD, he’s able to create some maneuvering space to protect his own community a bit. Not as much as he’d like but more than the cops expected.

recommended

PS: Try saying the title five times fast!

Four wonderful years

While I might not have made mention of crossing the 46 line last week, this is a milestone that needs bragging on. Four years ago tonight Vivian made me happier than I could expect by marrying me in front of our family and close friends. Life outside our home has had its ups and down but never intruded into our relationship, only strengthening our bond and commitment.

Thanks Sweetie, and here’s to 40 400 more years of love!

A Really Worthwhile Energy Protest

Every few months the semi-farcical email calling for a one day boycott of buying gasoline gets sent around again. You know, the one which says if only all American Internet users, all “73,000,00+” of them, don’t buy gas that one day then the gas companies will lose about $3 billion in revenue and surely get the message that we’re fed up with high prices.

This is so wrong on so many levels but let’s just hit a few highlights:

  • Gas is not, generally speaking, a luxury item like dinner out or a team jersey; people only buy as much as they need and use. So not buying on one particular day only means filling up early or later and thus the net revenue is the same for the gas companies.
  • Since people working at gas companies are among the 73M American Internet users and therefore as likely as anyone else to get this email they might use the information to raise pump prices a day or two before, drop them on the day of the protest and raise them again the day after. Just to show consumers who really has the hammer.
  • By the law of large numbers, not everyone would need to fill up on any given day and so only about 1/7th of cars would be filled up on the boycott day in any case, say 10.5 million. Further reducing the numbers, by an admittedly much smaller amount, is that not all Internet users own cars; I would argue that the proportion is smaller for this group than the general population since more Internet users live in cities or are still in school. Let’s say 10%, getting us down to about 9.5 million and the hypothetical revenue loss to $300 million even though, as previously mentioned, this is only an illusionary loss and a drop in the bucket compared to total annual revenues (which were, in 2001, just for US gas stations, $158 billion).

So what can we, as fed-up consumers, do that will have actual, meaningful effect?

  1. For starters, use less gas. Seriously! Most people think cars need to be warmed up for a few minutes before driving but that hasn’t been true for many years thanks to better engine technology, so here’s one easy way to save a gallon or so every month or two. When you stop at a major traffic light, one where you’re likely to be waiting over 60 seconds for a green, shift into neutral. Plan your regular shopping to minimize the route–and take your own bags for bringing home the groceries, since petroleum is a key ingredient in plastic and transporting them to stores uses gas too. Realize that every second less you have a car engine running is one second more we have left for later.
  2. Buy a hybrid next time you get a new car and support groups like CalCars that are trying to work around the major automakers.
  3. Make your opinion heard. Call or fax your congressperson and senators (don’t email, apparently those are mostly ignored). Call or write the CEO’s office at the major gas companies and tell them what you think. Call or write the CEO’s office at the major automakers and tell them what you think. Try and be polite, I suppose. Maybe get several friends and family members to sign your letters. Send a copy to your local newspaper or the consumer reporter at your local TV station’s news team.
  4. Buy and use fewer things. I know, this is a terrible suggestion in our capitalist, materialist society but every good bought uses some amount of resources to manufacture and transport. Reuse where possible, use energy consuming goods less where possible–turn off lights and TVs today so you can see and watch tomorrow.

I’m sure you can add to this list. Feel free to send me your ideas or post them on your own blog, and to pass this list around too.

Spooky Strange Sightings

In the last week I’ve come across two people I used to be very close with but haven’t seen or spoken with in over a decade. Both instances were strange, one breathtakingly so.

About this time last week I googled some names in this category, people with whom I’ve had no contact in quite some time. One, who was my best friend from high school until my relocation to the Bay Area, was mentioned in a news article for doing something very distasteful; no need to go into details but adding to the strangeness was that another acquaintance (albeit someone I was never particularly friendly with) was leading the effort that swept my former pal up.

If you think I’m being purposely obtuse you’re spot on. The activity involved blew my mind; this is someone I spent time with in person or on the phone nearly every day for the 17 years of our friendship and even now thinking back on those days not one instance comes to mind that could be construed as a hint or clue. Nothing even remotely close.

The other incident was much less dark. After getting lost, something that happens to me constantly in Cupertino for some reason, I was late for a doctor’s appointment and had to kill two hours waiting for an open slot. Think about how many times you’ve sat waiting for a doctor running late and you’ll understand I was a bit peeved since there was at least 10 minutes until the next appointment.

Anyway, I went around the corner to kill the time at a Starbucks. Reading Iain M. Banks’ short story collection The State of the Art was enjoyable but I’m an inveterate people watcher and popped my head up each time the door opened. After more than an hour even Banks had a tough time keeping my attention and then a woman came in the door that had me looking not twice but three times.

While there are plenty of very attractive women in the area and not a few at this coffee shop but I kept my head up until this one came into view again not because she was particularly attractive (not that she isn’t, but it isn’t relevant here) but because she’s my ex-wife. Who I’ve not seen since early 1997 despite our working in the same industry and living in the same general area. Heck, she worked at Sun before me and our tenures overlapped a couple of months but we never were in so much as the same meeting.

I’m not 100% sure about either incident but if a money bet was involved I’d wager both were who they appeared to be to me.

Rematch 23 May

AC Milan were comprehensive tonight in defeating Manchester United 3-0 to set up a rerun of the 2005 Champions League final against my beloved Liverpool. The Rossoneri were never really threatened and Dida was in his form of old the few times his goal was threatened, with the peerless Kaka leading an attack the injury-depleted Red Devil back line couldn’t contain.

Kaka, a resurgent Clarence Seedorf and late substitute Alberto Gilardino had the goals. Seedorf and Gennaro Gattuso had control of the midfield and neither Michael Carrick nor Darren Fletcher were able to start any offense for the visitors, who had to start three second choice defenders while the lone regular starter, Nemanja Vidic, was not really recovered from a broken collarbone. Sir Alex Ferguson’s eight year cycle of European glory came to an end (Cup Winners Cups in 1983 and 1991 and 1999’s Champions League portion of that year’s historic treble).

Milan have six European crowns to Liverpool’s five and will surely be looking to remove the stink of their collapse two years ago, giving up a 3-0 half time lead in the first 15 minutes of the second half and then losing on penalty kicks; their coach Carlo Ancelloti will try once again to become the first man to win European titles with four different teams. And in an odd bit of geographic rivalry, this year’s title will be decided in Athens.

Go Reds!

REDS RULE!!!

After nearly overcoming the one goal down from last Wednesday in regular time the Reds battened down the hatches through 30 minutes of extra time to defeat Chelsea on penalty kicks 4-1. For the third straight year the team has gone all the way to the end and won by being better at the spot, and for the third straight year has beaten the Blues in the semi-final round of a major cup competition.

Their opponent will be decided tomorrow at the San Siro in Milan. Manchester United bring a 3-2 advantage from the first leg but with two away goals and back line injury issues for the Red Devils AC Milan has a decent chance to meet up with Liverpool in a rematch of the 2005 final (which was one of those three PK winners). Or else an all-English final, on distant, neutral ground.

Today was a nailbiter but Chelsea honestly barely got into any honest attacking until deep into the second half. The winning goal was from the foot of center back Daniel Agger in the 22nd minute off a sly free kick by Captain Stevie, Agger getting just a tiny bit of curl from a left footer with a couple of blue shirts screening Peter Cech from having view of the ball. Dirk Kuyt almost got a second goal twice, once hitting the crossbar and the other ruled offside as the Dutchman was leaning across the last defender.

Pepe Reina was the hero at the end as the Reds pulled into a defensive shell for pretty much the entire extra 30 minutes and then stopping Arjen Robben and Geremi while Cech made no stops at all to Bolo Zenden, Xavi Alonso, Gerrard and Kuyt. Sweet, so sweet!

The last three days have seen the end of Roman Abramovich and Jose Mourinho’s quadruple dream, no Champions League and Kevin Davis’s last second equalizer for Bolton Saturday meaning the defending Premiership champs will need to beat Man United next Wednesday and pray for help from lowly West Ham and Manchester City to have a chance at a threepeat. They also need a win over the Red Devils to bring back the FA Cup, and at this point Sir Alex Ferguson seems more likely to be holding three trophies at the end of the month than the Special One.

Except Rafa Benitez is going to have the win in Athens, Liverpool’s sixth time as European kings, so SAF will need to settle for two 😉

Spring/Summer TV Returns and Premieres

Returns, not reruns, of series I’m interested in (for a more complete list check in regularly at the futon critic):

  • Rescue Me: June 12
  • The 4400: June 17
  • Burn Notice: June 28 (USA, lead character is a forcibly retired CIA agent)
  • Dr. Who: July 6
  • Eureka: July 10
  • Monk: July 13
  • Flash Gordon: Aug. 10 (Sci-Fi Channel)
  • The Wire: September (my estimate)
  • Dexter: Sep. 30
  • South Park: Oct. 3

Sometime this summer on BBC America:

  • Life on Mars
  • Wire in the Blood
  • MI-5 (Moving over from A&E)
  • Torchwood (Dr. Who spinoff)

Silver lining from Oakland truck fire?

The stories so far are mainly about the disruption to Bay Area traffic and whether repairs will take weeks or months but I wonder if repairing the 80/580 interchange is the right thing to do. Regional public transportation agencies are making travel tomorrow free and significantly increasing capacity to accommodate people leaving their cars home for the day.

Gov. Schwarzenegger is in the area tonight, announcing he’s declared a disaster so that emergency funds will be available and normal contracting rules suspended to speed repairs. He’ll even ask the Bushinator to add federal emergency status and money.

But wouldn’t the better answer be to clean up the mess but leave the roads unrepaired? Let’s use this as a means to get hundreds or thousands of cars carrying only a single person back and forth off the road five days a week and increase the very low public transit ridership numbers. Heck, maybe the incident can be leveraged to get commuters in other parts of the Bay Area not directly affected onto trains and buses too.

I know, I know, I’m dreaming. Would be nice though, especially in this allegedly eco-aware region.

Fun with Vista

A co-worker got a new laptop, a generic Asian brand, which came with Windows Vista pre-installed. Inside he found a photocopied sheet that says:

“ATTENTION, During the first boot of Windows Vista please allow for 15 to 30 minutes for the booting procedure to finish. You MUST NOT shutdown the system by force in any one of the following stages (screenshots), otherwise it may result in irrecoverable errors.”

Have I mentioned lately how happy I am to not be running Windows? I actually had to install VMWare Fusion last week and WinXP on top of it, something that has not given me any real joy but necessary to test web pages on IE6.

Book: Harry Potter and the Half Blood Prince

I know, this book has been out for so long, how did I not already read it? Oops. Still, I will say that JK Rowling has improved her writing considerably from the very first book and seems to have gotten past the “too good for even the slightest of editing” egotism that bloated several of the middle volumes. Even though this one runs to just under 700 pages, far fewer of them are wasted and there’s very little thrown in magic that shows her cool imagination without advancing plot.

Harry Potter and the Half Blood Prince is the next to last book in the series and the war with Voldemort is out in the open. After what happened in Order of the Phoenix (I read this but for some reason didn’t write it up) no one in the Wizarding community doubts He Who Must Not Be Named is back and aiming to complete the takeover Baby Potter blocked him from finishing 15 years before.

This is the first of a two parter, I think, which is fine. Rowling has set up many threads and a great deal of depth; she hasn’t forgotten the little touches that are so popular with readers either, like Quidditch—Harry is captain of the Gryffindor team, a responsibility of which he’s proud and happy to take at first but weighs him down as other events require his attention—and various magic class lessons.

In fact the latter is the source of the book’s title. Not expecting to take Potions this term Harry and Ron didn’t buy the textbook and new Potions professor Slughorn lends them copies from the classroom until their’s arrive (Snapes has finally gotten his desire to teach Defense Against Darks Arts). Harry’s borrowed copy is filled with notes from a previous owner, the self-styled Half Blood Prince, which he uses despite Hermione’s frequent protests. The identity of the student, be warned, is not revealed until very late, something which TS1 seemed unhappy about when she read HBP but I thought was a good effect.

Harry has little choice at this stage except to throw off what little remains of his childhood. Rowling gives us a bit of a model for him in Fred and George Weasley; the brothers have left Hogswart a year early and parlayed their love of joke magic into a thriving Diagon Alley shop. Potter is also forced to deal on an adult level with Professor Slughorn and Dumbledore, and his conflict with Malfoy simmers in the background. We also get a peek at Voldemort’s biography and understand why he became so evil—to some degree, Tom Riddle becomes much more human and sympathetic though there’s no question he must be defeated.

If you thought I’d say anything more about the story, sorry, but I hate giving spoilers no matter how long a book or movie has been out. We are definitely looking forward to Harry Potter and the Deathly Hallows in a few months and will certainly get to it very soon after publication to avoid seeing the inevitable spoilers others are no so considerate about posting.

recommended