A couple of weeks ago, I put FlyerStats.com online. It lets you enter a flight path, like ORD-SFO-PEK-ORD (Chicago O’Hare to Beijing via San Francisco and back), and see the approximate path you’ll fly. It also calculates total and per-flight mileage.

Some examples:
DC to Hawaii, Canada, and S. America: DCA-ORD-SFO-OGG-LAX-YYZ-SCL-AEP-MIA-MEX-IAD
Chicago to Singapore, Taipei, etc.: ORD-LAX-SIN-BKK-TPE-ICN-KIX-SFO-ORD
Istanbul to Hong Kong, Tokyo, London, Frankfurt, then home (crazy!): IST-HKG-NRT-LHR-FRA-IST
So, check out all the itineraries and then sign up to start mapping your own flights!
Until recently, HBase, the Bigtable-like distributed storage system from Apache Hadoop, had no Ruby API. That changed when Bryan Duxbury released ruby-hbase, an interface to the REST API he wrote for HVase. But there’s no Ruby ORM for Hbase yet.
So, in the last 24 hours, I threw together the beginnings of a Ruby + HBase ORM. It’s called Rhino. Right now, it can do CRUD. The code for interacting with Hbase is taken from Bryan’s ruby-hbase; I’ve just done the ORM part.
Get it
The Rhino code is hosted at Github. Check :
git clone git://github.com/sqs/rhino.git
Check README, spec/spec_helper.rb and spec/rhino_spec.rb for usage examples.
Using Datamapper and Merb’s default resource_controller generator to generate a controller results in code that’ll give errors where it shouldn’t. Here’s the code that it’ll generate for your update action:
def update(id, company)
@company = Company[id]
raise NotFound unless @company
if @company.update_attributes(company)
redirect url(:company, @company)
else
raise BadRequest
end
end
The problem arises when the user doesn’t make any changes on the edit form and then clicks the submit button. In that case, nothing actually needs to be written to the database, so @company.save returns false. But in the resource_controller code, that results in a BadRequest exception.
The fix here is to check the trueness of @company.valid? instead of @company.update_attributes(...). Here’s how the most basic update action should look.
def update(id, company)
@company = Company[id]
raise NotFound unless @company
@company.update_attributes(company)
if @company.valid?
redirect url(:company, @company)
else
raise BadRequest
end
end
I’ve just started to play around with Merb, Datamapper, Haml, and Sass…and I am loving it. I can guarantee you that we’ll be hearing lots more about these in the future.
My trip to Asia begins on Monday, December 17. I’ll fly to LA and spend the day touring with friends who live there. I grew up in a household where the hate for LA was strong. My friends have approximately 9 hours to change my mind (and I am sure it will be changed!), because I fly to Singapore at 8 pm that night.
Here’s how my whole trip looks. Singapore, Bangkok, Taipei, Seoul, and Osaka. 5 countries, 8 flights, 8 airports, 21,000 miles, 5 airlines, and 4 foreign languages in 7 days. Of those 7 days, or 168 hours, my total time sitting in an airplane will be 46 hours (27%).
Yeah, it’s a little bit crazy. But the airfare only cost me $42 total, since it’s a frequent flyer mile trip. Sure, I could have picked one or two places and stayed longer. But then I’d have to pay for hotels, and I wouldn’t get to see so many places. Also, I like flying a lot, and this is in business class, so it won’t be too bad.
| December |
| 17th |
Los Angeles; catch my flight to Singapore at 8 pm |
| 18th |
Somewhere over the Pacific |
| 19th |
Singapore (arrive 6 am) |
| 20th |
Depart Singapore at 11 am; Bangkok (arrive at noon) |
| 21st |
Depart Bangkok at 7 am; Taipei (arrive at noon) |
| 22nd |
Depart Taipei at 3 pm; Seoul (arrive 6 pm) |
| 23rd |
Depart Seoul at 1 pm; Osaka (arrive 2pm, depart 7 pm); connect in San Francisco; arrive in Chicago at 8 pm |
I’ve made a detailed itinerary for my trip and posted it online if you’re curious: Asia Winter 2007 Trip Plan.
I’ll be updating regularly while I’m traveling, so check back!
Here is my flight path:


I’ve put my Chinese-English dictionary online. It’s at http://zhdict.com. I didn’t write the definitions; I only created the interface.
From December 16 to 23, I’ll be traveling around Asia. I’ve got two nights in Singapore and one night everywhere else except Osaka (where I have 6 hours). It’ll be a pretty fast-paced trip, but it should be fun. Check back for a trip report.
I’m working on a cool little program that can show you where you’ve flown and give you interesting stats on all your flights. I’ll post more about it later, but here are some cool Google Earth maps for now.




Here’s the Google Earth KML file if you want to look at it yourself. Just download the file then open it using Google Earth.