Some Bits: Nelson's weblog

An overview of open source geo hacking

Since my one day map hack a few months ago I’ve been doing more work with open source geographic software. There’s a lot to learn and I’ve yet to find a good simple introduction, so here’s some notes on resources and how they fit together.

Libraries. There’s a lot of core math and data structures for GIS. GEOS implements the basics of OpenGIS geometry: data types, simple calculations, etc. GDAL is the library + utilities for working with raster georeferenced data (maps). GDAL also includes OGR for working with vector data (shapefiles). Finally Proj is the library for translating data from one spatial reference system (SRID) to another. GEOS + GDAL + Proj give you most of the core library functions you need for working with geographic data. They’re C libraries and fast but have bindings for more humane languages as well.

Data formats. GeoTIFF is a common format for raster data. There’s a zillion others GDAL supports, but GeoTIFF is the native format. Esri Shapefile is a common format for vector data, but you also see a lot of GPX, KML, GeoJSON, etc.

Database. PostGIS is the most common OSgeo database. It adds a bunch of datatypes and functions to Postgres. There are also geo extensions for other databases like MySQL and Oracle. Often a relational database is unnecessary: files + GDAL go a long way.

Web development. There are lots of options for using geographic data in a web application. GeoDjango is a great choice for building a webapp. MapServer and MapNik are two options for rendering custom maps on a web server. I really like Polymaps for doing map display and compositing in Javascript.

Desktop applications. Not everyone wants to write code. QGis is a good desktop application for manipulating geographic data. There’s also GRASS, OpenEV, and uDig. These programs are focused on displaying and editing geographic datasets, for making and updating custom maps by hand.

Datasets. OpenStreetMap is a huge resource for free data for road maps. geodata.gov is a portal for US government datasets where with enough digging you can find interesting data. There’s a lot of other data scattered about, I haven’t found a good catalog.

Community. OSGeo and OpenStreetMap are two centers of the open source geo hacking world. slashgeo is a good news site, as is the GIS forum. GIS StackExchange is looking promising.

I’m still new to all this so if I misstated or overlooked something please email me.

Thanks to Adam and Matt for feedback

Thanks to Lyndon Asuncion

I wanted to give a thank you to Lyndon Asuncion, propietor of the “Some bits of Art” blog. He’d registered somebits.wordpress.com awhile back but wasn’t using it and very kindly gave me the name when I asked. I’m planning on moving this blog over there soon and this was an important first step.

Some bits of Art is a nice work blog, btw, he’s a video game artist in Seattle. I like his work on this house.

Can we end passwords now?

The Gawker blog network got hacked by some pissed off hackers who released a dump of the emails and encrypted passwords of 1.2M Gawker users. Cracking a password database like this is pretty easy (see Duo Security), I’ve seen 180,000 cracked already. Top 5: 123456, password, 12345678, lifehack, qwerty.

Poor Gawker, they’re screwed, right? No, we’re all screwed. People frequently use the same password on multiple sites. Now Twitter is awash in acai berry spam thanks to shared Gawker passwords. This kind of database theft happens all the time, the only difference with Gawker is the stolen goods were released publically.

You can laugh at the people who use weak passwords, but do you really want to remember a random string like 5Bfw7Gvil4Eg to comment on the latest Valleywag gossip? You can laugh at the people who share passwords at multiple sites, but seriously, who’s got the time to manage 300+ different strong passwords?

How do we end passwords? OpenID for logins to most sites. Two factor authentication to secure important passwords. This stuff works right now: I applaud the StackExchange sites for launching using only OpenID login. And I applaud Twitter for shipping OAuth: folks who posted to Gawker via their Twitter identities weren’t compromised.

Passwords are an inhumane form of account security. They are bad user design. It is time to stop using passwords for most sites.

Turn CapsLock into “search Google”

The thing that impressed me most looking at Google’s CR-48 netbook was that the CapsLock key was turned into a search key. That makes perfect sense! I’d been using a modified version of WinUrl for years to search Google from the keyboard, but Win-W is awkward. So why not CapsLock?
I’ll tell you why not: because rebinding CapsLock on Windows is a royal PITA. Fortunately AutoHotKey has it all figured out. So here’s an AutoHotKey script to search Google with whatever’s in your clipboard. It’s smart enough to open full URLs directly, too. AutoHotKey is a bit complicated to configure, but the basic idea is to paste my script into the default script it creates.

What’s a Chrome Web App?

Google just launched the Chrome Web Store where users buy and install “web apps” in Chrome. But all the examples I tried were just bookmarks to ordinary web pages. So what’s an app? It’s explained better here and there’s a full article here.

Hosted apps are basically fancy bookmarks. A manifest file specifies a name, an icon, etc. It also has support for elevated permissions (accessing the user’s location, for instance) and an auto-update mechanism. It only takes 15 minutes to turn any web page into a hosted app. It’s a sensible Netbook feature, allowing a fancy icon that says “Email” to click on instead of a generic bookmark.

Packaged apps are more complex, more like browser extensions in that the code is installed locally and has extra APIs into the browser. But where extensions are for modifying pages (say, by removing ads), packaged apps have their own UI for a specific task. Like a Twitter client or a game. Packaged apps can run entirely offline.

Once an app is built it can be uploaded to the Chrome Web Store: there’s a good tutorial on the process. There’s some minor hoops to jump through but no mention of a required review before going live. The store is an interesting new marketing channel but I’m skeptical that for-pay apps will thrive.

We’re at a transitional moment for web apps: distinctions between web sites and local applications are being blurred by HTML 5’s application caching capability and APIs like local storage. If I were building a web app now I’d build it entirely in generic HTML 5 that works in any browser but uses all the fancy new HTML 5 stuff to make it work like a locally installed application. Then make it a Chrome hosted app to take advantage of the Web Store marketing channel. I’d avoid the extension / packaged app route unless there’s some technical capability I really need that’s missing in HTML 5.

Wikileaks hysteria

I’ve been following the WikiLeaks story with some interest. The hysteria surrounding the cable leaks is downright un-American.

The most disturbing thing is what looks to be a coordinated campaign to deny WikiLeaks access to American Internet companies. Amazon dropped them. PayPal dropped them. EveryDNS dropped them. Tableau dropped them. All of these companies have the right to choose whom they do business with. But freedom of the press requires a press. It’s particularly troubling to think that government pressure is behind the shutdowns.

Also disturbing is Interpol chasing Assange over a minor Swedish criminal charge. I don’t want to dismiss the rights of the accusers in Sweden, but the timing and publicity make it obvious the international warrant has more to do with revenge than sexual impropriety. Now the story is “WikiLeaks = Rapist”, a smear which discredits the cable releases without addressing their content.

And then you get the crazy shit. A sustained DDoS attack against the WikiLeaks site which does nothing to stop the cable release but does make it harder for the organization to explain what they’re doing. And a herd of nutjobs saying Assange should be assassinated. The air is poisoned.

What makes the response seem like hysteria is the actual cable leak doesn’t seem that big a deal. WikiLeaks is being responsible about redaction. The source material, while private, was hardly ever kept that secure. The cables were stored globally on SIPRNet where thousands to millions of people had access. Anything shared with thousands of people is not, practically speaking, secret. And the information coming out so far has proven to hardly be blockbuster. It has been interesting, though, and embarassing.

Clearly the cable leak is against the US government’s interests and of course the government is going to respond. But the response is looking a little crazy and disproportionate, not to mention ineffective. In the meantime news organizations every day are turning the material into fascinating stories about the inner workings of US relations with North Korea, China, Italy, Russia, Afghanistan. In the end the disclosure may well create more value than harm caused.

Government Web 2.0: ADDS aviation weather

The new weather.aero site is a great example of government web design done right. Check it out! It’s an experimental version of the venerable aviation weather site ADDS, a joint production of NWS, NSF, NOAA, and FAA. The new design is great: simple and clean, with underlying web services to allow mashups with the data. What the kids these days call “Web 2.0”.

My favourite part of the design is how uncluttered it is. The home page contains the key products: a text METAR for home airport weather and a slideshow of weather map graphics showing national aviation conditions and forecasts. The slideshow UI is attractive with a tidy mouseover zoom. Drilling down a layer there’s good, consistent page UI for different weather views like winds, radar images, and forecasts. There’s nothing revolutionary about the UI but it’s very cleanly executed and looks like 2010 instead of the previous 1998esque product. Usable simplicity achieved.

In addition to the web page views there’s a very interesting web service that lets you easily get XML or CSV data for weather observations, pilot reports, etc. This data has been available for integration before (for instance, via ftp) but this new web service is nicely centralized with thoughtful REST query options like “all METARs along this flight path”.

The site has modern community outreach, too. The team is on Twitter, Facebook, and has a Nabble-hosted forum. And it’s not all faceless bureaucrats, you can even see and learn more about the developers. The US government produces all sorts of amazing software and data. But it’s a culture apart from the Internet startup world and, to be honest, has often produced crappy websites. The new ADDS is a different thing entirely, a very nice bit of work. I’m excited to see a new generation of technology produced by government agencies.

Update: I misattributed who built the experimental ADDS site. The site was built by NCAR, with funding and support from NWS, NSF, NOAA, and FAA. NCAR itself is not a government agency, but rather an R&D center that receives a lot of federal funding. It’s foundation story is interesting, a 1960 solution to the same sort of culture gap I mentioned above.

Is Project Titan Blizzard’s new MMO?

File this in the rumour bin: a leak of Blizzard’s product roadmap, with some analysis here. It may or may not be true, but it looks plausible.

But the big news is the last item, Titan, releasing Q4 2013. Could this be Blizzard’s long-rumoured secret new MMO? We know they’ve been hiring for it, we know many of the original WoW developers were pulled off of Warcraft right after the Burning Crusade lanuch to work on something secret and new. But that’s all we know.

But now we have a name. Project Titan. I’ve found a possible confirmation: Google delving turns up a guy named theNoid who claims to have an inside source at Blizzard. He’s been talking about “Project Titan” at Blizzard for the last 18 months.

I can’t go into too much detail, but a guy on my team lives with a code monkey who’s working on Project Titan at Blizzard. This is their rumored successor to WoW, and is located in the Diablo wing of the building, higher security locked doors. --theNoid Jul 2009

Project Titan is locked tight at Blizzard, my friend lives with a guy working in there. This is Blizzards next MMO, which has been stated 1000 times to be a complete new IP and it is not WoW2. --theNoid Aug 2009

Project Titan? No, its more like 2013.. trust me. The core framework is all thats done, the engine. The programmers were tasked at building an engine for a game that did not yet exist and still does not exist. No art, no modeling, no nothing has started on Project Titan yet. Also, Blizzard has announced it being a new IP, which isn’t entirely true either. Its a spin off of an existing franchise, a franchise that I think is going to excite people very, very much. Which one? Which would would people want more than any other? Blizzard runs a pretty tight ship, leaks are few and far between but tend to go unnoticed when coming from the unexpected --theNoid, Mar 2010

I also found another mention of the “Project Titan” name in September 2010 from a different source, but no idea if he’s independent:

Next-Gen MMO (aka. Project Titan): Highly unlikely anything about this project will be published for a while. Not until WoW is on a decline. Anything else would just be self-sabotage. --Crowe

Taken separately, both the leaked product roadmap and the forum posts from “theNoid” are plausible but not particularly trustable. But the fact these two independent rumours confirm each other is quite interesting.

The name “Titan” for a Blizzard MMO is rich irony, btw, since Titan was also the name of the cancelled Halo MMO. Particularly if Blizzard’s new thing ends up being an MMOFPS, as is rumoured. Who knows, maybe someone worked a deal and it’s actually some of the same people? It seems very unlikely Blizzard would release a game based on the Halo IP.

iOS games

I love my iPhone. I love games. I play games on my iPhone. But where are the really good iPhone games? Where’s the platform defining game? Where’s the game that makes someone say “I need to buy an iPod Touch just so I can play that game?”

A lot has been written recently about the size of the iPhone gaming market: TUAW comments on the staggering size of the market, RPS counters that Flash is bigger. Either way there’s a lot of iPhone games being sold. But most of them suck. That’s OK, we all love our long-tail media. The incredibly low cost of iOS games combined with iOS’ relatively low barrier to entry has made for a lot of games.

But where’s the great iPhone game? My candidate for best-ever iPhone game is Canabalt because it’s beautiful, simple, well tuned, and quick to play. Perfect mobile game, but it’s way too simple to be a Great Game. Angry Birds is the iPhone hit with legs, and it’s pretty good, but it’s derivative and not very compelling. There’s nothing like Halo or Final Fantasy or Super Mario to define the iPhone gaming experience.

Maybe there never will be. Maybe iOS will always be an adjunct gaming platform, a device we play games on incidentally rather than something we seek out to game. But I don’t think so. Between the touch interface, the environmental sensors, the mobile ubiquity.. there’s got to be something there.

Fuel/air mixture in general aviation engines

My airplane has a choke, just like your grandfather’s old Packard. Or as we call it, the mixture knob. One consequence of GA’s antique engine technology is the mixture has to be manually adjusted during flight. Getting it wrong has potentially disastrous consequences, yet most pilots have no idea how to set the mixture. There’s even a religious debate about it.

The fuel/air mixture in the engine needs to be in the right proportion, roughly 15:1. If there’s too much fuel (“too rich”) the engine produces less than optimal power, fuel is wasted and you get carbon deposits in the cylinder. If it’s way too rich you can flood and kill the engine, like I embarassed myself in Santa Fe once, but fortunately flooding is not really a risk while flying. Conversely if there’s too little fuel (“too lean”) the engine also produces less power. Worst case, you can starve the engine and have it quit. This is a flight risk, specifically if the pilot forgets to richen up on descent. You won’t notice being too lean at idle power but if you decide to go full power to go around you can kill the engine and, soon after, yourself.

The mixture also affects engine cooling. Common pilot wisdom is to fly a little rich of peak because the extra fuel evaporating helps cool the cylinders. If you let the engine get too hot you risk causing detonation or pre-ignition, in which case the engine can run away and get so hot it blows a cylinder. This part’s all a little mysterious, particularly in planes without much instrumentation, and mostly we avoid it by trying not to fly over 75% power. The way I was taught to set the mixture was to get to cruise, then lean it out “until the engine runs rough”, then nervously push it back in a little bit. High tech!

In the past few years engine monitors have become affordable, little temperature probes stuck in the engine that tell you that the exhaust gas is 1475°F and the cylinder head temperature is 332°F. Now pilots can know exactly how hot the engine is running and set their mixture accordingly. You can run at peak EGT, like the manual says, which is efficient but pretty much as hot as possible. Or you can run 50° rich of peak EGT, the common wisdom, only it turns out that places you most at risk of detonation. Or you can run about 30° lean of peak which seems freaky to old timers but definitely saves gas and may keep the engine cooler and cleaner. There’s no consensus on what’s best, just a religious war, but the guys with the most advanced understanding seem to prefer lean of peak.

One more complication: each cylinder stands alone, there’s four or six little engines all running in parallel. Each with its own temperature and fuel/air mixture. And there’s only one mixture control and it’s not properly calibrated between the cylinders. No one noticed this before engine monitors became available so the manufacturers got away with it. Our plane is quite out of balance: one of our cylinders peaks about 1gph sooner than the others so there’s no way to set the mixture right for everything. I just ordered $700 worth of fancy GAMI balanced fuel injectors to fix this problem.

There’s a lot more to say on the topic but I’m out of my depth. The best stuff I’ve read on engine operation are John Deakin’s Pelican’s Perch articles. Specifically “Where should I run my engine?” (1, 2, 3, 4). Also Go ahead, abuse your engine!, Mixture magic, and Detonation myths. These articles only present one side, they’re the foundational documents of the lean of peak religion, but they’re clear and make more sense than anything else I’ve found.

Linkblogging vs Twitter as microblogging

One of the oldest and most useful features of my blog is my Linkblog. That’s it over in the sidebar, you can see it here or subscribe to the RSS. Not much to the HTML view, it’s just a delicious page, but really it’s a blog. I post several links to it every day and the descriptions are written for an audience, you. These days it’s got better content than this main blog of mine.
Next Media
Long profile on the crazy Taiwanese outfit making hilarious animated news interpretations

Chirp n’ Chirp
Simple ambient display; tweets are turned into bird chirps

Google’s Islamic logo
Nutjobs think the Veteran’s day logo is somehow an Islamic thing

Salvaging a PV-2D Harpoon
Mechanic crew finds an old warbird airplane, gets it flying again

Linkblogging is an old blog form, arguably as old as blogging itself with Jorn’s pioneering Robot Wisdom. I read several linkblogs every day: Waxy, fakeisthenewreal, Jeremy Zawodny, iamcal, David Carlton, and an aggregation at HotLinks. (Jason Kottke and Anil Dash both used to be masters, but have rolled their links in to their main blogs.)

It strikes me how much linkblogging is like Twitter. A short, informational message you broadcast and then forget. Easy to create, easy to read, information lite. Linkblogs are different from Tweets in that they pivot around the link, a single chosen URL. And they’re not really suited for reading on a mobile, usually the linked site is a full web experience. I like linkblogging as a medium, I wish more people did it.

Lego games’ innovative split-screen UI

Traveller’s Tales’ Lego games are platform games that play particularly well in two player co-op. They’re fun, casual-friendly, and have great design and successful movie tie-ins. The most recent couple of Lego games have introduced an innovative solution to the problem of two people sharing one screen, a dynamic split-screen mode.
Traditional co-op games have two choices for display; either the entire screen contains a single scene and both players are required to be near each other or the screen is statically split in two and the players have private half-monitors to themselves. Neither are very satisfying.

Lego Harry Potter (and Lego Indiana Jones 2 before it) have a dynamic split-screen. If the players are near each other, they’re drawn together in one scene. If they wander apart the screen is sliced, two scenes, each centered on a player. The clever part is the cut angle is dynamic and calculated to keep the players relative position to each other apparent.

It’s hard to explain, but you can see it in action here where Harry and Ron separate and here where Harry flies up above Hermione. It feels very natural and smooth in the game. If a bit irritating, I felt some compulsion to stay close to my friend to avoid it. Still, a very clever solution to a hard UI problem.

Flying to Boston and back

Ken and I just got back from a 19 day flying trip. Ten days of actual flying, 5900 miles and 48 hours of operating the airplane (average speed of 140 mph; 6 hours spent maneuvering). Took about 500 gallons of gas, 12 mpg. Fortunately I didn’t learn to fly because I thought it was particularly practical. This trip was particularly frustrating because we got unlucky with headwinds and maintenance problems.
I am privileged to be able to travel in a small plane. Aside from being able to fly at all, I’m lucky that Ken has such a nice airplane for long trips. And we’re fortunate in having the time and money to go on a trip like this and just shrug off a few days’ delay. It’s unusual for a pilot as new as I to take such a long trip. I couldn’t do it without sharing the flying with Ken, both for his expertise and for his instrument rating in case of bad weather.

Here’s a map of our full route. My favourite stops were Kansas City for a nice downtown, Cleveland for a great dinner at Lola, and Tucumcari for a small airport fuel stop complete with borrowing a 20 year old cop car to drive in to town for enchiladas. I also enjoyed our time in St. Louis, even if it was frustrating; it’s a nice town with a lot to offer visitors.

Next up is a trip to Florida for Christmas. Looking forward to not flying through Kansas for once! We may hop over the ocean to the Bahamas while we’re at it, would be a nice entry in the logbook.

Time to spare? Go by air!

I’m sitting in St. Louis waiting for our plane to be fixed. This repair is the third required on our trip to Boston and back. The first was replacing a vacuum pump in Santa Fe; that only delayed us a few hours. The second was replacing a gear indicator switch in Poughkeepsie where we were stopped for a few days anyway. Failure #3 is bad luck, the attitude indicator failed on Saturday morning. Mechanics generally don’t work weekends and you have to have parts shipped anyway, so now it’s Tuesday and they just installed a new one and it doesn’t work, something else is wrong.

The good news is none of these failures was anything serious; the plane flies fine even without fixing them (albeit it’s not legal nor smart). The bad news is repairs are delays, multiple days of delay, and it gets a bit tiresome.

The other big slowdown in a little plane is winds. Generally you expect a 10-15kt wind from the west across the US, so you get a tailwind going east and a headwind coming home. But winds change a lot down low and we’ve had terrible luck. We haven’t seen a tailwind yet and half our days have had 25kt+ headwinds, making us travel 20% slower. Between headwinds and other weather our 3 day trip to Boston ended up taking 4.5.

At least we’re stuck in St. Louis and not somewhere in the middle of nowhere. It’s a nice city.

A single day of hacking maps

There’s an amazing amount of free mapping code and data out there but it’s difficult to figure out how it all fits together. Yesterday I did a one day spike of a map for pilots, a picture that emphasizes mountains higher than 8000′. What I love about this hack is how much technology was involved. Web servers, Javascript, PNG compositing. Geographic projections and image rendering. Data from three different sources, including the freaking Space Shuttle. And I was able to cobble it all together in less than a day without any real expertise in mapping. Hooray for Open Source Geo!

My product is a slippy map, a zoomable javascript map like Google Maps. The map has three data layers on it: raster aviation sectionals for the base map, a raster elevation overlay, and a vector state outline. I put it all together in Javascript using Polymaps, an amazing mapping library. All told it was 50 lines of Javascript, about an hour’s work.

Polymaps’ job is loading map tiles, what about the tiles themselves? I lifted the aviation sectionals from RunwayFinder and the state outlines from a PolyMaps demo. I had to build my own map layer for elevation. SRTM is an amazing free elevation dataset (7GB for North America, an hour’s download). But it’s just raw data and I need images.

SRTM is a simple enough format but I didn’t want to write a bunch of rendering software. Fortunately there’s MapServer, a dynamic web server for map tiles. MapServer wraps a CGI interface around GDAL, which does the heavy lifting of projection, scaling, and rendering (via libgd). The great thing about this software is it all just works and has great docs. I barely understand what it’s doing, but I got it working with an hour or two of tinkering.

I didn’t link my live map because my server would die; the dynamic rendering from Mapserver is too much for it. It’d be pretty simple to prerender all the SRTM tiles to about 100 gigs of image files for fast serving. That’d be a useful resource to host online for other mappers to use in their own products. But what I really want to do is move that 8000′ threshold I hardcoded into the user’s hands, to let you dial up and down and quickly see terrain levels. To do that requires some client side image manipulation, so that’s my next hack.

Minecraft blinking lights

For video games I’ve been playing almost nothing but Minecraft for weeks now. It’s a really amazing game / toy / sandbox, beautifully done. The ease of playing it combined with the complexity of what you can do with it makes for a really engaging game. It’s also horribly buggy and with comically bad graphics, although the graphics grow on you after awhile.

The video above is my first experiment with Redstone circuits, Minecraft’s complex digital logic system. I like blinking lights. The video also shows off the lovely Quandary texture pack, which combined with the texture rotator gives a nice sense of changing seasons.

Partial solution for Twitter mention spam

I’ve got a nice tight Twitter user name, @nelson. Unfortunately I’m not the only Nelson on Twitter and my mentions timeline is full of people trying to talk to Nelson Bocaranda, Nelson Rubens, Nelson Koenji, not to mention everyone in South Africa talking about being “@Nelson Mandela square”. It’s irritating.

One partial solution that either Twitter could implement or could be done in a Twitter client; filter on reply-to metadata. The mentions timeline includes everything with the string “@nelson” in the Tweet. But many mentions also have a “in_reply_to_screen_name” or “in_reply_to_status_id” set in the metadata. I’d like to not see Tweets which are clearly in reply to someone else.

A year of flying

Last September I took my first flying lesson. Partly because I was looking for something interesting to do, partly to share a hobby my partner Ken has had for nearly 20 years. Yesterday, a year later, I achieved my primary goal: to fly Ken in his plane. The flight went great and Ken didn’t even seem too nervous about me landing his baby. Mission accomplished!
In the past year I’ve flown 162 hours. 92 of that as pilot in command and 54 without an instructor. I’ve landed at 65 different airports and flown some 8000 miles. It’s all been fun and safe and I’m looking forward to doing a lot more flying. So what’s next?

The next big goal is an instrument rating so I can fly through clouds. It’s significantly more challenging than the basic pilot’s license and I plan to get some more experience before going for it. Right now I just want to get more confident and capable in the Cardinal, really master flying that plane. We’ve got some big trips planned in the next few months. Me solo up to Portland, also Ken and I to New York and back and then later to Florida (and maybe the Bahamas!).

Quick Apache scaling

There’s lots written about scaling large complex websites, but what does a casual sysadmin do to fix a simple Apache config? TechMeme picked up my Facebook blog post and suddenly hundreds of readers were coming, peaking at an awesome 4 requests/second. And my poor little blog got very slow, 30 second pageloads. Wutdo?

At first I assumed my server was melting; my blog software is old and simple. But uptime and top showed no CPU problems and free and vmstat showed no swapping. Blosxom’s simplicity is a good thing, there’s very little to go wrong, particularly with a little caching.

So the server was fine, why was my blog taking 30 seconds to load? The key insight came from Google Chrome’s resource panel which shows a little timeline of the page load. My main page was taking 17 seconds! That’s not good, the script itself executes in about 400ms. Worse, my page loads a bunch of images and CSS and javascript from my server and some of those loads were taking 10+ seconds as well. For static files.

The little light went off in my head: connection queuing. Each web request gets its own Apache process that has to hang around until the client at the other end of the Internet receives all the bytes. Apache has a limited number of workers and one slow browser may be using several at once. I only had 20 workers; it doesn’t take long for them all to be sitting around doing nothing except waiting for slow clients to download data. Once that happens new requests have to queue up and wait, 10+ seconds, and things go downhill quickly. You can diagnose queueing via netstat and Apache server-status.

The quick fix for queueing was to make my blog simpler, removing a bunch of images and Javascript to reduce my server load. The other quick fix was to modify prefork MaxClients, doubling to 40 workers. More workers is generally better right until you have too many and run out of RAM or CPU, so I was a bit conservative. Fortunately the blog slimming was enough and I had things running OK in about 10 minutes after the problem started.

That was all quick fixes in a crisis, what’s the right solution? A big fix is moving static resources to another server, I’d never quite believed that advice before this experience. Another fix is tuning Apache better, particularly using a different multiprocessing implementation. A final fix is making more of my Javascript asynchronous so the blog renders sooner. (The real solution is migrating my blog and getting out of the admin business entirely.)

Stop making social networks, Facebook won

Are you starting a social media company? Stop! Don’t build a new social network, please. Just use Facebook. Yes, it sucks, but Facebook won. Or as a friend of mine starting a company recently told me, “we consider Facebook to be layer 7 of the Internet”.

Apple just launched Ping, their iTunes social network. They also just launched Game Center, their gaming social network. These two social networks are brand new, you start with no friends. They’re also disjoint. That tapping you hear this week is millions of Apple nerds adding their friends, again, to a new set of applications.

Apparently I’m an active user of 12 social networks: Facebook, Twitter, four instant messengers, Skype, Flickr, Metafilter, Blizzard Real ID, Steam, Xbox Live. That doesn’t count the implicit social networks I’ve belonged to online for 10+ years, mostly via email. Then there’s the social networks I no longer use or deliberately avoid, like Aardvark, Buzz, FourSquare, Friendster, LinkedIn, LiveJournal, MySpace, Orkut, ping.fm, Plaxo, Yelp, or Zephyr. And my actual social network, the people I call for a beer when I’m bored or whose kids I buy Girl Scout cookies from because that’s how you do.

All of these social network applications just need one bit of vital information, “I know this person”. And “person” is identified by email address. A list of acquaintances’ email addresses is the universal social data.

I know, I know, your immediate thought is “but social media is more complicated! My users need to sort family from friends from coworkers and keep their nudie pictures private and what if someone changes their email address and how do I sell extra access to Zynga so they can spam my users’ friends with credit card offers?” Yes, that’s true, social relationships are complicated. Your special application can be as complex as you want, be assured you’ll get a bunch of details wrong. But the core thing, the list of acquaintances’ email addresses? Don’t make a new one.

I’m a little glib up above by saying “use Facebook”. Facebook puts a lot of conditions on using their social graph, enough that Apple won’t use their data. What would be best for users and every Internet company except for Facebook would be a proper open standard for social data. Sadly OpenSocial is a failure and because of network effects I think it’s too late to displace Facebook. So we’re all kind of screwed.

(The saddest thing? I found my list of social networks by searching Gmail for the phrase “your friend”. I found a lot of FourSquare spam but precious few actual friends.)

Update: quick clarification in response to feedback. I’m not saying “don’t compete with Facebook”, I’m saying “don’t build something new where I have to enter a new list of my acquaintances.”

Kindle 3

The Kindle 3 is good hardware. Amazon has been refining their ebook for several years and has finally gotten it good enough and cheap enough ($140) to make it a worthwhile purchase.

I prefer the Kindle over a paper book mostly for comfort. I tend to read lying on my side, which makes reading one side of a paper book awkward. The Kindle 3 is also light enough (half a pound) to hold up in the air for long periods. And of course one little Kindle holds lots of paper books.

The big downside to Kindle is you lose your right to resell or give away a book after finishing it. I’m uneasy with this compromise, particularly since Kindle editions are often more expensive than paperbacks. In exchange you get convenience, instant delivery, and a generous variety of free book samples.

One appealing thing about the Kindle is it’s more than just a viewer for Amazon ebooks. It can display pretty much any electronic document thanks to Calibre, third party conversion software. Calibre also has an interesting RSS-to-ebook option that you can use to automatically prepare a daily newspaper or magazine, although so far I’ve found Amazon sells subscriptions with better formatting for the periodicals I care about. Kindle’s ability to display PDF natively is handy too; Ken uses the larger Kindle DX for airplane charts.

A key thing about the Kindle is it’s not a computer, it’s not a general purpose device like an iPad. It’s just a book; you pick it up and read it. Sadly inside it is a computer and not a very good one. The user interface for anything other than reading books is terribly designed. Interaction speed is improved in Kindle 3, but still terribly sluggish. And Amazon continues to waste 20% of the surface area with a keyboard. Kindle 3 has removed the most useful keys, the number keys, so now navigating large documents requires a clumsy on screen keyboard. But all the bad-computer awkwardness goes away when you use the Kindle as a book. And it’s a very good book.

I get a few shekels if you buy a Kindle via my links

LastPass: reasonable password management

Update Sep 2023: I wrote this post 13 years ago. LastPass is now terrible, do not use it. They had a catastrophic breach last year where all their user data was stolen and now people are stealing victim’s cryptocurrency. I switched to 1Password several years ago. It was better then, still good now. And LastPass is a disaster.

LastPass is good software. It’s a password agent, software that remembers your zillions of passwords for different websites and autofills them in your browser. It works with every consumer operating system, it works in every major browser except Opera, and mostly it just works. The free version is pretty limited, you really want the $1/month version.

I’ve tried a variety of password managers over time and gave up on them all. Either the browser integration was awkward or some fundamental aspect of the design was insecure or unusable. LastPass gets a lot right. Form filling is the best I’ve seen. Passwords are stored on the lastpass.com server so you can access them from multiple devices but are only decrypted on your client so they remain secure. There’s multiple levels of credentials for varying security needs. And there’s a plain text export to CSV option for offline backup.

Drawbacks? The UI is pretty clumsy, particular the 100+ configuration options that fortunately you can mostly ignore. The iPhone version is usable but awkward because of Apple’s limitations. And while LastPass is as secure a design as I can imagine, I’m still uneasy with all my passwords sitting in one place. But then again I accepted that risk years ago with stored browser passwords; at least LastPass encrypts my data.

I still resent that I need passwords at all, it’s time the Web moved to a post-1970s form of authentication. But LastPass solves a lot of problems: it makes it easy to have secure unique passwords for every site and allows two factor authentication for robust security. It’s a pretty good solution.

Changing horses

Flying different kinds of airplanes gets confusing. After flying one plane exclusively for my PPL training I started sampling other kinds of planes. It’s been a good experience but I’m ready now to settle down and concentrate on flying Ken’s Cardinal.

Every airplane flies a bit different. The three Cessnas I’ve flown (172SP, 177RG, and 182S) are all roughly similar planes. But each has a different engine, a different feel, and for the 177 extra complexity. The feel is most noticeable when landing. All three planes claim you land at about 65kts. But the 172 feels much slower, is light on the controls, forgiving if you flare a little too high. The 182 is incredibly heavy and you have to drive it nose down until the last second, then haul back quickly (but not too quickly!) while using trim to manage the weight. The 177 is somewhere inbetween and despite the oddity of its stabilator design flares quite nicely.

I just got about 10 hours flying the Cirrus SR22 turbo, a Lexus in comparison the various Volkswagens I’ve been flying. It’s fast, elegant, and has a beautifully designed glass cockpit. Really fun plane, I particularly like having turbonormalized power so the plane just flies better the higher you go. The Cirrus is challenging to land, it’s faster and heavier than what I’m used to and the tail design means you have to be careful not to flare too much. I found the Cirrus a real handful, it’d take me awhile still before I’d be comfortable flying it solo.

I’m impressed with flight instructors who move from type to type every day, flying everything they’re in. All planes fly more or less the same, I guess, but I need more experience flying before switching planes. For now I plan to fly nothing but the Cardinal for a few months, get really comfortable in it.

The end of used PC games?

An interesting thing is happening in the PC game market: consumers are losing the ability to resell their games.

For the past few years a new PC game has cost $50–$60. You play it for a few weeks, then store it or sell it. Game stores will buy a recent used game for $20 and resell it for $40–$50. Naturally, game publishers hate the used game market; they get no revenue from the second sale.

Massively multiplayer MMOs like World of Warcraft made a big market shift a few years back; consumers buy a non-transferrable account for $15/month, no possibility of a used copy. And recent single players games like Dragon Age have been limiting the used games market by including a one-time use code for extra content. Used copies are still playable without the extra stuff, or you can buy the rest for $10 or $15.

Then Starcraft 2 came out and blew the market entirely apart. There’s no such thing as a used copy of Starcraft 2. You must have an online account to play, even the single player game. But unlike an MMO there’s no technical necessity for the account, Blizzard just did it that way because they could. Suprisingly few people have complained and the new business model hasn’t harmed Starcraft’s sales noticeably. Consumers seem entirely willing to give up their first-sale rights for PC games.

A similar transition is happening in the electronic book world. You can’t resell or gift a Kindle book, it’s forever bound to the account of whoever bought it. No first-sale rights. The Kindle edition is often more expensive, too. It’s pretty alarming, particularly if you love used bookstores. It’s not clear which way movie streaming will go. Netflix’ $10 for all the movies you can watch is so cheap right now, but expect that to change as the market matures.

A terrifying takeoff

Saturday I had an interesting flying experience taking off on runway 29 at Columbia. I might well have crashed if it weren’t for the instructor with me. Great lesson.

29 is a grass runway, a rarity in California. I’d trained on soft field technique for my license but I’d never done it for real. The trick is to get the wheels off the ground as fast as you can so you can accelerate better. Because of ground effect you actually lift off before you’re going the 55kts or so you need to properly fly, so it’s important to push the nose back down towards the ground so that you stay level in ground effect until you accelerate to flying speed.

But 29 isn’t just a soft runway, it’s short. 2600′ but with a 1% upslope and a 40′ hill just 1200′ past the runway end and another hill with trees on it just past that. I’ve trained on short field technique and thought I was pretty good at it. It’s easy enough; you rotate precisely at 52kts, climb at 61kts, and know the math ahead of time for how much distance you need to clear your obstacle.

That’s all the theory. In practice what happened was we rolled slowly down the runway and the wheels come off the ground just at our abort point. Great, we’re airborne! Then I looked up and saw the hill coming at me and freaked out and did precisely the wrong thing, pulling back to try to climb fast. Only we were going so slow that the moment we got out of ground effect the plane would have come right back down again, crashing us in to the hill.

Fortunately my instructor has enough experience to anticipate the mistake I was going to make. He immediately took over and did the right thing, the scary thing, pointing the plane’s nose down into the hill for a few seconds until we were fast enough to pitch up and climb. He tells me we cleared the hill with plenty of room to spare, I didn’t see a thing because my eyes were shut tight. (OK, not really, we were just pitched high enough I couldn’t see the hill in front of us. Next time I’ll look out the side.)

I’m exaggerating the danger for effect, I’m sure my instructor knew all along we would be fine. But I didn’t know that and I wouldn’t have been fine by myself. I’m well enough trained now that the ordinary flights I do are pretty boring; it’s easy to get complacent and sloppy. Great lesson to see the importance of proper technique. It’s also useful to learn the limits of your skills. I don’t plan to do a soft + short field takeoff on my own anytime soon.

Why would Google give up on net neutrality?

Google just threw wireless network neutrality under the bus. What I can’t figure out is why. No one seems to know, and I’ve asked people who really should know. Even if Google has suddenly become Evil, how do they benefit from agreeing that carriers like Verizon should filter their traffic?

Google is an advertisement company first, a content company second. They need open networks to spread their ads and products. They have very little leverage over network carriers, particularly the last mile to people’s homes and cell phones. Google believes it dominates the market through sheer product excellence. They are confident they can win any fair competition, which is why they are the poster child for network neutrality. From a personal appeal from the CEO to some brilliant jujitsu in the 700MHz auction, Google has strongly pushed for open networks. Until now.

Google’s proposal with Verizon is not a complete about-face. Verizon has agreed to the principle of net neutrality for today’s wired Internet. And they have agreed to disclose preferential treatment of traffic. These are steps forward. But in exchange, Google is saying they’re OK with Verizon completely abandoning net neutrality on wireless networks. Why?

The best explanation I’ve come up with is Google believes that they have no choice. Wireless bandwidth is scarce; AT&T’s horrible iPhone performance shows what can happen without any quality of service management. I can imagine Google sitting down with wireless carriers and saying “ok, for now you can’t really stream video to cell phones reliably. How about we share ad revenue from Youtube in exchange for you prioritizing our packets?” Maybe that helps freeze out Apple and Microsoft. But that would be Google negotiating from a position of weakness, which is out of character for the company.

Furthermore, wireless scarcity is a temporary problem. Bandwidth improves. New cellular protocols, increasingly ubiquitous WiFi, WiMax ... in ten years I believe we’ll have a glut of wireless bandwidth. It’d be crazy for Google to give up the principle of network neutrality just to get a temporary advantage for the next couple of years. Google is trying to frame the core regulatory framework for the next 50 years. Is this proposal the most freedom from the carriers Google can negotiate?

One thing that’s clear: the FCC has been completely useless in shaping this debate. People rightly complain that Google is acting like an oligarchy, but I think they don’t really have any choice. Someone’s got to lead and I’d rather it were Google than Verizon, or AT&T, or a slow moving bureaucracy.

Update: Google has posted an explanation of their motivations. Read it yourself, but my takeaway is “this agreement is the best we could do”.

Our trip to Oshkosh

Ken and I are back from EAA Airventure, 3500 miles and 30 hours of flying. A great impromptu roadtrip via airplane: not too much planning, just go where we felt like each day. Our final itinerary wasn’t too far off the rough plan, here’s some impressions from the road.
Day 1: The Western US is really empty. Nevada, Utah, Wyoming, Idaho, they don’t offer much to the air traveller. Cheyenne had the rodeo in town so we stayed in Casper, a decidedly meh town, decent dinner at FireRock.

Day 2: Downtown Fargo was surprisingly sophisticated. We had a great dinner at the ambitious Silver Moon Supper Club, run by a prodigal son bringing Manhattan-style dining to Fargo. Nice bar, beautifully restored dining room, excellent service, and a well thought out menu. We also liked the lounge at the Hotel Donaldson, a smart boutique hotel.

Days 3–8: Wisconsin is surprisingly bland. I like middle America and enjoy smaller towns, but during our stay in the Fox River valley we failed to find anything superliminal. (Airventure itself was awesome, but that’s another blog post.) There is excellent Mexican food at Zacatecas in Neenah and the nearby Saint James bar was comfortable. But when the signature local food is deep fried cheese curds you gotta dig deeper.

Day 9: Wichita, a last minute decision because we were getting such nice tailwinds. Old Town is an interesting urban renewal project, a warehouse district converted to bars and restaurants and an ersatz town square. It seems to be working pretty well but it was too damn hot and on a Sunday most everything was closed. Wichita is the airplane manufacturing capital of the US: we need to go back with a plan to do some factory touring.

Day 10: Santa Fe, my old home. I’d forgotten how mediocre Tomasita’s is and regret asking to meet friends there, but we had a good time. Tia Sophia’s is still fantastic for breakfast. The cathedral is remarkably beautiful, particularly the light and colourful interior.

Day 11: Lake Havasu City is an astonishingly ugly town where despite it regularly being 120° (90° at 5AM) it’s full of boaters in summer and drunk bimbos and jocks for Spring Break. We intended just to stop for lunch but got stuck there overnight when the alternator on the plane failed. Actually it turned out fine because all the locals we met were so welcoming and helpful, really nice folks. Desert Skies FBO set us up with a loaner car and a place to stay and Arizona Aircraft Maintenance did a fantastic job getting our plane fixed and us quickly on our way. I’ll definitely be stopping here again for fuel and great barbeque, just not in the middle of the summer.

We had a really nice time on the trip and I look forward to travelling like this again. Seeing the country in a little plane is a whole different experience; you go faster, you’re more disconnected up at 10,000′, but then when you land you’re suddenly very local.

Our plan for Oshkosh

Ken and I leave tomorrow for Oshkosh, WI and the EAA AirVenture, the Woodstock / Frankfurt Book Fair / Boy Scout Jamboree of American aviation. It’s enormous, some 300,000 people come every year. The true experience is to fly in to the crazy busy airport and camp on the field in a tent under your wings. Ken and I have opted for flying in to a nearby airport and staying in a hotel, more our speed.

This trip will be my first time planning a multiday plane trip. It’s complicated finding a route that is safe, efficient, and interesting. The hard part is finding airports where once you land you’ll find something to do and a way to get to a decent hotel and dinner.

We’re planning on three days, stopping tomorrow in Casper WY and the day after in Fargo ND. Also lunch stops in Wendover UT and Spearfish SD. All places I’d never imagined myself going! You can see our full route: 1667nm, or about 15 hours of flying. Weather permitting.

The best times in my life have been car road trips where I wasn’t quite sure where I’d end up any given day. Flying in your own plane is pretty flexible, but the logistics of finding ground transportation feel a bit confining. Then again for once Ken is the relaxed one about travel plans, he’s happy to take what comes to us. Should be fun!

Complex

I’ve finally started training on my real flying goal, Ken’s 1978 Cardinal RG. Ken’s had this plane almost 20 years, I’m lucky to be able to fly it. Ken gave me a key last week! Turns out it’s a pretty challenging step up for a new pilot.

The Cardinal is the Cessna 177; not that different a model from the 172s I learned in. But 172s are designed as trainers, easy to land. The 177 is a travel plane. Every aspect of the design is more aerodynamic, from a cantilevered wing without a strut dragging in the air to the fuel tank vents hidden in the wings, not sticking out in the breeze. It makes for a faster plane (146kts vs. 122kts), but it also handles totally differently.

The other change in the Cardinal RG is the RG; retractable gear. I have to remember to put the wheels down every single time I land. I won’t die if I forget, but landing gear up makes a hell of a mess and causes the prop to hit the ground, requiring an expensive engine rebuild. I’m doing fine with not forgetting so far, I’m hyper-aware in the new plane.

The hard part is the plane flies differently with the wheels hanging out. It adds major drag, like flaps, but without any lift to compensate. If I want to stay level at the same speed I need to add about 15% power. The drag comes in handy, it makes it easier to slow the plane down for landing. And with gear down and full flaps the plane descends quite quickly, helpful if you’re too high. On my first simulated engine-out landing my instructor sat quietly while I tried to figure out what to do. I put the gear down first thing, so I wouldn’t forget later. Big mistake: the plane dropped so fast I would have landed about 500′ short if my engine were really dead. Lesson learned, now I respect the drag from the gear.

Ken and I are headed to Oshkosh for the big annual pilot’s jamboree. I was hoping to be fully trained in the Cardinal by now so we could share the flying, but maintenance delays and insurance requirements mean I’m going to be a passenger on this trip. I’ve got a lot I can learn in the right seat, particularly all the fancy avionics Ken has: GNS 430W GPS, MX20 display, STEC 55x autopilot, EDM 730 engine monitor, even the clock is complex. Nice to learn all the systems without the distraction of flying the plane.

Colorado mountain flying

A couple of weeks ago I went on an absolutely fantastic flying trip, a 5 day journey to the Colorado Rockies with the Flyout Group. Normally in little planes you avoid mountains, cross high and quick for safety. For this trip we sought the mountains out to enjoy the challenge of flying down in them.

The map above (KML) is from our most mountainous flying, a full day of playing around in the valleys and mountain passes of the Rockies. Some of the highlights include flying through Independence Pass (12,095′) and landing at the highest airport in the US (9927′). The 182 we were flying isn’t very happy flying over 12,000′ and we were breathing supplemental oxygen, but that just made it all the more fun.

The main purpose of the trip was instructional: Ken and I had an instructor with us. We got a lot of practical experience with density altitude and performance, learning just what it really feels like taking off at 9000′ on a 90° day. We got lucky with calm winds, only 10-15kts at the ridgetops, so we never had to deal with any significant turbulence or downdrafts. That let us fly safely down in the valleys but I’m a little sorry I didn’t get more experience with more challenging conditions. Then again we got some very exciting flying with beautiful sights.

It’s startling to look under your left wing and see mountains above you! But at a safe distance with good weather, it’s fun. See my photo set for more pictures; on the fourth day we flew over Utah along the Colorado River and I got a lot of great overhead shots of Glen Canyon. I also landed and took off at Las Vegas International (very busy), landed in Death Valley (-210′), and took my first flight over the Sierras. A great week of flying, I’m ready for more!

Density altitude

I just got back from my mountain flying trip; 5 days to Colorado and back. Lots to say about the trip. One thing I learned first hand was how different it is flying a plane on a 100° day at 9000 feet. It’s a little alarming when the plane keeps lumbering down the runway and never wants to take off. Heck, at Telluride we took advantage of the fact the airport is up on a plateau; as soon as you clear the fence you can drop down 1000′ into the canyon.

The key idea is density altitude, a measure of air thickness. Little piston airplanes don’t fly well in thin air. We need air molecules under the wings to generate lift, oxygen to burn fuel, and airflow to cool the engine. For takeoffs and landings the thicker the air the better: a Cessna 182 needs only 645′ of runway to get airborne at sea level but at the highest airport in the US it needs 1430′. Field elevation is the most important thing driving density altitude, but pressure, temperature, and humidity also matter.

At sea level when it’s 15°C and 29.92inHg density altitude is roughly 0′. On a warm 30°C day it goes to 1800′. When we took off yesterday from the lowest airport in the US it was so damn hot in Death Valley that it was like being at 2600′, despite the airport being at -200′. 10°C is roughly 1000′ in density altitude. Hot mountain summers require careful attention to plane performance.

How planes navigate

The nice thing about flying is you can go directly between airports; no following roads. But pilots often choose a more complex route to avoid mountains and in instrument conditions pilots have to follow specific airways. There’s no signs in the sky, how do we navigate?

Pilotage and dead reckoning are the most elemental navigation. Pilotage just means “looking down”, trying to figure out where you are by matching what you see on the ground to what’s on your chart. It’s remarkably difficult, particularly high up, but following roads and recognizing unusual landmarks works OK. Dead reckoning is the art of guessing where you are by what direction you’ve been going. It’s pretty unreliable, particularly because of winds aloft, but it can give you some idea where you are.

Beacons are the historical source of airplane navigation. A VOR radio beacon tells you the bearing to a known station on your chart; cross-checking two VORs (or using DME) gives you location to a pretty precise point. Earlier beacons include NDBs, four course ranges, and beacon lights (map, current operation in Montana). The drawback to beacon navigation is you only learn your position relative to some fixed, expensive-to-maintain equipment. Also it’s generally only easy to fly directly to or from a beacon, hard to fly any path.

Area navigation is the simplest way to know where you are, X marks the spot. Everyone knows GPS, it makes airplane navigation very simple. Predecessors to GPS include LORAN (RIP) and good ol’ sextants, used until the 1970s. An interesting alternative is inertial navigation, in active use today in commercial aircraft and quite accurate as long as you can occasionally correct the accumulated errors with some other reference.

I pretty much always navigate via GPS: plug in the course and fly the purple line. But GPS can and does fail, so it’s important to stay current with other forms of navigation. Pilotage is fun and keeps you busy long boring flights. VORs are still an important part of IFR flying. But honestly, GPS is so great it’s hard to use anything else.

Facebook’s tech mindshare

I have the arrogance of having worked at Google; I thought I knew all there was about Internet technology leadership. But I’ve overlooked Facebook; they’re doing some very impressive tech. And Facebook’s openness gives them some mindshare over Google.

Pingdom just posted a roundup of Facebook technologies that’s worth reading. Load balancers, distributed datastores, scaleable logging, etc: a lot of good systems technology. Many of their systems tools are available open source; a lot of startups I talk to are using various parts of Facebook’s tech. Google has plenty of open source too but they tend to keep the server systems proprietary. If you want a distributed datastore today you may read the BigTable paper but you’re going to be using Facebook’s Cassandra.

Facebook’s API strategy is also impressive. They own the American social network: if you’re building something using social relationships it’s really tempting to do it inside Facebook. (Or as one startup friend of mine put it, “Facebook is layer 8 of the Internet”.) People have complained about how awkward the earlier Facebook APIs have been to use. But the Facebook Graph API is the new hotness and it’s nicely designed. I’m particularly struck by how it’s typeless, all data objects in Facebook have a unique 64 bit id and they’re all accessed via URLs like https://graph.facebook.com/649745863. I’m liking this flat REST+JSON design.

Going places

I’ve finally gotten to use my pilot’s license for what I originally planned: actually going places! As a student I was on a short leash and since getting my ticket it’s been hard to line up a plane rental, good weather, and the right mood to go somewhere. But this week has been great: 1000nm of flying, 10 hours.

Monday was a big flight I’d been anticipating for weeks: taking Ken up to Grant’s Pass, Oregon to pick up his plane. My first time out of state, my first time over real mountains, and my first time flying over 10,000 feet. The route we took following I-5 never requires you go over 7000′ or so, but that’s still serious terrain and you get within a few miles of Mt. Shasta, a volcano at 14,200. Unfortunately we weren’t able to land in Oregon because there were clouds below us, but I dropped Ken off in Redding to rent a car. Frustratingly the weather cleared an hour later!

Today’s flight was a classic lunch run to Santa Maria. Nothing too challenging, but a good long distance and a pleasant trip to somewhere different. I finally got what I’ve been looking for; getting bored in the cockpit. I need to start bringing friends with me on trips like this. (Feel free to ask!)

Next week Ken and I are going with a CFI on a group flight to Colorado, 5 days of challenging mountain flying. If the weather allows we’ll be doing things like flying through Independence Pass, where the low spot is at 12,093′. And then next month we’re flying to OshKosh for AirVenture, probably three days there and three days back again. It’s not particularly cheap, fast, or convenient, but it’s fun to fly yourself.

RIP Steve Dyer

I’m sad to have learned that Steve Dyer has passed away. Steve was an old friend from Boston and from soc.motss, the gay and lesbian Usenet group I frequented around 1989-1996. We haven’t talked in years, but his generous social and Internet life have had a big impact on my life.

Steve was an old Unix and Internet hacker, in the center of net technology and culture in the early 80s. He founded net.motss in 1983, our own little place on Usenet for gay culture. That culture became an important part of many people’s lives. Motss was my window on to the gay world when I was in college, a wider place full of intelligent people from all sorts of backgrounds. I wouldn’t have met a whole lot of friends without motss, including my partner Ken. Later Steve also founded the Bears Mailing List which was instrumental in defining a subculture for gay men who were unrepresented in mainstream gay culture.

Internet communities always seem to have people like Steve: someone who creates places for a group, who does the organization and the shaping. Steve was particularly good at connecting socially, every motsser I know has a fond story of a casual gathering at Steve’s house where they could finally meet motssers in person. Steve was a particular joy face-to-face because of the mirthful twinkle in his eye, friendly and wicked-smart and very generous to people. I regret now we hadn’t spoken in some 10 years, I’m sad he’s gone.

Eye-Fi: SD card + wireless

The Eye-Fi is good hardware. It’s a magic SD card that you put in an ordinary digital camera to give it WiFi capability. With the Eye-Fi your camera will automatically and wirelessly upload photos to your computer, sharing sites like Flickr or Facebook, printing sites like Wal-Mart. It’ll even upload video to Youtube. I bought it solely to physically avoid plugging my camera in to a computer; I’d been using the crappy iPhone camera for photos because it was simpler to upload from.

But what Eye-Fi really is is a marvel of tiny WiFi engineering. Buried in a standard SD card the size of one fingerjoint is a WiFi adapter with an antenna powerful enough to work from inside a camera. All powered off the camera’s battery. It’s kind of crazy that cameras don’t have WiFi themselves, but Eye-Fi’s solution works pretty well.

But what’s really exciting about Eye-Fi is what else you could do with it other than photography. GPS trackers. Cell phones. Game consoles. Basically any device that has a storage interface could be given WiFi capability. Sadly, Eye-Fi has focussed their product specifically on the photo market and is not hacker friendly, so you can’t actually do anything other than cameras with the hardware. Too bad.

The basic Eye-Fi goes for $50; compare $12 for an equivalent non-wireless card. At that price the only drawback is that the Eye-Fi may shorten camera battery life. The other caveat is there’s a confusing proliferation of products. It all seems to be basically the same hardware, but the fancier versions will upload to public WiFi hotspots and geotag photos. Between the artificial product differentiation and the closed platform it feels a bit like they don’t know how to make enough money selling the basic thing. But that’s OK, because the base product is great.

Update: the day after posting this, Eye-Fi upgraded its desktop software. The upgrade shut my machine down without asking permission! Even better, it tried to disable the anti-virus software while installing. Very bad.

Butt Magazine

You know the old joke about Playboy magazine, about how he “reads it for the articles”? It’s funny because it’s true. That’s what Butt Magazine is like, only instead of cheesy airbrushed naked chicks paired with faux-sophisticate culture it’s slightly gritty naked guys with faux-casual sophisticated culture. It feels like a well produced zine, with a very personal editorial slant. Instead of the usual hairless-youth or bearish-30something mindless gay crap it’s more hipster, nerdy.

Butt started as a magazine published in Amsterdam in 2001. What’s remarkable about it are the interviews: Casey Spooner, Matmos, Michael Stipe, Martin DeGville (Sigue Sigue Sputnik). Fashion and art too: Marc Jacobs, Roger Payne, Matthias Vriens, Gus Van Sant, Edmund White (a particularly good one). Some straight out porn: Peter Berlin and Bruce LaBruce. I also love their random other interviews: Julian Ganio “the gereontophile poster boy of the London scene”, Perez Hilton, Gore Vidal. Their interview style is very personal, simultaneously casual and way more revealing than the usual garbage. It’s thoughtful journalism. The photos are good too, particularly the non-porny erotic shots, although their insistence of publishing on pink newsprint makes it hard to really enjoy the detail.

Sadly, Butt is going on a bit of sabbatical so now isn’t a great time to subscribe. I can strongly recommend the Butt Book, though, a compilation of the best articles from the first 17 issues. The main website is interesting too, they’ve gone a bit bloggy.

I’ve mostly gotten bored with being gay. Gay overculture doesn’t interest me, it’s too vapid and too cruising focussed. Butt reminds me of the interesting part of being a sexual outsider.

Four Course A/N radio range

The very first radio navigation for aircraft was the Low-frequency radio range. Marvellously simple idea: a directional radio station broadcasts the Morse code for A · – to the north and south, and N – · to the east and west. You listen to that transmission in your headset. You listen to the station in your airplane; if you hear A you’re north or south of the station, N east or west. But if you’re directly NW, NE, SW, or SE of the station you hear both A and N overlapping and merging into a single steady tone. Fly that tone and you’re flying in a straight line right to or from the beacon. Of course the station doesn’t have to be oriented to north, the actual navigation network had some 400 stations in the US defining a network of airways.

Aviation enthusiasts WWRB have built a working four course range, demonstrated in the video above. Skip to 4:28 for a technical explanation or 7:17 for a demo flight. Four course ranges were decommissioned about 40 years ago in favour of VOR, the system we use today. VOR is the same principle but lets you fly any bearing and uses electronics instead of sound to track the radial.

Hypoxia and Beale altitude training

My first real flight with a pilot’s license was Sunday, up to Marysville Airport to visit nearby Beale Air Force Base. Beale is home to the U-2 and RQ-4 drone; the 9th Medical Group supports the U-2 pilots with high altitude medical expertise. Once a month they offer abbreviated high altitude training to civilian pilots.

Hypoxia is a real threat to general aviation pilots. Our planes only go up to 15,000 feet or so, but they’re almost always unpressurized and often don’t have any oxygen on board. Legally I can fly up to 12,500 feet without any supplemental oxygen. That may not be wise, particularly since one of the symptoms of hypoxia is euphoria; you may not even recognize a problem.

Our training started with four hours of ground briefing. Then the good part, an hour in the high altitude simulation chamber for a “flight”. The hardest part for me was the half hour of pure oxygen through a mask at sea level: a bit of suffocation anxiety. Once we’d lowered our nitrogen concentration in the blood we climbed up to the real test, taking the mask off at 25,000 feet pressure altitude to enjoy our 3–5 “minutes of useful consciousness”.

The briefers gave us a list of about 10 different symptoms people experience during hypoxia: headache, dizzyness, gasping for air, hot flashes, turning blue, etc. Apparently you get the same symptoms every time. The game is to recognize them in yourself, then turn on your own oxygen. I was doing just fine for about a minute until suddenly wham my vision shut down, everything going grey and collapsing to a narrow tunnel. Scared the heck out of me, I was quick to put my mask back on and everything was back to normal within thirty seconds. Some of the other folks delayed putting on their masks for several minutes, either wanting to get the most from the experience or out of pure belligerence (another hypoxia symptom).

Overall it was a good trip and I’m thankful to the Air Force for providing such expert training to GA pilots. I think I know more about handling rapid decompression than the creeping hypoxia that’s the real threat to me, but hopefully I’ll know now to recognize when my vision starts failing or my fingernails turn blue.

Got my ticket!

It was such a long time coming I forgot to blog that I got my pilot’s license last Thursday. My check ride got postponed three times for weather but I finally got it done. Not my best flying that day, to be honest, but safe and up to the standard. Very happy and proud to have it done.

All told it took me six months to be ready for the private pilot’s license: 80 hours of flying and 120 hours of my instructor’s time. I could have done it in less time if I’d been more focussed. But all the learning was fun and I figured now was the time I was going to learn how to fly the most efficiently, so might as well do some extra training at the start. Learning to fly is the first time I’ve been aware that I’m old enough that it’s hard to learn new tricks. (Rule of thumb: 2x your age in hours to get the license).

I now have two main privileges over being a student. I can fly anywhere without an instructor’s signoff and I can take passengers. I haven’t flown since the check ride, but if this crazy weather permits I’ll do a little trip to Salinas tomorrow. I’m eager to do more serious cross-country trips, overnights travelling 400 miles or so. Reserving rental planes makes it difficult to go on short notice.

What next? Flying has all sorts of merit badges one can earn. The first thing I want to get is my complex rating so I can fly Ken’s Cardinal RG. I’ll also need a bit of instruction in that plane and probably some more hours just flying before I’m comfortable moving up to it. Ken and I have two flying trips planned this summer: mountain flying in Colorado with a flight instructor in June and heading out to AirVenture in OshKosh in July. Mostly I just want to fly a bunch of cross-country trips. Down the road I hope to start training for my instrument rating; that’s kind of like the second half of a pilot’s license, the ability to fly in bad weather.

Wine cellar software

It took a year and a half, but I finally catalogued and put away our wine. All 448 bottles: 80% reds, 40% Bordeaux/Cabernet, 50/50 US/French.
There’s a lot of bad wine software out there. I looked long and hard for a good web based wine inventory solution before settling on CellarTracker / GrapeStories / cor.kz. I have two specific goals for wine cellar software. It needs to be easy to enter purchases. And it needs to quickly answer questions like “do I have a nice old Bordeaux?” or “where is a cheap Chardonnay for tonight?”. It’s astonishing how few cellar apps solve those problems. There’s iPhone apps that expect you to type in all your wines on the phone! And no app does a great job on the “find a wine” problem. I like CellarTracker best, but some good alternatives are VinCellar and ManageYourCellar.

CellarTracker has been around a long time, it’s got a huge community of wine enthusiasts. The website shows its age, you can feel the SQL queries being built up as you navigate the user interface (OTOH, it’s very powerful.) There’s a more humane user interface in beta now, GrapeStories, which provides a modern AJAXy interface to the same backend database. There’s also cor.kz, an iPhone app that also uses your CellarTracker account as the backend. Great for quickly finding a wine without using a computer.

One amazing thing about CellarTracker is the depth of the database. Wine canonicalization is a tricky thing, there’s no universal identifier like a UPC or ISBN. So you have to type in “Leroy Vosne-Romanée” and then sift through the seven or so variants to get the right one. They have a great search UI for finding your wine. Only about 7 of my wines were missing, all unremarkable novelty wine. And now that everything is identified I can take advantage of their vast library of tasting notes, recommended drinking dates, pricing, etc.

CellarTracker has a lot of features, I’m just scratching the surface. Bar codes, printed reports, shopping pointers. And I haven’t even looked into the community yet. Given how much money is spent on wine you’d think someone would have sewn up the Internet wine market already. With the new UI at GrapeStories I think it may be on its way.

PS: I almost passed on CellarTracker because it stores your password in the clear. That’s a pretty terrible sin but they’re quite clear on disclosing the problem and the author is remorseful. I finally decided just to use a unique throwaway password for just this site.

Finding airplanes in the sky

Air traffic control has a pretty good picture of where all the airplanes in the sky are. The technology for finding airplanes is remarkably complex and varied and is in the middle of some significant upheaval. Plane location tech has been under development 50+ years and is slowly evolving from a centralized, radar-based system to a peer-to-peer GPS-based system. It’s kinda neat.

Radar is the primary way ATC finds planes. Tracon facilities have a network of radar installations, each updating every 5 seconds with a range of roughly 60 miles. Radar tells ATC where something is but not what it is. So to augment radar, most planes also actively transmit data with a transponder.

Most little airplanes have a Mode A/C transponder operating at 1030/1090MHz responding to broadcast queries with a simple digital encoding. Mode A queries are answered by the plane with a 12 bit squawk code. I usually fly with the anonymous code 1200, but if I’m getting ATC services they assign me a unique code. A Mode C query is answered with an altitude reply to the nearest 100 feet. (Awkwardly, there’s no distinguishing a Mode A reply from a Mode C other than context). Mode A/C responses were designed to be received solely by ATC, controllers verbally tell pilots where other planes are. Recent fancy TCAS systems can listen in on the transponder traffic to show plane locations in the cockpit, there’s even inexpensive portable receivers for mode C data.

Mode S is the current state of the art used by commercial aviation. It’s 1030/1090MHz as well but with 20 or so different responses of up to 112 bits each. Planes can be individually queried by their unique 24 bit address. Planes also can continuously broadcast their GPS position and velocity on an extended squitter. Mode S equipped planes usually receive TIS data from the ground which basically lets the pilot replicate the plane location display the controller has.

The new hotness is UAT, a system designed around peer-to-peer communication and flexible data protocols. Planes broadcast their GPS position and velocity for reception by anyone. Other planes and ATC listen in. UAT also includes significant data services like weather radar images. UAT is still not quite finalized, but the FAA has a plan for coverage.

An interesting alternate technology is FLARM, an unofficial transponder system developed by enthusiasts in Europe. Basically glider pilots got sick of waiting for someone to make a collision avoidance system that’d be cheap and light and low power, so they built their own. It’s conceptually similar to ADS-B but simpler and has been a rare hacker-style success in avionics.

Mode S and UAT are two implementations of ADS-B, the FAA’s big plan for the future of ATC. There’s a lot of politics about the two competing techs: UAT is newer but commerical airlines already implemented Mode S and don’t want to pay to upgrade. A final ruling is overdue but it looks like the FAA is going to bless both systems with ground repeating stations translating data.

The interesting thing to me about this is how we’re slowly moving from a ground-based surveillance design to a cooperative peer-to-peer system. (The shipping industry is ahead of aviation, with some pretty cool apps). A key enabler of this transition has been better radio signal technology so that little planes can be two way communication nodes in an airborne network. GPS is also essential, knowing exactly where you are is a big deal. There’s a lot of ugly detail in the specifics, but those details are interesting responses to limitations of older technology.

Thanks to Wikipedia’s aviation community, their articles are good

Wind

I have half a pilot’s license. My checkride was yesterday at Castle. I did great on the oral exam but decided to postpone the flying portion because the winds got too strong (17-25kts). Same thing forecast today, so now I’m in limbo hoping to finish the exam next week. Grr!
Planes drift with the wind. You can’t really feel a steady wind, all you sense is your speed over the ground changes. My plane goes about 120kts and winds are typically 10-30kts, so my real speed is ±25% which makes a big difference for fuel planning. A crosswind also pushes you off course, so you have to calculate wind corrections. Easy when travelling straight, but one of the checkride tests is flying a perfect circle around a landmark. Not easy with a 20kt wind blowing you off course.

Steady winds straight down the runway present no problem, if anything they make it easier to takeoff and land. Winds blowing across the runway are a different matter; difficult crosswind landings are something every pilot respects. Coming home yesterday I landed in a 10-14kt crosswind at San Carlos, but it took me 3 tries.

The biggest problem with strong winds is they’re seldom steady. If a wind is 10kt gusting 20kt, your airspeed may suddenly drop 10kts in a lull. That can be a problem if you’re flying slow near stalling speed. And gusty winds require active flying to stay pointed the right way. San Carlos has a bunch of mechanical turbulence from the wind swirling around the buildings near the runway. Crosswinds there don’t just mean a static correction, you have to sit up and dance fast on the controls like you’re playing a videogame. It’s kind of fun but very demanding.

Temporary flight restrictions

Pilots in the US have a lot of freedom. I can fly pretty much anywhere and land at pretty much any public airport without asking permission or even telling anyone. If air traffic control is involved it’s generally to help me avoid other airplanes, not to tell me where I can’t go. There are some general rules for safety (at least 1000 feet over cities, for instance), and some restricted areas and special rules over places like Washington DC. But pilots are basically free to go where we want.
But there are Temporary Flight Restrictions. Most of these are one day restrictions for specific events. The blue dot in the Gulf of Mexico is because of the oil spill: only Coast Guard below 4000 feet. The red dots around Iowa are for Obama’s visit: can’t get within 30nm of his stops. The little dot in Dallas is for George W. Bush, just 1nm under 1500 feet where it’s probably not a good idea to be flying anyway. Most of the TFRs are safety or security related and seem reasonable, although it’s rough on business when Obama is vacationing in Hawaii.

Then there’s the weird ones. There’s been a “temporary” flight restriction over Disneyland since 2003. Why? The 3nm buffer doesn’t provide meaningful security; the cynical theory is it stops banner towing. There’s also a blanket TFR for sporting events: no flying over large stadiums during baseball, football, Nascar, etc. I don’t want to be the jackass buzzing the big game. But it’s pretty difficult to know where every stadium is (not all charted) and know the schedule of all major sporting events in the area.

Pilots have a pretty good deal in the US, I’m prefectly happy to have some limits for everyone’s safety, security, and comfort. I just hope we don’t keep expanding the restrictions to make a complex mess that pilots can’t understand.

End passwords

It’s time to stop using passwords to authenticate users. They were never a very good form of security and they’re only getting worse. The latest fiasco is Apache had a breakin with their bug tracker where passwords were logged for three days. The hashed password database was stolen too, facilitating dictionary attacks. At least Apache was hashing passwords: there are plenty of dumbass sites that store passwords in plain text.

Password database theft is particularly bad if users use the same password on multiple sites. Yeah, I’m sure you’ve never done that. I have 560 passwords stored in Google Chrome right now. To any hackers reading: of course all my passwords are different. They’re all at least 16 characters, multicase, and use Urdu punctuation.

So if not passwords, then what? Four alternatives:

  1. Two factor authentication, a secure hardware gizmo that generates one-time logins. I have two now, one for my Warcraft account and one for my bank account. They’re too expensive to use on every web site but are great for a few high risk accounts.
  2. Authentication delegation like OpenID (or in some use cases, OAuth). OpenID works great, right now. Product designers fret about the user experience, but it’s not that bad. The real problem is political, there’s no major trusted third party providing OpenID without some competitive motive.
  3. Client side cryptography authentication. This technology is at least 10 years old, but outside of ssh never widely adopted. The web browser version (client side SSL certificates) is poorly supported and has terrible UI. That’s a fixable problem.
  4. Password agents. A little browser plugin that maintains a secure set of strong passwords, one for every site you log in to. Works with existing password-based servers but if you’re using a browser without your agent (hello iPhone) you’re stuck.
That’s four different user authentication options that are all more secure than your dog’s name with 3s instead of Es. They work best in combination. I’d really love an OpenID provider that used a two factor authentication system to protect me. If it also had a password agent to bridge logins into an old password protected site, then I’d be all set. In fact, that right there is a technology roadmap for a startup. Only problem? It wouldn’t make enough money to be worth the liability.

Running out of gas

One of the silliest, most preventable reasons for a small airplane to crash is running out of gas. It happens with some frequency. Why?

Plane design doesn’t help. Old airplanes typically have a float fuel gauge whose only standard of accuracy is “reads correct when empty”. It’s not uncommon for the gauge to read 5-10 gallons wrong. So before every flight I climb up to the wing and put a calibrated dipstick in the tank. And many airplanes require the pilot remembers to manually switch tanks or activate pumps in flight. Some 30% of fuel management accidents have the plane running out of gas while there’s still gas in the tank.

The primary way GA pilots manage fuel on board is to do arithmetic. You look at the length of your trip, the winds, read some performance charts, then bust out your calculator to figure out how long it will take you to get to your destination at what fuel burn. I might get anywhere from 10 to 18 miles per gallon on a flight. And if the headwind is stronger than I expected or I’m routed the long way, it might take more than that. The 30 minute required reserve is really not enough.

Fortunately the fuel accident trend has been improving. There were twice as many fuel management accidents ten years ago. Part of the improvement is education, part is technology. Aviation GPSes do a good job of estimating and displaying your range with available fuel. And fuel totalizers can very accurately measure how much fuel you’ve consumed. Still you have to know how much gas you had in the first place, a remarkably difficult thing to determine.

RIP Ejnar, 2000? - 2010

Our cat Ejnar died March 30th. He’d had kitty cancer, then surgery last fall. He seemed to have fully recovered but we knew there was a good chance it’d come back. And so it did.
Ejnar came to us as a stray young adult in 2001, knocking on our third floor porch door looking hungry. Ken took pity and was cutting up a hot dog for him. I said “you know if you feed him, he’ll end up being our cat.” And so we did, and he did, coming a little more into our house every day. We put a collar on him with a note saying “your cat? call us!” but no one ever did. So after a couple of weeks we decided he was ours. We named him after a random bishop’s name we saw on a church in Denmark. (Pronounced Eye-nar, not that he ever knew that.)

He was a good cat. He’d clearly been someone’s pet, affectionate, social, good with the litter box. He even knew not to jump on tables, although if we left our plates with chicken bones on the dining table they’d be gnawed clean on the floor in the morning. Polite cat, but perfectly happy to help himself when unseen.

His favourite things were rabbit fur mouse toys, fish and shrimp feast, the warm air from the heater vent in the morning, and sitting snuggled between Ken and I on the sofa. He was a chatty cat, I still hear his inquisitive “mrowr?” in my mind when I come downstairs in the morning. We miss him.

SLAC radio distortion

One of the reporting points we use when flying around the Peninsula is SLAC, officially VPSLA, the Stanford Linear Accelerator. It’s a 2 mile long straight line on the ground, very easy to see, and it’s at a convenient distance from the San Carlos and Palo Alto airports for calling in to land.
And in case you’re not sure when you’re exactly overhead, you can always hear it chirping away on your radio.

I’m sure there’s some rational explanation for why a high energy physics installation 2000 feet below me would cause my VHF radio to pick up random signals. But aviation is a faith-based enterprise, not science, so when I hear the creepy noise I just whisper “4 8 15 16 23 42” to myself to keep the plane from falling out of the sky.

Hardware for the general aviation pilot

One of the fun things about flying is you get to accessorize. Bags, electronic gizmos, etc. Here’s some products that I’ve found helpful. Some of this is flying specific, but not all of it.

BrightLine Flight Bag
The Batman utility belt of handbags. It’s relatively small and has 25 zippered pockets of varying sizes to hold things. There’s even an instruction video showing you what goes where. It’s very well constructed and just the right size.
AMOD GPS tracker
A very simple GPS tracker. No display: just press the record button to start and stop. Then copy the GPS track off the USB drive for visualization. Comes with photo geotagging software, too.
Olympus Digital Voice Recorder
I use this to record the radio conversations in my flights. Simple to use, good mono quality, mounts as a USB drive. Only drawback is it saves in WMA format but that’s convertible.
Clarity Aloft headset
Piston engines are noisy. Old-school headsets are basically cups that clamp around your ears. Noise reducing headsets are better, but still uncomfortable and consume batteries. Clarity Aloft is a different solution. Foam earplugs that go in your ear canal with little hearing aid speakers embedded in them. If I get the plugs in correctly it’s as quiet as my ANR headset but weighs nothing and isn’t hot. Lightspeed makes a similar headset.
Icom A14 handheld radio
A small plane flies just fine even if the electrical system dies. But without a radio it can be a bit tricky to find your way back home and get cleared to land. I just ordered this radio, it’s well reviewed. I picked it over other options because it’s the smallest and lightest and I didn’t want the VOR feature.

Spin training

Another fun flying lesson today, spin recovery training. A spin is a terrifying flight maneuver where the wings are stalled, you’re pointed down towards the ground, and the plane is spinning out of control about once a second. You never want to go anywhere near a spin in ordinary flight, it’s a good way to end up dead fast. But in the right plane with a pilot who knows what he’s doing a spin is kinda cool.

Spin training is a bit controversial in flight instruction. It’s no longer required because too many students (and instructors!) killed themselves trying it. And spin recovery training isn’t clearly useful; the most likely circumstance where you’d spin by accident is at takeoff or landing where you won’t have enough altitude to recover anyway. So flight training is focussed instead on recognizing when a stall is about to occur and recovering before a spin ever develops. But I wanted to try spinning to get a sense for what’s over the horizon, how much further you can push a plane and live to tell about it. Also, spinning a plane turns out to be super fun. Queasy, dizzyness-inducing fun, like a rollercoster. But I have new confidence having learnt how to recover from a challenging flight condition. I hope never to spin a plane again, but now I know what it’s like.

The most fun part of my lesson turned out to be flying the Super Decathlon, the aerobatic plane we used for spin training. I’ve been learning in Skyhawks, the minivans of aviation. Big, comfortable, good for travel, and mushy clumsy handling. By contrast, the Decathlon is a little sporty coupe. My first turn surprised me; I was only beginning to think about turning when we were already in a 30° bank just perfect for making that turn. Very fun flying something so nimble.

A good flight

We’ve had crummy weather the last few weeks. Cloudy, or rainy, or windy. So yesterday’s perfect weather was welcome for a long flight lesson. Starting with a San Francisco Bay Tour, then some practice instrument flying, emergency landing practice, dinner at Santa Rosa airport, and a long night cross country flight back to San Carlos via Petaluma and Byron. A lot of flying instruction for one day and a lot of fun. I felt like a real pilot.

A San Francisco Bay Tour is the canonical “show your friends around SF” sightseeing flight. There’s no formal route, but a convention among pilots made more rigid by the need to coordinate with the San Francisco airport and the wisdom of having air traffic control help make sure you don’t hit any other planes gawking at the Bay Area. I flew right over SFO, then up along the bayshore, along the Bay Bridge to check out the construction, then turns around Alcatraz and the Golden Gate Bridge south tower. Also a pass over Crissy Field, San Francisco’s oldest airport.

The main lesson on the flight out was how to fly through San Francisco’s Bravo airspace, normally something we avoid for everyone’s convenience. But ATC is happy to accomodate a bay tour time when they can and they routed me right over the top of SFO airport to let a 777 take off under me. (Prompting a bit of a joke on my part, listen above). Past SFO we were free to roam where we wanted and it was a gloriously beautiful day with some terrific views of SF’s finest landmarks. Great fun.

After a nice dinner at the Santa Rosa airport we took a long cross-country flight back to San Carlos to meet my 100nm requirement. Flying at night is hard, particularly with no moon, and I made it harder on myself by choosing smaller airports and navigating without the GPS. Good practice with the instructor, but I think night flying is something I’ll be very cautious about until I get more experience.

I’m getting close to the end of my private pilot license preparation. If all goes well I should be ready to take my checkride in about six weeks; main things are solo cross-countries and improving the precision of my airwork and performance takeoffs and landings.

A year of losing weight

Last year I got serious about trying to lose some weight. After literally a lifetime of neglecting my diet and exercise I was tired of getting fatter. So I’ve been paying attention for the last year and have lost 20 pounds. And I feel good about what I’m doing, think I can sustain it. My goal has been a permanent lifestyle change, not a temporary deprivation; so far so good.
Blue: weight. Red: trend. Grey: 5 pound rules

The two steady drops at the start of the graph (8 pounds and 5 pounds) came from calorie counting, with a predictable 3 pound gain in the middle when I took a trip. Counting calories really helped me pay attention to what I was eating, to learn to moderate. But it’s a daily bummer and a pain, so eventually I gave up on it.

I didn’t do any specific dieting again for a few months but still managed to keep a steady weight. Then a few months ago I started deliberately limiting carbohydrates, particularly sugar, inspired by Good Calories, Bad Calories. That seems to be working for me, another 6 pounds, and it feels sustainable. I’m skeptical of the low-carb fad of the last decade but having a salad instead of french fries and avoiding fruit juice and coke seems to make a difference.

The one thing I’m not doing is getting more exercise. Honestly, I’m just lazy. Biking is the only exercise I ever did sustainably but San Francisco is actively hostile to bikes. But I need to find something physical to do, for my health if not for weight loss.

Fun aviation fact: every pound I lose is another minute of fuel I can carry in an airplane.

Blog migration help

I need some help. How do I migrate this blog with content intact to a modern blog host? Mail me if you have advice.

This blog has run for 8 years on Blosxom, hosted on a private Linux box. It’s worked great, Blosxom really is a marvel of simplicity. But the world has moved on. I’m sick of editing HTML text and I’m tired of paying $120/month for a server that no longer does anything but run this blog.

So I need to migrate my blog to a new platform. A hosted platform, specific for blogs, I don’t want to administer software. Where should I go? My secret gaming blog is hosted on TypePad, which works pretty well, but the editor isn’t always well behaved on Google Chrome and I don’t always like the way it emits HTML and manages assets. WordPress is the other contender, but my previous experiments with it didn’t quite feel right. Tumblr is awfully cool but doesn’t seem suited to essayists. It pains me not to even consider Blogger, but years of neglect at Google have taken their toll. Really any of these platforms would do fine. What I care most about is a bit of control: I don’t want a lot of garbage markup and template weirdness.

The harder problem is content migration. I’ve got 1400 blog posts, mostly formatted in naked HTML but with some occasional weirdness. And a custom stylesheet. And 800 images. I had some luck getting Blosxom to emit MovableType’s import format but a lot of formatting was broken. And image migration is a challenge.

Any suggestions? I’ve been meaning to do this for six months and gotten nowhere. Please mail me: I’ll summarize any suggestions with credit.

Air Traffic Control

Ars Technica recently published a good overview of air traffic control technology. A few weeks back I got to visit Norcal TRACON, the central hub that controls the airspace around the Bay Area, Sacramento, soon all the way to Reno. The visit was really cool, I left with a real respect for the skills of the controllers. Also impressed by the technology. Relatively simple but highly customized user interface for the main radar scope display with lots of good human factors design. And similarly simple-but-customized auxiliary information displays, communications, etc. It all seemed very functional.

When I was first learning to fly the controllers intimidated the heck out of me. They were literally the Voice of Authority, they were speaking a special language, they were interrupting my concentration, and I was afraid I’d say something dumb and embarass myself. I’m entirely over that now. A key experience was at Palo Alto with a trainee controller in the tower. I was practicing landings and the tower kept screwing up, at one point even clearing me to taxi on to a runway someone was landing on! No danger: the supervisor immediately corrected the clearance and I wasn’t going to taxi into the airplane I could see, anyway. But it was all a good lesson that the controllers are people too and that they’re there to help me, not enforce regulations. You also get to know voices and they’re quite friendly and helpful when able. It’s a good relationship.

ATC has been in the news lately with the story of a controller letting his kids give instructions on the radio. It’s been way blown out of proportion, I can’t imagine there was any conceivable threat to safety. But there’s appearances to maintain and apparently will be hell to pay for a father showing kids his pride in his work. It’s a shame: one of the things the TRACON guys told me was they’re having a very hard time training new controllers. All the folks hired in 1981 after Reagan busted the union are reaching mandatory retirement age. They’re trying to recruit more controllers and accelerate training, but it’s not working out as well as they need. After this mess the ATC job must just look all the less appealing. I have absolute trust in the controllers who have helped me, they deserve a little slack and the ability to exercise their own judgment.

Apple, the patent bully

I have a love/hate relationship with Apple products, particularly my beloved iPhone. Today Apple proudly announced they’re suing HTC over phone patents: that’s firmly on the hate side.
We can sit by and watch competitors steal our patented inventions, or we can do something about it. We’ve decided to do something about it. We think competition is healthy, but competitors should create their own original technology, not steal ours.
— Steve Jobs

Everyone in the tech industry knows the patent system is entirely broken. Other than a few sleazy actors like Intellectual Ventures there’s an understanding in the innovative side of the tech business that you don’t file aggressive patent lawsuits. You write a lot of patents, you file defensive lawsuits and countersuits, but in general you don’t use your patent portfolio as a big club to try to destroy competitors. Apple’s taking a big crap on that detente. It’s pretty hard to love a company that is going to exploit the broken patent system to stifle innovation. Not that this is new misbehavior, see also Apple’s 1988 look and feel lawsuits.

What’s particularly galling is Jobs’ language about “stealing”. We’ll know more when the patents are named, but I have to wonder. Does he think anyone else using a multitouch UI is stealing? Pinch-to-zoom? Seamless wifi/cellular networking? I wonder if Jobs called it “stealing” when Apple took the mouse and windowed GUI metaphors from Xerox?

Two conversations at once

One thing I love about text chat in instant messengers is I can carry on two simultaneous conversation threads with a person at the same time. I write something on topic A, and while waiting for my friend to respond I say something about topic B. When he’s done responding to topic A and waiting for me, he can start talking about topic B. Back and forth, ABABAB. Two conversations interwoven, very natural.

Making flying easier

Flying airplanes is hard, but pilots do learn to fly planes safely. How do we manage all the complexity? By managing our attention, by using checklists, and by taking advantage of simplifying technologies. Some of these techniques are applicable to other complex tasks, like cooking or software engineering.

Attention training. Practice makes seemingly impossible tasks easier. When I first started flying it took all my attention to keep the plane level. I literally could not handle the radio interruptions. Now that basic flying comes naturally I have plenty of spare attention to talk on the radio. Except when I’m very busy; I’ve learned to ignore the radio if I don’t have time for it. Training has developed my attention capacity and taught me to manage distractions.

Checklists. There’s some 35 steps I do to get a plane ready to fly. Fortunately I don’t have to memorize them all, because I have a checklist that I follow every single time I start a flight. If I follow that checklist I’m fine. If I forget a step the plane won’t start, or my gyro compass will be off a few degrees, or the flaps will be set wrong and I’ll stall on takeoff and die. I’ll be using my checklist every single flight for the rest of my flying career. Checklists are broadly applicable to many areas. I once wrote a two page checklist for a server deploy at Google and it paid off in spades for years afterwards.

Autopilot. I’m not using an autopilot during my training, but even the simplest one that does nothing but keep the wings level makes flying a lot easier. Ken’s about to get a fancy autopilot that can literally fly an entire course for you, including instrument approaches, from about 400 feet after takeoff to 400 feet from landing. Of course you never want to fully trust the robot with the flight, but it’s a big help to offload the basic control inputs so you have more attention for more complex things.

GPS navigation. Moving map GPS is a huge user interface improvement for navigation. No more trying to spot landmarks from the air or figure out your position via triangulation. You just punch in your destination, press “direct”, and you’ve got a flight plan. A GPS with a terrain database helps you avoid hitting mountains. Add a synthetic vision system and you don’t even need to be able to see out the window. Unfortunately very little modern flight training uses the GPS, it’s going to take a generation for common practice to change.

Writing software used to seem very difficult. But over the years I’ve learned how to code and the technology for writing software has improved. Garbage collection is like autopilot for memory management, modern IDEs are like GPS maps for visualizing code. Unfortunately the pace of technology development in aviation is very slow compared to software engineering because of all the testing and certification required. But there’s more opportunities for improvement via training and plenty of checklists.

Not as planned

I’m at the point flying now where I’m fine if things go as planned. But I don’t have much experience improvising. Today’s solo flight was a good exercise.
The weather wasn’t as good as predicted so I decided to just do a few trips around the pattern. The reported 240@6kts winds were well within my comfort zone. The wind sock was flopping around a bit, so I asked for an updated wind reading and was told it was still 240@6. OK, that’s fine then.

The first complication happened on my downwind. I was following another Cessna around the pattern, cleared to land #2. And following, and following. Normally you turn base at about half a mile or so past the runway. I was more than a mile and a half out still following this guy on downwind when the tower called to remind me I was #2 to land, implicitly asking why I hadn’t turned yet. I quickly reported “following traffic still on downwind”. That must have woken the other pilot up, he started to turn. I was all out of my usual routine trying to figure out what power and flaps I needed for this greatly extended pattern. Rule #1: fly the plane. I took stock and realized I was way too slow, so I pitched down, added some power and made my turn behind the other plane.

I just about had this unusual approach figured out when I realized the plane I was following was staying high like he was going to overfly the field. Then the second complication: he did a forward slip, dropped swiftly, and landed. And kept rolling down the runway, leisurely using the full length of the field. And me coming in as slow as I dared hoping to land behind him. Tower asked the guy to expedite getting off the runway, he casually replied he’d turn when he could. When I was about 20 feet from touching down the guy was still on the runway so tower told me to go around. Unexpected, but not dangerous.

In the meantime I’m hearing pilots ask for updated winds and now they’re 140@9kts. The third complication: the wind had swung around and was getting strong enough to be uncomfortable. Tower mentioned considering switching runways but had five planes in the pattern. Soon they were telling everyone to land and wait, clearing the air. Meantime I’m still up there, seemingly forgotten, and with no idea where the other planes were. So I called in “Tower, am I cleared to turn base?”. Our tower guys at KSQL are great. He immediately told me to turn left 180 and enter left downwind for the other runway. So I made my turn, watching very carefully for planes, and proceeded to make a very ordinary approach. Except the ground was going by very fast on short final, the wind had swung around again and I ended up landing with a bit of a tailwind.

That was enough adventure for one day, so I called in to taxi to parking. I’m a bit proud that Tower replied with a “thanks for the help”. Guess I got it right!

Update: I heard from someone else that the plane ahead of me on downwind had been told to extend downwind by tower. I must have missed that. Also they were in a slower plane than I, which may explain why I overtook them on final.

Why is flying hard?

When I started learning to fly it seemed impossibly difficult. Flying seems easier now, although still challenging. It’s roughly the same kind of skill as driving a car and no one thinks back on learning to drive as particularly difficult. But it only takes 6-10 hours of driving time to get a car license, compared to 40-70 hours of flying time for a pilot’s license. Why is flying so much harder?

Control complexity. Cars only steer in one dimension; planes steer in two. Even a level turn is hard in a plane, you have to coordinate two controls, except sometimes you deliberately uncoordinate them. Managing engine power is harder in a plane: two or three controls in a piston, not just a single pedal. And then there’s auxiliary controls you have to use occasionally: flaps, carburetor heat, fuel tank selector, etc. Even starting a plane requires carefully using four controls in the proper relationship.

Being in the air. Planes at altitude have a lot of potential energy. A primary challenge of landing a plane is learning how to bleed that energy off to make a soft landing. In a car you just brake. And if something goes wrong in your car you can pull over to the shoulder and stop; that doesn’t work so well in a plane. So there’s hours of learning how to get a plane safely down in various kinds of emergencies and equipment failures. Also learning to ensure you can land: running out of gas or flying in to clouds are dangerous, so there’s a lot of training to avoid those situations.

Instruments. Operating a modern car is pretty easy, you don’t think about the engine unless an idiot light comes on. Flying requires a lot more vigilance. You’re constantly watching your heading, airspeed, altitude, attitude, and engine power to make sure you’re flying roughly right. And there’s a bunch of extra instruments you need to scan regularly; oil pressure, outside temperature, voltages, etc. It only gets more complicated if you’re flying when you can’t see, that’s a whole ‘nother 55+ hours of training.

Communication. Most general aviation flights are constantly on the radio, talking to ATC to get permission to takeoff and land, to get separation from other aircraft, or simply to be followed for safety. We know talking on a cell phone while driving is remarkably distracting. It’s not quite as chatty in a plane, but it’s necessary communication and it has its own special language. Learning to work the radio was remarkably difficult for me and it’s still a constant distraction.

Navigation. In a car you just follow the road and signs, maybe look at a map or a GPS to make sure you make a turn. In a plane you’re largely on your own in three dimensions. If it’s good weather it’s not too hard to avoid mountains, but some of the obstacles are invisible. And while moving map GPS has revolutionized GA navigation, I still have to learn to fly without it: dead reckoning, pilotage (aka “looking down”), flying between radio beacons. And even if you know which way to fly, you still have to calculate for invisible winds.

The good news about pilot training is it seems impossibly difficult at first but gets easier with training. In a followup blog post I’ll talk about some of the ways pilots manage complexity. But no matter how skilled the pilot or how many good tools they have, flying always remains a complex activity requiring attention, thoroughness, and constant practice.

Rules of thumb for geocoordinates

I’m doing some geographic hacking. I get confused about degrees, seconds, fractions, and precision of coordinates. Here’s some approximations for how far distances are for latitude degrees. Imperial measures, my apologies to my non-American friends who are not crippled by years of non-metric education.

1 degree70 miles
1 minute 1.15 miles
1 second 100 feet
0.1 degree 7 miles
0.01 degree 3600 feet
0.001 degree 360 feet
0.0001 degree 36 feet
0.00001 degree 4 feet

Those numbers are for latitude. Longitudes get narrower at the poles. At San Francisco’s latitude of 37 degrees, a degree of longitude is about 55 miles, or about 80% of a degree of latitude.

A modern consumer GPS with WAAS should be accurate to within about 15 feet. So for many contemporary geocoding applications, you want to record and publish numbers to about 0.1 seconds or 0.00001 degrees. That’s 26 bits of precision, which fits comfortably in a fixed-width 32 bit number but is too precise for a 32 bit IEEE float.

Calculations thanks to this Javascript library

Lost computers of our forefathers

One of the fun things about pilot training is learning to do things the old way. I’ve just learned the art of plotting courses using an E6B, a glorified slide rule. Initially I mocked this old tech, but having learnt it I admire how simple and unmediated it is. And I can do all my calculations on a 65 year old whiz-wheel, my father’s Army Air Force issue Computer: Dead Reckoning.
The interesting side of the E6B is the wind correction part. If you’ve got a 20 knot headwind blowing 50° to your left, what angle do you need to fly straight and how much slower will you be going? It’s a simple trigonometric problem, but it’s too abstract writing it out and doing the arithmetic. On an E6B you just draw the wind vector, right on the computer, then rotate it to visualize the wind vector vs. your path. Then you read the course correction and speed change off the calibrated graph underneath your drawing. It’s like a thousand little vector calculations were done at once and drawn on the paper for you to measure against. Very intuitive.

The other side of the E6B is a simple circular slide rule for doing multiplication and division. It has scales for fuel consumption, distance and rate calculations, converting °F to °C, etc. Initially I used my iPhone for this arithmetic but I kind of prefer rotating the wheels and reading the numbers off the scale. The imprecision of a slide rule reinforces that everything is just an estimate. And I’m constantly sanity checking everything to make sure I’m didn’t misread a scale by a factor of 10. That extra work seems to help reinforce the course planning.

I’m pretty sure as soon as I pass my pilot exam I’ll never use an E6B again. It’s much easier to use map-based flight planning software, or for that matter just to jump in the plane and let the GPS computer figure it out for you. More accurate, too. But the old way’s kind of cool.

Vice Guide to Liberia

Video totally worth watching, the Vice Guide to Liberia. A travel documentary looking at Liberia and its recovery from brutal civil war. Parts 1-6 are online now, rest to come. The trailer gives you an idea what to expect. Vice is obnoxiously hipster, but you have to respect they actually produced this video. Not something you’re likely to see Anderson Cooper do.
Liberia is fascinating to me because of its special relationship with the United States. It’s essentially an American colony, a republic established by freed slaves in 1847. The civil wars there were horribly brutal and marked by bad action all around, including American and UN supported forces. There’s some hope for stability now, but what do you do with a generation of child soldiers raised on drug-fueled killing? Vice’s video gives some insight.

Update: some thoughtful criticism: 1, 2, 3.

Airport diagram graphic design

A lot of aviation charts are visually complex, presenting a real readability problem. But one kind of chart has fantastic graphic design: the Airport Diagram. Clean and spare, fine black and white, very easy to read. You really need to view the PDF to get the full effect, they’re intended to be printed 5″x8″.
This diagram is what a pilot pulls out when preparing to land at an unfamiliar airport. The key information is easy to read. Runways in black, including their orientation and size. Taxiways in grey with letters identifying them. And a schematic view of landmarks on the field, including the control tower, the terminal building, hangars, parking, etc. Compare with an overhead view to see the simplification. The diagrams also include useful extra data: radio frequencies, magnetic variance, and any local rules like runway holding readbacks.

Aren’t they beautiful? Such spare lines, just one shade of grey, and a clean all caps font that is clear and authoritative. These diagrams are provided at no cost by NACO, part of the FAA. They also produce the beautiful instrument approach diagrams which are a similarly elegant example of lots of data packed legibly in a small piece of paper.

GPS altitude in practice

My last blog post talked about how GPS altitude works in theory. Now then, how does it work in practice?
Above is the elevation profile of my GPS sitting outside on a table at 139 feet for three hours. No, there was no earthquake, that’s just GPS instability. Things get really bad towards the end, but even on the “good” part the measured altitude wanders by nearly 50 feet. Average altitude was 137 feet, standard deviation of 23. (See also my horizontal track: 120′ of travel!)

For my recreational purposes that large error is acceptable, and in flight the tracks are better than the above would suggest. For instrument navigation pilots use something like the GNS 430W, which for $8000 is accurate to within 6 feet and is certified to let you fly approaches as low as 250 feet above an airport you can’t see in the fog. You can get even more accurate with a radar altimeter: $10,000 gets you your altitude over the actual ground below you to within 3 feet. Ironically, pilots seldom use anything other than pressure altitude for actual navigation altitude. A barometer in a steam gauge may not be terribly accurate, but it’s not bad when calibrated and close to the ground. Also it’s important all planes up in the air have the same kind of error, so we all use the old tech.

Most GPS users don’t care about GPS altitude either. Most people are on the ground, jogging or biking or driving, and there you’re much better off using a database to know your current height. GPS altitude is useful for me in my flight tracking, just to see if I flew where I was supposed to. Even there it’s annoying because sometimes the error puts me below the runway and Google Earth doesn’t render that very well.

One last caveat about GPS altitude and GPS in general. If you really care about your position you also care about RAIM. Sometimes GPS satellites fail or are in an inconvenient place. It’s mostly predictable, you can look at a RAIM prediction map that shows a pessimistic view of GPS service. A high end GPS receiver with RAIM will constantly do crosschecks on the measured position and alert you when the position data is not high quality.

(Parenthetically, I love my inaccurate AMOD data logger. It’s very easy to use and at $65 is just fine for my recreational purposes. It’s based on the well-regarded SiRFstar III chipset and even does WAAS to correct for ionospheric errors. Part of why my experimental error was so large may have been because I have static navigation turned on: when stationary, it may be better to turn it off.)

GPS Altitude

GPS is one of the wonders of the modern age (RIP, LORAN). But while GPS is great for showing your position, it’s not so good at showing altitude. Part of the problem is the satellite geometry makes for poor triangulation of elevation. But worse, elevation itself is difficult to define.

If you’re flying a plane, what you care about is how far you are above the ground (AGL). GPS won’t tell you that since it doesn’t know where the hills are. But GPS can tell you your altitude above sea level (MSL), which you can then compare to a map which shows terrain in terms of MSL.

But where is sea level? Annoyingly, that’s locally defined. Naively you’d just measure your distance from the center of the earth. Which is more or less what GPS does in that positions are defined relative to WGS84. The earth’s not quite a sphere, so WGS84 is actually a pole-flattened spheroid, the polar distance is 0.335% shorter than the equatorial. GPS calculates your altitude above that spheroid.

But the earth isn’t a uniform object, it’s lumpy. I don’t mean the mountains, but rather the varying density inside the earth causes ripples in the gravimetric field. If you could conceptually flood the earth with enough water to cover all the mountains, the resulting global sea would not be flat.

So good GPS receivers correct the WGS84 spheroid with a Geoid model, a detailed approximation of the lumpiness of earth’s gravity. Most folks now use EGM96, which is a harmonic model with 360 coefficients in each direction, resulting in 5MB of constants for correction. There’s a new finer-grained geoid just in production now, EGM2008, with 240 megs of constants. These corrections sound like niceties, but they’re quite significant. For instance at my house the EGM96 correction is 106 feet. You don’t want to fly a plane 106 feet underground.

One last bit of detail: how do we know where the GPS satellites are? Their position is measured and updated regularly from ground stations. But everything in the universe is moving, so what do you measure position relative to? Answer: quasars. Astronomers define the International Celestial Reference Frame relative to the position of 212 quasars. Those quasars are themselves moving, but they’re so far away that their apparent motion to us on earth is near zero and so we pretend they’re fixed landmarks to reckon against.

I love how GPS combines deep space astronomy, orbital mechanics, gravimetry, geology, and good old fashioned geography and survey work to tell us where we are with some accuracy. And don’t forget special and general relativity, too!

Good Calories, Bad Calories

It took four months, but I finished reading Gary Taubes’ masterwork of science journalism, Good Calories, Bad Calories. If what he writes is correct, this could be the most important popular health and diet book written in a very long time.

The first half of the book is a long and careful investigation into the science behind diet and the “diseases of civilization”: obesity, type-2 diabetes, heart disease, cancer. The conclusion is grim: all our common wisdom is poorly founded. “Everyone knows” that people get fat from eating too much and not exercising enough, that eating fat makes you fatter, and that eating cholesterol causes blocked arteries. But those statements are all scientific hypotheses, not axioms, and it turns out the experimental science doesn’t confirm them.

Taubes looks in detail at the science and politics behind current government recommendations: low fat diets, exercise and calorie restriction for weight management, etc. And frequently finds problems with the science like inconvenient data ignored, alternative studies dismissed, and personal bias overcoming good science. He also dives deep into the politics. One of the most shocking things is the way public health officials have basically run a giant nutrition experiment, advising Americans to eat low fat diets with no solid evidence that’s actually healthier.

The last part of the book examines an alternate dietary hypothesis: that carbohydrates are the source of our health problems, not fats. There’s research that indicates that the insulin response from eating refined carbohydrates causes your body to store that sugar in fat cells rather than using it as energy, leaving you still hungry but fatter. This metabolic response seems like it could be very interesting for understanding both obesity and type-2 diabetes. If Taubes’ book encourages more research in that area, it’s a success.

The best thing about Good Calories, Bad Calories, and also the most demanding, is how thorough the journalism is. This isn’t some hot screed selling a fad diet, it’s a boring, meticulously footnoted examination of the actual original science journal articles that led us to our current dietary understanding. It makes for slow reading and a frustratingly muddy final story. But it also feels true, much truer than the platitudes, moralism, and oversimplification that is the usual diet discourse.

Definitely worth reading if you are interested in diet and metabolism, or just interested in a detailed story about public policy and science. See also his (much shorter) 2002 NYT article What if It’s All Been a Big Fat Lie, this somewhat negative review of the book, and this positive review.

Update: it’s going against the spirit of the book to synopsize it like this, but here’s the author’s summary of his conclusions in a short 10 item list.

First solo!

I had my first solo flight yesterday! After about 25 hours of flying lessons my instructor asked me if I felt ready. I did, so he hopped out of the plane and I took my first flight by myself. Three quick trips around the pattern later and I’ve got my first half hour as pilot in command. I’m very proud.
The first solo is a big deal. I’ve been doing almost all the flying myself for about the last 10 hours. But with my instructor sitting in the plane, anytime I felt confused or had a question help was right there. Being PIC is a totally different thing, you’re solely responsible for yourself and the plane. No one else is going to remind you to adjust the power or help you remember whether you’re cleared to land.

Fortunately I was well prepared and the solo flights weren’t really any different from the ones with my instructor. The engine coughed once on my first takeoff, that gave me a momentary scare. And I was so excited that I got a bit jumpy on the microphone switch and kept cutting out on the poor controller. But that’s just nerves, nothing another 40 hours of lessons won’t cure. My landings were actually pretty good, even if the radio work wasn’t. Here’s a Google Earth file if you want to see in detail.

I sort of feel like I already know everything about flying planes VFR and just need some practice. Of course, that’s not really true. I definitely need practice. Also still a lot to learn: cross-country planning, navigation, night flying, short field procedures, etc. And part of what’s fun about flying is you can always get better at it. But I’ve passed the first big test!

1491, Americas revised

I’m fascinated by pre-Columbian American history. A whole alternate human history, right here where we live now, different writing and math and technology. And so little known about it! Science journalist Charles Mann’s book 1491 scratched my itch to learn more about New World civilizations. It’s intelligent but not too demanding, anthropology-lite in the vein of Guns, Germs, and Steel if not as ambitious.

Mann’s book is written to demonstrate his thesis that New World civilizations were way more developed and technological than our common understanding. He neatly dismantles the idea that Indians were a sparsely populated low impact culture living in harmony with Mother Earth, dismissing it as both racist and not supported by science. Instead in the eleven chapters he presents detailed archaeological research about the surprisingly technological Indian civilizations. Some of the ground he covers includes the continuing controversy over the initial migration dates, the astonishingly urban complex of Norte Chico in 3200 BC and its uniquely specialized economy, and an emerging case that the Amazon rainforest is not some wild pristine environment but instead the result of centuries of deliberate gardening by its inhabitants.

The tour of archeology is fun but even better is Mann’s explanation about how all of this history is surprising us just now. A big part of our misconception about native peoples’ lives is that by the time Europeans met them, 90-98% of them may have died from disease. I’d understood before how smallpox, etc helped the Europeans conquer the New World but I never quite connected our romantic idea of sparse Indian settlements to the fact that, duh, almost all of the people living in the Americas died 1492-1550. He also talks in some detail about the relative lack of physical artifacts from cultures that tended to build with soft, perishable materials. And of course there’s also the willful, deliberate destruction of all written records by evil Catholic bishops and the like.

If I have a complaint about 1491, it’s that when I finished reading it I have an even less clear picture of pre-Columbian history than I did before reading it. The simple schoolboy story is a simple narrative. Now that I’ve learned more specifics about particular examples the big picture has gone fuzzy. Which may very well be fair and accurate now, given how little we know.