Hacking Air Travel

I travel a fair amount. This is the post where I plan to continuously refine and collect hacks that make travelling more enjoyable.

But first off, let me be clear on my scope. These are the unexpected things that I have picked up from other people or figured out myself. These are not seat exercises advertised in the seat back pocket nor is this a web site about earning air miles by buying silver dollar coins with your miles-earning credit card (although I do like that one). These are hacks.

Sit in the back, Jack

Window or aisle? Row 24 or 34 on a 767? Sites like seatguru.com have solved this question. But those answers are static and totally leave out the human factor. More important then where you are sitting is who you are sitting with. Three empty seats in the back of cattle class trumps one wide seat with a footrest in business class next to a chatty frequent flyer. Even one empty seat next to you with that extra tray table and foot room is a big win in my book. If there is only one empty seat on the plane, I want it to be the one next to me.

Airlines make you feel like you have power by asking, "window or aisle" but really we are at the whim of a seat selecting robot; an algorithm that determines your continent hopping happiness that is actually pretty easy to reverse engineer. It goes something like this: for a given person and their window or aisle preference loop over the available seats until a seat is found that matches their preferences. Like most algorithmic loops, they start at the beginning, or in our case at the front of the plane. Hence, all of the seats in the front get filled first. If you get a seat in the back, the chances that you will have an empty one next to you are pretty good. But the algorithm that we are hacking is slightly more complex than that. The seating algorithm also has to handle people that want to sit together. Instead of splitting up two people that are together the algorithm marches through the plane until it finds two empty seats together. So keeping this all in mind, my goal is to always aim for the back of the plane next to a seat where an individual and his/her preferences and potentially his/her partner are least likely to be placed. Most long haul flights have three or more seats down the middle. These are great for seat algorithm hacking, because they eliminate people with the window preference and because no one wants to be penisinbetweenis (as opposed to shotgun, left nut, or right nut in the calculus of high school seat selection ("can't call shotgun until we are outside") AKA stuck in the middle between two strangers). If you can see the seating chart, you can also eliminate couples by looking for a row that has only one empty seat next to an aisle. So in summary, my ideal seat tends to be a few rows up from the back (avoid the bathroom smell and the congregators) in the middle section with at least a single empty seat next to it.

(I am writing this sprawled out across three seats in the back of a long flight from DC to Africa. When I was checking in I asked for a seat in the back. I ended up assigned next to someone one row in front of an entirely empty row of seats. Oh yeah!)

(On my return 20+ hour flight I ended up with a four seat block all to myself)



Never blow your nose

Airplane air sucks. It's pressurized. It's recycled. It's dry. Flying for more than 12 hours usually results in a few days of bloody noses for me. I asked some doctor friends what was going on, and they explained that inside our noses we have thin membranes that don't like dry air. So I began snorting saline spray like Al Pacino snorting cocaine in Scarface.
That helped me feel better during the flight, but I still ended up with a sinus issues afterwards. My latest strategy is to make the nose off limits during flying. No saline spray. No blowing my nose. No nose rubbing. If my nose runs a bit, then catch the dribble on the way out. Let the fluids in your nose do what they are there to do: protect your membrane. In case this point isn't obvious, picking your nose while flying is so dangerous it's a wonder the TSA doesn't chop off fingers before flying.

Get up. Stand Up.

Sitting for a long time sucks. So head to a place where you won't bother anybody and stand. Bring a book and enjoy the feeling of blood circulating to your feet. Bonus points for hanging out in the galley for instant drinks and snacks. I really enjoy making crazy faces in the mirror of those tiny bathrooms.



These are not the droids you are searching for.

I am not very good at this one, but I am working on it. Essentially we are aiming for mind control. While getting into the ginormous queue at the airport you say to the line director, "you want to upgrade me to the first class line?". Or as you hand over your luggage you joke, "you were just getting ready to tell me that you have moved me up to business class". These have both worked for me. I know a guy that always points to the first class section and says "this way, right?" as he winks at the stewardess when he boards, and he often gets escorted to an empty seat in first class. I once sat with a friendly old bald guy in the exit row who claimed to get champagne on every flight he goes on by simply being fun and friendly with the airline staff. Of course there is a fine line between being friendly and flirting. Flirting works even better. The key is to realize that flight attendants are people doing jobs, and a bit of fun or human interaction or a chance to show off their power makes their jobs and their life better. Like I said, I'm not very good at this one. Especially the flirting.



Sprawl on the terminal floor

I spend a lot of time in developing countries. The airports are often crowded and less than sparkly clean. That never stops me from sprawling out on the floor, with my bag as a pillow and my feet stretched out in front of me. Will my clothes get dirty? Probably. Will I wash them? Definitely. It's important to maximize the hours with your feet up if you will be cramped on a plane for hours and hours.

Last one on wins

Why does everyone freak out when it's time to board the plane? So you can be the first one to sit in a cramped seat breathing recycled air? It's kind of like everyone standing up the second the captain dings the bell and the seatbelt light goes off only to end up standing around with your neck bent over sideways as the overhead bin crashes down on your head. Chill. I like to be the last one on the plane. It's like a free ten minutes of life. Go for a walk. Flip through a magazine that you would never buy. Drink a beer. Charge your laptop. Wait until everyone has gone. Wait until they start announcing your name. Then wander in, find your seat, and I bet you still won't be the last one on the plane, or at least the last one to be buckled up. There, I just added ten minutes to your life - you can buy me a beer sometime.

Massages near the airport

In Asia massages are cheap and traffic is crazy. I assume the worst about traffic and if I end up near the airport with more than an hour to kill then I ask the driver to drop me off at spa. You can usually pay $25 inside the airport, but for $5 on the outside, you get a sauna, shower and a massage that will make the upcoming journey just a fleeting nightmare between being pampered and being in the comfort of home.






Read while in line

Always have a book or magazine in your pocket. Long queues for security, missed flights, customs, buses, etc, etc are forgotten within the between the cover of a good book or magazine. Leave the journals, slide decks and legalese for later. Bust out Wired, the New Yorker or Neal Stephenson and find happiness.

How you gonna holler without facebook?

On the 92 bus in Washington DC:



Getting on the bus, a young man is hitting on a woman:
Man: "Well how can I get at you, girl?"
Woman: "I dunno, hit me up on MySpace or Facebook or my email."
Man: "Girl, do I look like I'm made of money? How you think I'm gonna get on the internet? Where do YOU got internet?"
Woman: "I got internet at my job! But for you - shit, I dunno, go to the library or something."
Conversation continues for some minutes, then the man gets off the bus.

Older, homeless man who had been sitting near them the whole time, turns to the girl and asks incredulously: "How that young [man] gonna holler at you when he ain't got no internet?!"


Relationships are a huge driver of technology adoption. Don't underestimate them.

From Overheard in DC on the DCIST

Malaria and the US

Malaria is no fun. I caught it and it felt like my bones were melting through my skin. But when you take the right medicine it goes away very fast. Unfortunately many, many children don't have access to the medicine (or the test) and die.



This image shows malaria incidence in the US in 1870. With 100 years of democracy, and during a time when factories were being built on a scale never before imagined, the US was as endemic or more endemic to malaria than many of the worst places in Africa today. The maps shows that in many places (including Washington DC) more than 10% of the deaths were caused by malaria. The average lifespan was about 40.

Many people wonder what is wrong with Africa. Why is it so corrupt? Why is there so much disease? Why is it developing so slowly? Charts like this remind me that Africa is developing much faster than the West ever did (although perhaps not as fast as the East).

(I just heard today about a malaria vaccine today on trial in Malawi that sounds pretty effective. Let's hear it for technology and progress!!!)

Filipinos Facebook and Farmville


I've never played Farmville. Despite being an unabashed technophile, I haven't really played computer games for a long time. I remember a pre-teen family vacation to Yosemite where the undeniable highlight was neither waterfalls nor bears, but a visit to Sierra Online, a little office in the middle of nowhere from which sprang such amazing things as Space Quest, King's Quest, and (ahem) Leisure Suit Larry. I thought that the magic of computer games had captured my heart, but in retrospect it was simply the magic of computers. Years later I turned down a job building a snowboarding simulator for the x-box so that I could work with a bunch of Linux geeks on software for the British government. My 12 year old self still despises me.

But games are big, and I feel like I am missing out on something by not playing them. World of Warcraft, Counterstrike, Civilization - am I missing something? It wasn't until a recent trip to the Philippines that I realized just how huge Farmville is. I have friends on Facebook who play it, but I blocked all updates from it long ago, so it is out of sight and out of mind. Until I went to the Philippines. There I found Farmville a lot harder to block, because it kept invading real life.

Everywhere I went people were playing Farmville. The look on their faces implied that they were using the hotel reservation system, or catching up on email at the coffee shop, or writing a paper on impact assessment. But the moo of a cow or the snort of a pig gave them away. A subtle stroll behind their screen confirmed it.

I was doing an informal assessment of computer experience in health care workers at the rural health clinics where our project was going to be piloted. The answers were pretty consistent. "We don't have any experience with computers." Followed by contemplation, perhaps a giggle, and then, "except for playing games".

We continue to underestimate how rapidly people adopt technology. Remember when you first joined facebook? Back then did you ever imagine that your mom might friend you? Did you ever imagine it would take just a few months? A few years ago I showed my Malawian housekeeper how google worked. Now she's on facebook.

This isn't the first time we've underestimated ourselves. Remember cellphones? People who can't read and earn less than $1 a day tend to have phones in Malawi, especially if they live in the urban areas. Nobody expected Africa to become connected so quickly.

We need to stop underestimating people. Don't expect Africans to be content with boring old SMS and voice for long. Smartphones, droids and even iphones are much higher up Maslow's hierarchy of needs than we realize, especially if nobody around owns a computers, your schools suck, and the government controls the radio and newspaper. Africans have leapfrogged over landlines. They are now leaping over laptops.

(Desperate housewives, lonely on their isolated farms, also surprised the world by being the early adopters of the strange world of cranks and dials and operators that made up the original telephones of the 19th century)



Back to my Filipino friends who "don't know how to use computers", but do know how to play computer games (it was Farmville that they were playing). While Google is organizing the world's information, Facebook is organizing the world's relationships. It sounds like a silly mission statement at first. Yet consider the universal pursuit of friendship, love and community. If they can pull it off, then we will have taken another step forward in the evolution of our species. If Facebook can enable that which virtually defines us as humans then I think we are going to be seeing a lot more Farmville being played.

Some strange headlines are beginning to form themselves:

Web Farm Dot Oh - the Next Internet Bubble
Facebocracy: Filipinos Ratify World's First Facebook Based Constitution

One last thing about Facebook and the Philippines. The Philippines is the text messaging capital of the world. They send 1.6 billion SMSs every day and their population is just 80 million. No one sends more SMSs than the Filipinos. As in Africa, smartphones are being rapidly adopted. But people don't have a lot of money to spend on unlimited data plans like the ones forced upon us here in the US. So you might expect a blackberry like option - where you can get unlimited email access on your smartphone. Isn't that the logical upgrade for the SMS crazed Filipinos? SMS migrates to email? Nope, that wasn't an option that the cellphone providers were offering. But for 20 pesos a day (about 50 cents) you can get unlimited access to Facebook.

Ubuntu Web Appliance

I am working on a project here in the Philippines that uses computers to help rural health care workers capture and use data more effectively. I am really trying to figure out how to make the hardware configuration as easy and off the shelf as possible so we can quickly scale this up once we have the kinks worked out. Unfortunately off the shelf appears to mean a Windows XP netbook with Limewire and who knows what else pre-installed. For various reasons some of these virus magnets can't be wiped because they are owned by someone else.

I have written a script that creates an efficient, appliance-like, ubuntu client. It is customized to automatically connect to the right wireless access point, and it is bundled with a firefox profile that starts on boot and which has a full screen plugin pre-installed, the home page pre-configured, and a nice little plugin called 'try again' that automatically refreshes the page if the connection is lost. Of course, this lovely little piece of work is useless if I can't install Ubuntu.

That is until today, when I figured out how to use remastersys to create a custom bootable Ubuntu. Remastersys creates a bootable iso of your currently installed Ubuntu that you can put on a flash disk (with USB Startup Disk Creator) and boot from and use without making any changes to the hard drive. It's like the Ubuntu install disk but with all of my carefully crafted magic. So now I can convert the useless windows bricks into kick ass appliances without ruffling any feathers just by plugging in a USB stick. Removing the disk and rebooting will return them to their original spambot state. And if they ever decide that the Ubuntu setup is superior (and they will of course) the bootable disk has an option to install onto the hard drive. My USB bootable ubuntu appliance is here in case anybody wants it (but you might as well build your own). Oh, one last trick: use VirtualBox to create your ideal Ubuntu. It makes it really easy. VirtualBox snapshots are helpful in crafting the perfect, compact and clean image (but ideally you should use scripts so that you can repeat anything you do later).

A nice day's work if I do say so myself!

mysql replication

I am currently working on a script to automate the process of setting up mysql database replication. I followed various tutorials but I always got stuck here:

mysql> SHOW MASTER STATUS;
Empty set (0.00 sec)

Endless googling was no help (which is why I am blogging this). Eventually I realized that /etc/mysql/my.cnf was context sensitive, meaning that I couldn't just append the replication configuration to the end of the file. This meant I needed to insert the configuration into the appropriate place in the file. This meant inserting multiple lines of text into the middle of the file. Eventually I came up with the following:

(Update) I used to do this with ruby, but I switched to perl since ruby isn't installed by default:

MYSQL_CONF_ADDITIONS="
# ----------------------------------------
# Allow connections from all addresses
bind-address = 0.0.0.0
# ------------------------------
"

perl -i -p -e "print '${MYSQL_CONF_ADDITIONS}',$_='' if \$_ =~ /bind-address.*127.0.0.1/)" /etc/mysql/my.cnf

Hopefully this will be useful to somebody, someday, somewhere.

Healthcare protocols save lives


I highly recommend this excellent article in the NYTimes about how we can use data to create healthcare protocols that dramatically improve outcomes and reduce overall costs. (This is what we were trying to do in Malawi and what I am trying to introduce in the Philippines)

Here are the key points that I want to remember:

To enter mainstream use, any such treatment typically needs to clear a high bar. It will be subject to randomized trials, statistical-significance tests, the peer-review process of academic journals and the scrutiny of government regulators. Yet once a treatment enters the mainstream — once we know whether it works in certain situations — science is largely left behind. The next questions — when to use it and on which patients — become matters of judgment, not measurement. The decision is, once again, left to a doctor’s informed intuition.
...
“Guys, it’s more important that you do it the same way than what you think is the right way.”
...
Whenever possible, the guidelines are also embedded in the hospital’s computer system. Doctors and nurses are presented with a default choice — how much of a given drug to prescribe, for example — and have the option of overriding it. Most important, the electronic records system allows both committees and doctors to track patient outcomes.
...
He could not simply tell Intermountain’s doctors what to do, no matter how much research he brought to bear. Doctors have a degree of professional autonomy that is probably unmatched outside academia. And that is how we like it. We think of our doctors as wise men and women who can combine knowledge and instinct to land on just the right treatment.
...
Perhaps the clearest example is the Pronovost checklist. As many as 28,000 people in this country die each year from infections that come from intravenous lines. Several years ago, Peter Pronovost, a Johns Hopkins physician, developed a simple list of five steps that intensive-care doctors should take before inserting an IV line, in order to prevent the introduction of bacteria. The checklist reduced the infection rate to essentially zero at 108 hospitals in Michigan where it was adopted. Pronovost published the results in The New England Journal of Medicine
...
But in our current health care system, there is no virtuous cycle of innovation, success and expansion. When Intermountain standardized lung care for premature babies, it not only cut the number who went on a ventilator by more than 75 percent; it also reduced costs by hundreds of thousands of dollars a year. Perversely, Intermountain’s revenues were reduced by even more. Altogether, Intermountain lost $329,000. Thanks to the fee-for-service system, the hospital had been making money off substandard care. And by improving care — by reducing the number of babies on ventilators — it lost money. As James tartly said, “We got screwed pretty badly on that.”
...
As long as doctors and hospitals are paid for each extra test and treatment, they will err on the side of more care and not always better care. No doctor or no single hospital can change that. It requires action by the government.
...
Yet somehow, both doctors and patients have come to imagine that a physician can accomplish far more than any human being reasonably can. As a result, modern medicine is accomplishing far less than it reasonably should.