JUL 23
The other day, while waiting for my train home, I spent the idle minutes reading the fare information sign at the station. Portland's public transportation uses a three-zone system with different ticket prices depending on how far you travel.

Due to reasons unknown to me (but undoubtedly involving politics and gerrymandering), when the light rail was extended to Hillsboro several years ago, everything west of the zoo was put into zone 3. There are no zone 2 stops between the last stop on the west side (Sunset transit center) and the zoo stop halfway through the west-side tunnel (which is in zone 1).

What this means is that anybody buying a ticket out in Hillsboro is going to need either a one-zone ticket or a three-zone ticket. There are no possible destinations from Hillsboro that would require a two-zone ticket.

However, the ticket machines at these stops only sell two- and three-zone tickets! I hope there's some other explanation, but it certainly seems like Tri-met is ripping people off. The amount is small (the one-zone ticket is only five cents cheaper), but the principle of over-charging is the same nonetheless.

I need to purchase a three-zone ticket anyway so this doesn't affect me directly. But I am curious as to why such a blatant error/oversight persists.

tags: portland tri-met max ripoff
permalink | | technorati
JUL 22
A very interesting post on the mathematics behind fuel efficiency calculations: Miles per Gallon vs. Gallons per Mile
permalink | | technorati
JUL 16
Where the Hell is Matt: Guy dances all around the world. Brought a big smile to my face. (Thanks Steve for the forward!)
tags: humor video
permalink | | technorati
JUL 14
Back when we designed the security for Wireless USB, one of the attacks we protected against was the man-in-the-middle attack. From a product marketing perspective, this was one of the hardest features to get agreement on because it requires the end user to perform a manual verification step.

Many people think that manual verification hurts usability unnecessarily since, in their eyes, MITM attacks are very difficult to do. Their reasoning is as follows: It's extremely unlikely that an attacker would be present at the exact moment in space and time when the end user performs the security pairing. Therefore we really don't need MITM protection.

However, the more paranoid members of our team correctly pointed out that it would be trivial for an attacker to simply jam the transmission of one of the devices. The connection would then stop working. When faced with this situation, most users "reboot" the devices and perform the pairing ritual again.

We ended up including fairly robust protection against MITM attacks. Which is a good thing, since a recent article discusses how easy it is to force a Bluetooth device to dump its pairing data and initiate the rekeying process. This attacks the protocol directly and is even easier to accomplish than the denial-of-service-type jamming attack that we were concerned with.

tags: security wireless bluetooth
permalink | | technorati
JUL 2
I finally found a decent Exposé clone for Vista: Switcher. Yes, Mac people, no need to leave a comment about how this is built-in to Macs. I already know it's an awesome feature. That's why I want it in Vista. I'm not sure why Microsoft didn't build this feature in themselves, but Switcher seems to do the job. Of course, if anybody knows of something better, I'd love to hear about it.
tags: software
permalink | | technorati
JUL 1
The Illusionist **** : Is there room in the world for two prestidigitation movies that were released almost simultaneously? It appears so. While not as good as the Prestige, this movie is beautifully filmed, has great acting from Edward Norton, and is worthy in its own right.
tags: movie-reviews
permalink | | technorati
JUN 27
Three more reasons I prefer PostgreSQL over MySQL:

First: MySQL only supports constants in default clauses. In other words, this is forbidden:

 create table times ( time1 datetime default now(), time2 datetime default now() );

Things are even more complicated when you look into why MySQL has the very confusing situation of a datetime type and a timestamp type. And, in my opinion, the MySQL documentation on the subject is poorly formatted, at least in comparison to PostgreSQL's documentation.

Second: MySQL date/time fields don't support microsecond resolution! Aye-yah. Yet another feature that needs to be handled in application code when it really belongs in the database.

Third: The MySQL time zone support seems very clunky to the point where it's easier just to store everything as GMT and handle conversions at the application layer.

PostgreSQL handles all of these issues no problem.

tags: mysql-woes
permalink | | technorati
JUN 15
Kurt turned me on to Bikely, a sweet bike route mapping site. It has a great user interface, provides an elegant Google Maps mashup, offers elevation profiles, and can print out turn-by-turn directions (cue sheets). Here's an example, the Portland Century route.

Up until now, the venerable gmaps-pedometer had been my favorite way of conveying this information, but I'm switching to Bikely! It has a few areas for improvement (such as its search) but development seems active so I'm sure they'll get resolved.

tags: cycling cool-sites
permalink | | technorati
JUN 15
Three Cups of Tea ***** Very important book that everybody needs to read. Guy gets lost after climbing K2. Pakistani village nurses him to health. He pledges to build them a school, starting life-long mission to build schools for girls in Pakistan and Afghanistan. By the end of the book, I was convinced that this is the only long-term solution to stopping terrorism.
tags: book-reviews nonfiction
permalink | | technorati
JUN 13
One of my favorite new sites is SlimTimer. It's the best time tracker for tasks that I've found, either as a online Web 2.0-ish service or an offline installable application. SlimTimer offers a basic mode for free and premium services for a small fee.

I am hooked after using it for a couple of months. When I free up some project time, I am going to contact the author and see if he is interested in some collaboration opportunities. One thing I could help out with is a Windows Vista sidebar companion gadget.

tags: cool-sites
permalink | | technorati
JUN 7
After reading a glowing review from Wired, I finally got around to signing up for an Amazon Web Services account and playing around with Amazon EC2. It's cool!

At first, I didn't understand what exactly EC2 was. The Amazon promotional material could be a little more clear in this area. It's a virtual machine (what I refer to as a slice, Amazon calls it an instance) that is billed out by the hour (real world time, not CPU-used time). It has an impressive set of client command-line tools that let you control your slices from any Windows or Linux box on the Internet. Everything uses public key cryptography.

To get started, Amazon has an online forum that offers free, pre-configured instances. They have all of the Linux flavors, Solaris, OpenBSD, etc. I found a slimmed down version of Gentoo enabled with PHP and Apache2 and was up and running in under 5 minutes.

Another cool concept that Amazon has is the ability to purchase IP addresses and them route them to any machine on the EC2 network. Amazon calls this concept "elastic IP addresses". All of your instances run with private IP addresses on the Amazon network. For them to be accessible to the outside world, you use the client tools to connect your public IP address with the private one. One of the obvious advantages of doing this is that it makes it extremely easy to re-route your traffic to a different instance any time you want with zero DNS downtime.

Getting back to instances, they are ephemeral in the sense that when you shut them down, they are gone forever. I figured this out the hard way when I configured an instance to serve up a custom web page, shut it down, and then started it back up again and discovered that my changes were gone. If you want to preserve any changes you made to the pre-configured image, you need to store them on Amazon S3. Luckily, Amazon provides tools to make this very easy to do.

In addition to getting up and running very quickly with minimal capital, AWS provides essentially unlimited scaling. Read this blog post about Animoto's launch of their Facebook app for a case study. SmugMug is another good case study.

One interesting facet of Amazon's web services offerings is the ecosystem that's starting to build up around them. Look at RightScale as one example of a company offering value-added services to AWS.

All in all, a very impressive offering: compute, storage, queue, database, and (with third-party help) scaling. Everything you need to launch whatever you want to.

But you do pay for everything: Instance time, data transferred in/out of AWS, storage. I estimate the minimum monthly cost of a basic instance at around $100. Still dirt cheap compared to buying your own equipment for colo, but not as cheap as Slicehost or some of the other VPS vendors (around $20 including quite a bit of bandwidth and a fair amount of storage).

Interested in starting your own EC2 instance? These may help: link1, link2

Next up on my to-investigate list: Google App Engine.

tags: cloud-computing amazon
permalink | | technorati
JUN 4
I finally made the upgrade to Firefox 3. The speed enhancements are incredible - it screams! Other notable improvements include an incredibly improved address bar (it's very Apple-Spotlight-inspired), a very nice new download manager, and some significant usability enhancements to the add-on manager. MozillaLinks has a thorough review of the changes.

Unfortunately, like all Firefox upgrades, there are quite a few of my favorite add-ons that are no longer compatible. Hopefully they will be updated soon, because now that I've used FF3 for a few days, there's no going back now!

tags: firefox
permalink | | technorati
JUN 4
Charity Navigator just released their report on the fundraising efficiency of the top 30 metropolitan areas. Portland was ranked 26th - doh!
tags: charity
permalink | | technorati
JUN 2
From CNN online video: Man biked 42-mile work commute every day in May - each way!
tags: cycling
permalink | | technorati
JUN 1
Anchorman ** : A little too zany for me.
tags: movie-reviews
permalink | | technorati
MAY 29
I picked up a Navigon 2100 GPS for $120 off of bensbargains.net last month. This is the least expensive GPS that I know of that will read the street names to you. Other low-cost models just say "turn right", "turn left", etc. Some online reviews said that the Navigon has a slow user interface, but I didn't think it was bad at all.

Two unique Navigon features are lifetime free map updates and an awesome highway interchange mode that makes it easy to determine which lane you should be in. It also has an excellent three-dimensional "reality view" which is extremely intuitive.

This unit pretty much does everything that I would want a GPS to do. Some more points of interest would be nice, but at this price point, I really can't complain! Highly recommended if you are in the market for a GPS unit for your car.

Update: Oops, my bad. Turns out the Navigon doesn't have free map updates after all. It does have free software updates, but probably most of the other GPS manufacturers offer that also.

tags: product-reviews gps navigon
permalink | | technorati
MAY 28
You want to print to PDF and you don't want to mess with ad-supported drivers with pop-ups and you don't want to pay for Acrobat from Adobe? (Or you're like me and you did pay for Acrobat, but the overly aggressive licensing server keeps deactivating your product?) BullZip PDF is the answer.
tags: software
permalink | | technorati
MAY 26
The Mexican *** : Better than I expected!
tags: movie-reviews
permalink | | technorati
MAY 21
I was given a Trek Pro bicycle saddle bag as a gift about a year ago. This past weekend, the zipper on the bag broke. I emailed Trek customer support and was told that the warranty expires after a year and that I was out of luck!

Trek's bicycle warranties are great, but I'd recommend against buying any of their accessories due to this very poor warranty policy. Other companies (like SunLite Cycling Gear) have lifetime warranty on all of their products. Either that, or buy the Trek stuff at REI so you can return it when it breaks :)

tags: product-reviews bicycle
permalink | | technorati
MAY 19
I rode the Reach the Beach ride on Saturday with my friend Pär. We did the 100-mile route, which started in Portland and ended at Pacific City. We got going around 7:45am and the first 60 miles went down easily. Most of that was with Pär in the lead and me drafting. After Amity, the heat started to get to me and I bonked for a 10-mile segment. The last 25 miles got a lot easier, especially as we cleared the coastal range and the cool ocean air revitalized us. We arrived at the beach around 4:00pm (6.5 hours ride time), did a quick dip in the ocean to cool off, had dinner, and headed back home.

Overall, a very well-organized event. I would definitely ride it again (although I should probably do a little more pre-training next time). This ride was an eye-opener for me that the Seattle-to-Portland ride is less than two months away. I really need to up my training game if I'm going to make it in one day.

tags: cycling
permalink | | technorati
MAY 12
Subtle Knife **** Sequel to the Golden Compass. Quantum mechanics (many-worlds theory) in a children's novel!
tags: book-reviews fiction
permalink | | technorati
APR 25
Color of Magic **** Quirky fun. First Discworld book. There are over 30 books in this series... eep!
tags: book-reviews fantasy
permalink | | technorati
APR 25
I went to the Banff Mountain Film Festival last night at the Bagdad Theater.

We saw shorts on kite snowboarding in Finland ("Entropy"), crazy mountain biking in British Columbia ("Trial and Error"), rock climbing in England, and ice climbing in abandoned Swedish mines. The feature was a documentary called "20 Seconds of Joy" on a Norwegian woman's addiction to base jumping.

Although quite long at almost an hour, I thought "20 Seconds" was an excellent insight into adrenaline addiction. The other films were fine, but I missed the fun-loving/humorous element from previous festivals (anybody remember the rock climbing dog?).

I wish the Banff folks would find a way to publish an annual DVD series so we could see more of the submissions! One night is not enough...

permalink | | technorati
APR 20
Good Earth **** Simple yet enticing story of rural life in pre-revolutionary China.
tags: book-reviews fiction
permalink | | technorati
APR 14
If you ever find yourself locked out of your Windows XP box due to a forgotten password, and if you haven't enabled EFS, and if you have physical access to the machine, then Offline NT Password Editor will let you edit or clear away that pesky Administrator password in no time flat. I burned the CD, rebooted, and within 2 minutes I was logged in to the box.

I always knew this was possible, but I was surprised by just how easy it was.

This is probably a good time to extol the virtues of encrypting your data...

permalink | | technorati
APR 10
Next *** : Great job by Nicholas Cage (as usual), fun action movie, strange ending.
tags: movie-reviews
permalink | | technorati
APR 7
Lost World *** : Jurassic Park Part 2. Standard Chrichton, well written, nothing extraordinary, good read.
tags: book-reviews fiction
permalink | | technorati
MAR 22
Pastebin - collaborative debugging tool. Cool idea for sharing source code and other whitespace-sensitive files.
permalink | | technorati
MAR 15
This is a pretty good ad from the London city government on bicycle safety: Awareness Test
tags: links
permalink | | technorati
MAR 15
Stranger Than Fiction *** : Great concept, but something didn't quite connect for me in this love story.
tags: movie-reviews
permalink | | technorati
MAR 4
I've decided to go for Seattle to Portland in one day this year. It's 202 miles. That's about 60 miles more than I've ever biked in a day. But hopefully with a lot of drafting from the pace line, I should be able to make it!

Unfortunately, I'm already falling behind the recommended training schedule...

tags: cycling
permalink | | technorati
MAR 2
Golden Compass ***** : Well written, inventive, engaging, and bound to annoy a lot of people!
tags: book-reviews fiction fantasy
permalink | | technorati
MAR 2
Ultraviolet ** : Nicely filmed scifi but cardboard plot. See Equilibrium instead.
tags: movie-reviews
permalink | | technorati
FEB 26
Norton Fighter vs. Botlas - part one and part two. Great example of viral marketing from Norton... Definitely check out part two: "Akihabara nerd attack! Akihabara maid attack!" Priceless!!
tags: humor viral-marketing youtube
permalink | | technorati
FEB 24
Recently, to save money and conserve natural resources, our condo association decided to stop sending paper statements for monthly dues. Most people in our association use bill pay to automatically pay their monthly dues, but a few people still wanted a monthly reminder to send in their payment.

We use Yahoo Groups for our condo messages, so I checked there to see if it had something that could do the job. Yahoo Groups does offer a "monthly periodic e-mail feature", but it is fatally flawed in two ways. First, it doesn't appear to work. Second, it doesn't let you specify when the message will be sent.

Fearing that I might have to write something up myself to solve this problem, I first started searching around for a solution. I was pleasantly surprised to find Letter Me Later. It's great! Perfect solution, very configurable, yet still easy to use. Check it out if you ever find yourself needing an automated e-mail scheduling service!


tags: links cool-sites
permalink | | technorati
FEB 20
Indexing a Career: A Career Path in Pictures: Dilbert meets 3x5 index cards. Very creative.
tags: humor
permalink | | technorati
FEB 20
Sushi Economy ***** : Fascinating tale of Japan, sushi, economics, global trade, and one of the world's most expensive and shortest-shelf-lived commodities, bluefin tuna.
tags: book-reviews nonfiction economics japan
permalink | | technorati
FEB 14
Dell's DisplayPort Folly: Good PCWorld article that pretty much sums up my own thoughts on DisplayPort, which can be pithily summarized as: Why?!
tags: prognostications technology
permalink | | technorati
FEB 12
I have to tip my hat to United for their customer service system. My travel agent (American Express) screwed up my seat assignments and I had to call United to get them fixed. I called United's customer support number and after picking up, an automated voice immediately said, "Is this Preston or somebody calling on behalf of Preston?" Obviously they've added some sort of caller ID capability to their system. It was great. Within 15 seconds I was speaking with a customer service representative without having to punch in any personal information. Great job, United! This is how it should be done.
tags: united
permalink | | technorati
FEB 10
I spent a lot of time in 2006 and 2007 working on the WiMedia Logical Link Layer Control Protocol specification (WLP spec for short). Publishing a specification like WLP is a lot like filing a patent. You do a lot of the work early on, and then the actual publishing process takes a really long time. It's almost anti-climatic when it does finally get published.

In any event, it's available on the WiMedia web site if you're interested (unfortunately there is a click-through license agreement that you must fill out to read the spec). I worked on the security sections, sections 6.6 and 7.2 and annexes A and C.

tags: me-on-the-web wireless specifications
permalink | | technorati
FEB 1
A Thousand Splendid Suns ***** : Important book about the plight of women in Afghanistan before, during, and after the Taliban. Same excellent writing and style as the Kite Runner, but while that book had hope to balance its sadness, this book has much less and is thus that much grimmer.
tags: book-reviews
permalink | | technorati
FEB 1
The Quiet Earth * : Man wakes up, discovers he is the last human on earth. Starts out cool, bombs out pretty fast. I can't believe all of the people on IMDB who gave it a 7.1 average rating!

The Prestige ***** : Highly confusing but ultimately very rewarding film. Told in reverse, Memento-style. A second viewing is revealing and enjoyable.

tags: movie-reviews
permalink | | technorati
JAN 23
My various web sites, such as prestonhunt.com, Trainster, and Nagbot, have gone through many distinct phases with respect to Javascript:

Phase 1, the original sites: Static content only.

Phase 2, not long after phase 1: Script-generated (usually Perl) static content on my home machine, pushed by cron job to my web host. Still no Javascript.

Phase 3, about five years ago: As little Javascript as possible, but heavy reliance on server-side scripting such as CGI, Perl, and PHP. I used to feel that Javascript support in browsers was too inconsistent to be used effectively. Then Google Mail and Google Maps came along and showed everybody how things should be done.

Phase 4, about two years ago: Not wanting to become locked in to a particular toolset, I eschewed Javascript frameworks like Prototype. I coded all Javascript myself. This was often a laborious task given the lack of good debugging tools and also the infuriating inconsistencies between browsers (of which IE6 is far and away the worst offender).

Phase 5, about one year ago: Finally bit the bullet and adopted the Prototype framework. Life got a lot easier, but Prototype itself doesn't do all of the Ajaxy things that I like to do (like auto-complete-as-you-type, light boxes, fade effects, and so on). So I started layering different libraries, including Scriptaculous and MooTools.

Phase 6, about two months ago: I've found religion, and its name is JQuery. JQuery's elegance is so beautiful that it almost makes me want to cry. The documentation is outstanding. And it encourages community support through plugins, which quickly become indispensable -- stuff like auto completion, rounded corners, table sorters, tooltips, calendars, etc. And because the plugins are all based on the common JQuery foundation, they usually play nicely with each other. I'll be posting soon about how JQuery has made life much easier for me. In the meantime, I'm busily migrating all of my sites to it.

Related links: Why JQuery's Philosophy is Better, JQuery - Javascript that doesn't suck!

tags: webdesign programming
permalink | | technorati
JAN 21
The Chamber ** : Reads fine, Grisham is a competent writer, but no fireworks. Flawed by too many 180 degree shifts in character personality throughout the story.
tags: book-reviews fiction vacation-reads
permalink | | technorati
JAN 20
Better ***** : From one of my favorite New Yorker authors, Atul Gawande. Excellent essays on health care, including malpractice, cystic fibrosis, obstetrics, third world health care, and more.
tags: book-reviews nonfiction medicine
permalink | | technorati
JAN 16
Continuing the tradition from the last two years:

My 2007 in cities (in approximate chronological order):

  • Las Vegas
  • Jackson Hole, Wyoming
  • Palo Alto, California
  • Barcelona, Spain
  • Brussels, Belgium
  • Hannover, Germany
  • Beijing
  • Waterloo, Canada
  • Toronto
  • Montreal
  • Los Angeles
  • Bend, Oregon
  • Government Camp, Oregon
  • Smith Rock, Oregon
  • San Francisco
  • Amsterdam
  • Scottsdale, Arizona
  • San Jose, Costa Rica (*)
  • Agujitas, Costa Rica
  • Monteverde, Costa Rica
  • Fortuna, Costa Rica
  • Montezuma, Costa Rica
  • Howey-in-the-Hills, Florida
  • Palm Beach, Florida
  • Jacksonville, Florida

One or more nights spent in each place. Cities marked with * were visited multiple times on non-consecutive days.
tags: year-in-cities
permalink | | technorati
JAN 12
Stardust ***** : I loved the movie, and the book is even better! Beautiful, mellifluous writing and gorgeous accompanying illustrations. One of Neal Gaiman's best works.
tags: book-reviews fantasy fiction vacation-reads
permalink | | technorati
JAN 12
I've finally gotten with the times and ditched CVS in favor of Mercurial for many of my active projects. I have to say, it's pretty nice.

One feature I really like is the ability to make local commits to a repository and then ship out all of the changes at once to other users (or to a central repository) in a single changeset.

Another cool feature is being able to rollback mistakes. And having an automatic repository wide id with each commit eliminates the need to tag all the time like in CVS.

This presentation at Google from a Mercurial developer is very good. Also, this talk from Linus on his revision control software, git, is good at explaining why you should upgrade if you are still using CVS or SVN. I wish I had switched a lot sooner.

Here's another good piece on git vs. Mercurial vs. SVN.

tags: programming source-control
permalink | | technorati
JAN 7
Venus Prime 1 *** : Better than I expected and an enjoyable end to my sci-fi reading blitzkrieg while on vacation in Costa Rica.

To Sail Beyond the Sunset ** : Heinlein is either a genius provocateur or just a dirty old man. Either way, this book didn't take for me.

Revolt in 2100 *** : Classic Heinlein space opera pulp fiction. Overly simplistic and unrealistic solutions to social problems, but it's fun reading.


tags: book-reviews science-fiction vacation-reads
permalink | | technorati
JAN 4
A Scanner Darkly ***** : Awesomely crazy movie. Could it have been filmed as anything but a cartoon?

Boondock Saints **** : Willem Dafoe shines in this zany retribution movie.

Man on Fire *** : Denzel does a nice job in this kidnap-thriller-whodunit based in Mexico City.

tags: movie-reviews
permalink | | technorati
JAN 3
I wanted to write a script to find out everybody who emailed me last year (by accessing my IMAP server). Since I am on a Python binge lately, I decided to write it in Python. Unfortunately, Python's imaplib documentation is a little short on examples.

After much experimentation, I finally figured it out:

import getpass, imaplib

M = imaplib.IMAP4_SSL( 'localhost' ) M.login(getpass.getuser(), getpass.getpass()) M.select( "INBOX.GmailMirror" )

typ, data = M.search( None, '(SENTSINCE "1-Jan-2007")' ) for num in data[0].split(): typ, data = M.uid( 'FETCH', num, '(BODY[HEADER.FIELDS(FROM)])' ) try: print data[0][1].strip() except TypeError: print data

M.close() M.logout()


tags: python code imap email
permalink | | technorati
DEC 28
2007
Google Chart API: It's incredible. Great example of a web service that fills a very useful need, is really simple to use (but would be hard to implement yourself), and produces beautiful results. Does Google have to single-handedly do everything to make the web a better place?!
tags: google
permalink | | technorati
DEC 24
2007
The web site koenvangorp.be has some sweet pictures of star trails. I especially like the first one, Orion in Grand Champ. It's great to see empirical verification of the "theoretical" cosmological facts we are taught, such as the earth's tilt, the elliptical nature of the solar system, our position in the Milky Way, and polar versus equatorial orbit of satellites.

Speaking of astronomy, Mars is in opposition right now, which means that it is as bright as it is going to get for 26 months. Go outside on a clear night and take a look!

tags: astronomy photography
permalink | | technorati
DEC 15
2007
Last month, I had a debate with my friend J.S. about China's increasing role in polluting the world. For the purposes of this discussion, we focused solely on electric power consumption. Since most electric power is generated by coal plants, the consumption of electricity is directly proportional to greenhouse gas emissions. And regardless of your position on whether humans are responsible for the current greenhouse gas levels, hopefully we can all agree that we should try to reduce our emissions as much as possible so that we don't aggravate the problem.

My position is that the future of global pollution control lies solely in China and India. In order to fuel their economic ascendency, these countries are trashing the environment. A New York Times article entitled Pollution From Chinese Coal Casts a Global Shadow is over a year old but still provides a good summary of the situation.

J.S.'s position is that it's hypocritical to judge China and India when we in the United States are flagrant abusers of electricity. Further, we are tacitly implicated since our addiction to low-cost imports from China provides the demand that fuels their consumption.

Recent numbers on global electricity generation from the Energy Information Administration do support J.S.'s claim. In 2004, the United States produced 3.979 trillion kWh of energy for 303 million people, or 13,405 kWh annually per capita. Europe's population of 492 million people consumed 3.443 trillion kWh, or 7,089 kWh annually per capita. Which means that Europeans use about half the power of Americans per capita. And at 1,795 kWh annually per capita (2.080 trillion kWh for 1.320 billion people), China uses about one-seventh the power that the U.S. does per capita.

But none of this math really matters. In the US and Europe, both the population and manufacturing base are well established, stable, and slow-growing. This means that power consumption won't grow much either. And while it may be hypocritical to tell others that they need to curtail their power consumption while not following that same advice, it doesn't change the calculus. If China and India don't change their plans, then what the US and Europe do is irrelevant.

So what do we do about it? The NY Times article makes some suggestions. Subsidizing coal scrubbers and more efficient power plants in China and India is a good place to start. Nuclear power is an oft-overlooked but balanced solution that unfortunately will probably fall victim to politics. A tariff on imports from countries with poor energy generation practices would certainly be controversial. Certainly reducing our own per capita energy consumption in the US as a symbolic gesture wouldn't hurt.

But we do need to start the conversation... soon!

tags: environment politics
permalink | | technorati
DEC 13
2007
Two sweet Vim plugins: The NERD Commenter and xmledit.
tags: coding vi
permalink | | technorati
DEC 10
2007
I went to Costco today for lunch with some friends. While walking around looking for free food samples, we came across a $2000 machine that has hundreds of classic video games. I found an old favorite in the list, Qix. I used to play a lot of Qix. Like all great games of the eighties, it's simple in concept but brilliantly executed. It's available in all the usual places (like MAME) if you want to play. I also found a fun Java-based modern adaptation, XiQ.
tags: games
permalink | | technorati
DEC 9
2007
Children of Men ** : Though-provoking and good filmography but slow, lacking too many details, and, ultimately, disappointing.

Collateral *** : Decent enough movie, but it's no "Leon". I just can't see an assassin even accepting a job like this.

911 In Plane Site * : Wish I could give it a lower score, but one star is the lowest in my system. What's most scary about this movie is its incredibly high IMDB rating.

tags: movie-reviews
permalink | | technorati
DEC 9
2007
Futurama is getting a fifth season. Oooooh yeah!
tags: television
permalink | | technorati
DEC 8
2007
Last month's New Yorker had a great article by Elizabeth Kolbert on Canada's tar sands. Unfortunately the full article isn't available online, but the abstract of Unconventional Crude has a decent summary. If you can find the original, give it a read. Very enlightening. And potentially terrifying!
tags: environment new-yorker
permalink | | technorati
DEC 7
2007
Jott Links: This is cool. Call a toll free phone number, say something like "Google Calendar: lunch tomorrow with Joe 12:30pm", and it appears on your Google Calendar. I just tried it out, works great!
tags: jott google
permalink | | technorati
NOV 12
2007
He has broken the hearts, minds, and spirits of countless followers, some of whom have banded together with a common goal: to once, and for all, Stop Ben Cornett.
permalink | | technorati
NOV 9
2007
My favorite network traffic monitor has been updated: DU Meter 4.0. There are plenty of free or shareware network monitor tools, but I still like DU Meter the best. The new version has a great sidebar gadget for Vista and a new unobtrusive window that sits at the top of the screen showing total megabits per second up or down from your box.
tags: software
permalink | | technorati
NOV 9
2007
Mimic ** : Not Guillermo del Toro's best work.

8-Mile **** : Eminem's early days.

Derailed *** : Ransom movie with a twist, watchable if you can cope with highly unrealistic behavior.

tags: movie-reviews
permalink | | technorati
NOV 4
2007
Javascript is a very powerful language. I continue to be amazed by what can be accomplished using its prototypes and associative arrays. But its loose typing and reliance on external interpreters means that any non-trivial program will eventually require hours of testing and debugging on each platform that you want it to run on (Firefox, Internet Explorer, Opera, Safari, ...).

In an attempt to minimize this debugging time, I set out a while back to find a lint program that would check for bad coding practices. I found JSLint, but quickly learned that it is far too picky on what it reports as problems. For example, it will report the instantiation of a class if it hasn't been assigned to a variable:

 new Ajax.Updater( ... );
instead of

 var j = new Ajax.updater( ... );

This is perfectly legal Javascript and often a good idea. For example, when using Prototype, the Ajax.Updater class doesn't return anything useful. There were numerous other bogus warnings from JSLint.

I also wanted to integrate Javascript checking into my local build environment. Since JSLint appears to be online only, this was not convenient.

Recently I found JavaScript Lint, a command-line tool that does exactly what I need. It comes with an extensive configuration file that lets you control exactly which warnings you want to suppress. So, for example, I don't like warnings complaining about missing semicolons at the end of lines as this is perfectly legal in Javascript! But I do want warnings about variables that are used without being declared first.

Check it out if you program Javascript!

tags: javascript programming
permalink | | technorati
NOV 4
2007
The Good Shepherd ***** : Early history of the CIA. Complex, intense, thought provoking.
tags: movie-reviews
permalink | | technorati
NOV 2
2007
I received a letter in the mail last week concerning a class action lawsuit against Seagate for misrepresenting hard drive size.

This is a classic example of a bad class action law suit. I feel bad for Seagate. They are no different than every other hard drive manufacturer in representing 1 GB as 1000^3 bytes instead of 1024^3 bytes. Using the SI prefix instead of the historical computer system increases the size over what's reported in Windows and other operating systems by about 7 percent. And I think it's the right thing to do.

At one time in computing history, it may have made sense to stick with 1K=1024. Back then, memory and storage were scarce. And people did very low level programming where they needed to know about every last byte. But nowadays, most of that is abstracted away from us. And given the ever increasing role of the metric system in the world, we really need to stop this archaic practice.

I've written previously about how 1 kbps continues to be misrepresented as 1024 bits per second, when it is really 1000 bits per second. Google still hasn't fixed this. Nevertheless, in the networking world, 1K=1000. The IEEE agrees as well.

We also have the new KiB, MiB, etc., units, which provides a solution for people who want to stick with power-of-two based units.

For the rest of us, let's get with the SI system and make 1 KB = 1000 bytes, 1 MB = 1,000,000 bytes, etc.

Getting back to the lawsuit, I find it hard to believe that the lead plaintiff was in any way hurt or negatively impacted by Seagate's representation of GB as 1000^3 instead of 1024^3.

Sadly, after reading the class action lawsuit web site, it seems that Seagate has already settled. I'm sure this makes sense for them as litigation is costly. Nevertheless, I would have liked to have seen them fight the good fight.

The lead plaintiff gets $5,000. The lawyers get $1,792,000. Since I have purchased five or six Seagate hard drives during the period in question, I am eligible to receive about $100 back if I wanted to. But I'm not going to file a claim. It just seems wrong.

tags: seagate lawsuits kbps
permalink | | technorati
NOV 1
2007
Sigh. I came home tonight and discovered that the yellow tang in our aquarium had nipped to death a beautiful hard coral, most likely a bird's nest. Where once there was brilliant pink, now there is only bone white. I had thought that tangs were reef safe. A quick consult with the fish book says "may nip at corals if underfed". I had been starving this guy to force him to eat some of the nuisance algae in the tank... d'oh! Another expensive aquarium lesson learned...
permalink | | technorati
OCT 31
2007
Farecast is my new favorite air travel booking web site. Using Farecast's advice, we waited to buy some tickets for Christmastime travel and saved almost $100 per ticket! They have a really nice feature that will send you daily emails with the price trend for specific flights you're interested in, along with the advice on what to do (buy or wait).
tags: travel online commerce
permalink | | technorati
OCT 31
2007
Butterfly Effect **** : Crazy movie, Donny Darko meets Memento.

The Holiday *** : Lots of big names in this light romance.

tags: movie-reviews
permalink | | technorati
OCT 22
2007
Russ sent this to me, and I love it! Great delivery, gets the point across with very little text: one week's worth of food around our planet.
tags: links
permalink | | technorati
OCT 22
2007
Constant Gardener **** : Corruption strikes in Africa once again. Stars guy from the English Patient.

Fast Food Nation **** : Fictionalized adaptation of the book. Lots of cameos. Good.

Borat ** : Disappointing. The original HBO series was so good!

tags: movie-reviews
permalink | | technorati
OCT 20
2007
Over the past three years, I've had a half dozen requests from various people asking for permission to use this shingles picture from my cancer blog. Requests have come from professors writing medical text books, nurses preparing journal submissions, and, mostly, from television stations running pieces on the virus that causes shingles, herpes zoster.

When the requests come from regular ole' people, things are easy. When they're from companies (old world media like television stations), things get complicated because they want me to sign legal paperwork giving them rights to the picture. Since I'm giving away the pictures for free, it really annoys me to have to parse the legalese, fill out paperwork, mail it to them, etc.

So I decided to make my first contribution to Wikimedia Commons: Shingles on the chest, released under the GNU Free Documentation License or Creative Commons 3.0 (share or remix allowed with attribution). Hopefully this will satisfy and future comers so I don't need to sign any more contracts!

permalink | | technorati
OCT 13
2007

This YouTube video shows two of the stepeest road rides in Portland. (The video would benefit from some liberal editing. Don't be afraid to fast forward.) They may even be the steepest. I rode both of them a few weeks ago with my biking buddy Kurt.

The first, College Street, is located just behind our condo. The grade is 18 percent. I had to stop once. With sufficient training, I could see myself nailing this one some day.

A couple of days later, Kurt suggested we try Brynwood, located off of Skyline. At 20 percent grade, this one is even tougher than College St (and longer to boot). I don't know if we were still recovering from the previous weekend's attempt up College, but Brynwood stomped us. I had to stop twice, the second time because my heart was almost 200 beats per minute. I don't know if I'll ever be able to do this one without stopping.

The line has been drawn in the sand for next year!

tags: cycling
permalink | | technorati
SEP 25
2007
Google Checkout just gets better and better... I just ordered something and when I went to check out on the merchant's site, I was quoted a shipping rate of $14. Not wanting to create an account on their system, I was happy to see the Google Checkout button. Upon arriving at the Google Checkout page, the order details listed "Shipping & Handling (Google Checkout FedEx Rates) - $9.75". Sweet!
tags: google
permalink | | technorati
SEP 23
2007
Flowers for Algernon ***** : Another oldie-but-a-goodie that I had never read until now. Great soft scifi.
tags: book-reviews science-fiction
permalink | | technorati
SEP 10
2007
Harry Potter Book 7 *** : If you've made it this far in the series, then this is a must-read regardless of what any review says. But the joy was gone for me in this overly dark final installment. As one reviewer aptly put it, can you say "deus ex machina?"
tags: book-reviews
permalink | | technorati
SEP 10
2007
The Last Kiss **** : Garden State Part II.

Scoop **** : Quirky Woody Allen movie with Scarlett Johansson.

Pan's Labyrinth ***** : Muy bien! Best movie I've seen in a long time. A great metaphor for Spain under Franco.

Saw III **** : Still dark and twisted, still strangely entertaining.

Flags of Our Fathers *** : A little disjointed and hard to follow; not as good as its partner movie, "Letters From Iwo Jima".

tags: movie-reviews
permalink | | technorati
AUG 28
2007
Cool: Presto's Hard Drive Monitor has gone international. It's being featured on Windows Forest, a Japanese online software directory. Can anybody out there provide a translation? :)
permalink | | technorati
AUG 16
2007
A Random Walk Down Wall Street ***** : Let's face it, investing books are not exactly page turners and you definitely don't want to read one when you're sleepy. Nevertheless, this is a must-read for anybody interested in maximizing their investments over the long haul (20+ years). Which should be everybody!

The book pretty much fortifies the investing axioms that I have been following for the past several years, but presents a ton of data to back up the claims, which are:

  • The ability to consistently beat the market average is rare.
  • The only way to get higher returns is to take higher risks.
  • Diversification smooths out the volatility inherent in risky investments.
  • The semi-strong efficient market hypothesis is the most credible of all the market theories.
  • Your life stage defines your risk tolerance (with younger people able to handle more risk).

For persons under 40, the book recommends the following portfolio:

  • 5% cash. Or cash equivalent, interest bearing (of course).
  • 20% bonds. Three-quarters comprised of zero coupon treasury or no-load bond funds. The rest inflation-protected (TIPS). Put in tax exempt account if possible, otherwise try and use tax-exempt funds.
  • 65% stocks. Two-thirds comprised of total stock market (Wilshire 5000), the rest international and emerging markets.
  • 10% real estate. No-load REIT fund.

For persons between 40 and 50, it's basically the same as above, but move 10 percent from stocks to bonds.
tags: book-reviews investing nonfiction
permalink | | technorati
AUG 16
2007
Curious Incident of the Dog in the Night-time **** Innovative first-person novel about an autistic 15-year-old who attempts to solve the mystery of the neighbor's dog's death. Provides great insight into the curse and the blessing that is autism.
tags: book-reviews fiction autism
permalink | | technorati
AUG 16
2007
I've felt for some time now that enterprises of all sizes can benefit by outsourcing many of their information technology needs to Internet-based services. The rise of powerful web-based applications shows that this vision is within the realm of possibility. Using Google as just one example, their mail and calendar applications seem quite capable of meeting the enterprise's needs--at a much reduced cost.

An article from Sun entitled Preparing for the End of IT as We Know It makes the case much more eloquently than I could have: "We at Sun have concluded that the time is fast approaching when competitive enterprises will move to a model where they run secure, network-based services instead of their own applications, datacenters, and networks."

(Thanks to Mathew Eszenyi for the link!)

tags: sun google
permalink | | technorati
AUG 12
2007
Even though I had previously recommended FNBO Direct as a good online bank with a great interest rate, I am now officially un-recommending them. They recently put a hold on my account when I transferred some money in, even though I had already done the usual account verification procedure. Then, last week, I got hit with a mistaken email in which they said they were freezing my account again. Bankdeals has a good thread on this topic, as well as several others showing the growing discontent among FNBO customers.

Bottom line: I no longer feel like I can trust my money with FNBO. It's amateur hour over there. Time to get out!

permalink | | technorati
AUG 2
2007
Like the New York Times piece on wealthy Americans, CNN has a great piece on obesity in America. Great use of technology to display raw data in an easy-to-digest and to-the-point manner. Interesting how the south appears to be fattening up faster than the rest of the nation -- too hot to exercise? :-)
permalink | | technorati
JUL 31
2007
I heard about this new Google Maps mashup on NPR the other day: Walk Score. It gives you a score of how walking-friendly your house is. Great idea! I'm going to have to think if there's any potential Trainster tie-ins. Our condo got a score of 72 (out of 100).
permalink | | technorati
JUL 31
2007
I've been playing around with Yahoo's YSlow Firefox add-on. It gives a lot of great insight into factors that make web sites slow. While not all of the suggestions apply to small web sites (such as the suggestion to use a content delivery network), it's a definite must-have for any web developer's toolbox!
tags: firefox
permalink | | technorati
JUL 30
2007
Late last year, I released Presto's Hard Drive Monitor, a Vista sidebar gadget that reports the remaining space on hard drives. It's been pretty successful at 30,000 downloads and counting. It initially supported four hard drives, which I thought would be enough. But the user demand for more drives was intense (the live.com page for the gadget shows some of the user coments).

It would have been easy to have just made the gadget box bigger and added more drives. But I wanted to do it more elegantly and have the gadget grow and shrink and only use as much space as necessary. (As a side note, all Vista gadgets have a minimum height of 57 pixels, and it's not possible to shrink them less than that.)

Not having seen many gadgets that automatically change size, my usual method of just looking at how somebody else did it wouldn't work. I had to figure it out for myself. After many hours of experimenting, I finally ended up doing it as follows:

First, I inserted a <g:background> tag into the main body of the gadget:

<g:background id="background" src="images/background-black3.png"/>

The background image background-black3.png needed some work as well. Initially, it had a shadow and transparent border around it, but this caused problems when the image was stretched. To work correctly using this method, the top and bottom of the background image must be opaque.

With this tag in place, the following simple lines of Javascript change the gadget's height:

 var heightInPixels = 100
 document.body.style.height = heightInPixels
 background.style.height = heightInPixels

My actual code was a little more complicated in that it used the number of drives to figure out how high the gadget should be. But you get the idea. And you can download the actual gadget and look at the code if you want to learn more.

tags: vista gadgets code
permalink | | technorati
JUL 30
2007
Clowngirl **** : Very nicely written novel by a Portland author, although it tries too hard at developing some sort of philosophical undertone (existentialism? condemnation of religion?) which never quite gelled for me.
tags: book-reviews
permalink | | technorati
JUL 29
2007
Bontrager has great technical support! I have a carbon stem on my road bike and I wanted to know the maximum tightening torque for the bolts on the stem. Even though this is an essential piece of information needed to avoid cracking the carbon, it strangely is not present anywhere in the documentation. Nor, apparently, anywhere on the web. So I decided to call Bontrager's technical support center, and I was pleasantly surprised. No voice menus. No asking me for my name or any other personal information. A guy simply picked up, I told him my problem, and after a second of thought, he gave me the answer. Which is 60 inch-pounds for anybody else who needs to know (this is for the Race XXX Lite stem).
tags: bontrager
permalink | | technorati
JUL 27
2007
This week, the first Wireless USB products were announced! I've been working on this project for the last three years. It's very satisfying to see it publicly released! Engadget, c|net, and countless others have lots of info.
tags: wusb
permalink | | technorati
JUL 21
2007
The NY Times web site has an awesome piece about the Wealthiest Americans Ever. They present a large amount of data in a lucid format and with an intuitive, fun-to-use user interface.
tags: links
permalink | | technorati
JUL 15
2007
The Emperor's New Security Indicators is an extremely interesting (and terrifying) journal paper presented at the 2007 IEEE symposium on security and privacy.


Mandatory reading for anybody working on security, and it should prove very interesting for everybody else.


Conclusions from the paper:

  • Users will enter their passwords even when HTTPS indicators are absent
  • Users will enter their passwords even if their site authentication images are absent
  • Site authentication images may cause users to disregard other important security indicators
  • Role playing has a significant negative effect on the security vigilance of study participants
  • 36% of study participants who were using their own personal banking account chose to login after seeing an explicit warning page saying that the connection was probably insecure

tags: security
permalink | | technorati
JUL 15
2007
On Dragonwings **** : This is actually three books bound into one: Dragonsdawn, Dragonseye, and Moreta. All part of the Dragonriders of Pern series by Anne McCaffrey. An interesting blend of scifi and fantasy crossing nearly 2000 years.
tags: book-reviews science-fiction fantasy
permalink | | technorati
JUL 10
2007
As somebody who flew close to 100,000 miles last year, I can definitely sympathize with the poor soul who wrote a letter to Continental Airlines complaining about Seat 29E. Definitely check out the PDF version of the letter so that you can enjoy the hilarious diagrams. (Unfortunately, Snopes prevents direct links, so cut-and-paste this URL to see it: http://www.snopes.com/travel/graphics/seat29e.pdf).
tags: humor links
permalink | | technorati
JUL 1
2007
The Million Step Summer starts today. If you are looking for a fun little challenge for the summer, check it out!
permalink | | technorati
JUN 24
2007
Lately, I have been spending a lot of time sprucing up my fitness web site, Trainster.

One of the most unpleasant tasks is making a good-looking, standards-compliant web design that works on all browsers. Far and away, the most annoying browser is Internet Explorer 6. Stuff that works fine on Firefox, Opera, Safari, and even IE7 just does not work on IE6.

I wish I could just say "to hell with IE6" and not support it, but according to Google Analytics, over 70 percent of Trainster users are using IE6. So like it or not, I am stuck with making it work.

Last week, I tried out Trainster on Safari for the first time. Like Opera, Safari is a very strict browser when it comes to interpreting HTML, so it is good for testing out a site. If it works with Opera/Safari, it should work with anything. I found a few problems, further confirmed by the excellent W3C Markup Validation Service.

Thinking that standards compliance would solve all of my problems, I set out to make all of Trainster HTML 4.01 strict. It took a lot of work, especially since there are a lot of little nitpicky things that one needs to do in order to be HTML 4.01 strict. But I slogged through it, and Trainster is now HTML 4.01 strict (yay!). And strict compliance did fix everything... except for IE6. A few hours after pushing the changes live, complaints started to roll in from IE6 users saying that the site was all messed up.

Mind you, it is not that easy for me to test IE6. You can't even run IE6 on Vista, so I had to install Virtual PC 2007 and download a special virtual machine from Microsoft Support that has Windows XP with IE6 on it. And sure enough, once I loaded it up on IE6, the site didn't look right.

Fast forward over two hours of pulling my hair out trying to figure this out, and it turns out I was bitten by the IE6 xml prolog "feature". Any seasoned web developers out there are probably nodding their head in sad agreement at this point... For those who don't know, if you have this one innocent-looking line at the beginning of your HTML page:

 <?xml version="1.0" encoding="iso-8859-1"?>

Then IE6 will disregard any specific DOCTYPE instructions that you have otherwise given and render the page however it sees fit (called "quirks mode"). ARGGGHHGGHHHHHH! Luckily this behavior has been removed for IE7. So I removed the line and all is well.

I'm not sure what the point of this blog entry is, other than to vent a little bit and perhaps save some other poor soul from suffering the same fate some day.

tags: microsoft
permalink | | technorati
JUN 20
2007
While visiting with my relatives in Canada last month, my aunt turned me onto a book from her investing club entitled Get Rich With Options. Despite the unfortunate used-car-salesman-esque title, it was a surprisingly good read.

Here are the book's take-aways so you can get rich and profit. Of course, the usual investing disclaimers apply. If you go broke following this advice, don't blame me. If, on the other hand, you get rich... you can buy me lunch.

Sell slightly out-of-the-money covered calls on your long stock positions. This is the one that most people already know about. The vast majority of calls expire without being assigned, so most likely you will get to pocket the premium. If your stock does get called away, then you at least got to sell your stock for a decent price.

Buy deep-in-the-money calls instead of buying a long position in a stock. The call will track the stock's market value, which translates into a higher ROI if the stock rises and less risk if the stock drops.


Sell slightly out-of-the-money naked puts on a stock that you want to own.
You don't care if the put gets executed (you were going to buy the stock anyway).  And you get to pocket the premium and get the stock at a slightly lower price.  Probably the only time it's safe to sell a naked put.  Unfortunately, many brokers (including mine) do not allow selling of puts.


Option credit spreads.  This one is not as straight forward as the other three.  It requires a lot more research.  With a bull put spread, you are assuming the stock will trend up, so you sell one put with a high strike price and buy another put with a lower strike price.  With a bear call spread, you are assuming the stock will trend down, so you sell a call with a low strike price and buy another call with a higher strike price.  In either case, the strategy is to limit your profit or loss and take advantage of the decay of time value.  Investopedia elaborates.



tags: investing book-reviews
permalink |