Wednesday, October 21, 2009

The Man: 1, Mike: 0 (but maybe you can help)

(for how to help, skip to the end)

My friend Michael had a recent vendetta against The Man (Southwest Airlines, in this case). They bumped him from a flight and gave him a $350 travel voucher in return. He wrote down the number and threw away the paper, happily dreaming of trips to exotic locations.

There was just one small problem: he only wrote down one number—the voucher number. Turns out that you also need the security code, or your voucher number is useless. He contacted Southwest, and they said they couldn't help him. Rather than give up, though, he vowed to try all 9999 possible security codes at Southwest's web site until he found the right one. He estimated that after 25 days he'd have a 50% chance of finding the right one.

I saw Mike's blog entry about his fight, and as one who detests The Man as much as the next guy, I took pity on him. No, I didn't start spending my free time entering numbers at southwest.com; instead, I wrote a computer program to enter them for me.

The robot

After a bit of work, I had created a robot that would go through the booking process on Southwest's web site all the way to the point where you enter the voucher number. Over the course of a few hours (while I slept last night), it tried all 9999 four-digit security codes.

Unfortunately, I discovered when I woke up this morning that none of the security codes had worked. None of them. (On the bright side, at least Mike didn't have to spend 50 days entering numbers manually, only to discover that none had worked.)

What went wrong?

There are a few possible reasons why it didn't work:
  1. Mike wrote down the wrong voucher number.
  2. The security code format isn't a 4-digit number.
  3. There's a bug in my program.
Reason #1 is a lost cause. If that's the real explanation, there's no hope.

Reason #2 seems possible, but Southwest's booking site, as well as pages found by Googling, lead me to believe that it is, in fact, a four-digit numeric code. (Anybody know for sure?)

How to help

So that leaves Reason #3: I messed up. However, you can help me debug my program. I need two things:
  1. If you're a programmer, you can take a look at my program and let me know if you find any bugs.
  2. If you have a Southwest voucher number and security code, you could let me test my program with them. (I promise I won't steal your flight...)
If you're a Python programmer, feel free to take a look at voucherbuster.py. (Warning: really ugly quick-and-dirty code. Also, you'll need mechanize to run it.)

Because I don't have a working voucher number/security code combination, I can't be 100% sure that my program will recognize a correct combination. I'm pretty confident that it works, but I can't be sure unless I test it with a real voucher number/security code pair. If you too want to get back at The Man, and you're willing to let me try your voucher number (not to buy a ticket, just to validate my program), drop me a line. Thanks!

Saturday, October 17, 2009

Note to self

Don't ever go to Costco on Saturday afternoon again. Ever.

Saturday, September 26, 2009

I started college this week

Again.

No, I didn't start grad school (although I'm still thinking about it...). Instead, I started a Mandarin class. A few of us at work who travel to China wanted to be able to communicate at least a little while we're over there, so we signed up for a class from DeAnza College. It's five days a week for an hour during lunch, and it goes until mid-December.

Conclusion so far: I'm really bad at Chinese.

Other conclusion: college students are really young these days.

I studied Spanish for long enough that I'm reasonably fluent now, but it's really hard to start again at square one with a new language. Doubly hard when the language includes a bunch of sounds you've never made with your mouth before. Triply hard when its writing system is completely foreign to you.

Wish me luck.

Health care

This is the best article on health care reform I've ever read:

How American Health Care Killed My Father, in The Atlantic.

It's big (six long pages), but it's very accessible, and spot on.

An excerpt:
I’m a Democrat, and have long been concerned about America’s lack of a health safety net. But based on my own work experience, I also believe that unless we fix the problems at the foundation of our health system—largely problems of incentives—our reforms won’t do much good, and may do harm. To achieve maximum coverage at acceptable cost with acceptable quality, health care will need to become subject to the same forces that have boosted efficiency and value throughout the economy. We will need to reduce, rather than expand, the role of insurance; focus the government’s role exclusively on things that only government can do (protect the poor, cover us against true catastrophe, enforce safety standards, and ensure provider competition); overcome our addiction to Ponzi-scheme financing, hidden subsidies, manipulated prices, and undisclosed results; and rely more on ourselves, the consumers, as the ultimate guarantors of good service, reasonable prices, and sensible trade-offs between health-care spending and spending on all the other good things money can buy.
Unfortunately, I don't think that our political system is capable of effecting the type of fundamental change that is necessary to really improve the situation. But if it were, this guy has the right idea.