Continued Immigration Adventures of a Citizen of the World

WARNING: boring entry follows, but I feel like I have to post it anyway because it really happened. And plus, I may end up getting some visitor from search engines this way. Summary: Canadian border patrol is lax and US border patrol is totalitarian and not always well-trained. You may now stop reading any time after this point and I will not be offended.

I’ve lived in the United States since 1991, and after a series of visas (F-1, TN-1, H-1B) finally got my green card last year, so I’ve been an outlier for quite some time. I have seen a lot of confused border guards try to figure out on the fly if I’m legal without letting on to me that they don’t really know the regulations all that well. Often they take out their uneasy feeling of confusion on me because I’m handy.

Today I flew back from Vancouver after a short visit to Canada, the country I was born in.

Canadian passports expire annoyingly frequently, being good for only five years. My most recent passport expires in August 2007, so after a trip in May, I sent it in to get renewed. Higher than normal traffic at the passport office means that I had not received my new passport when it was time to leave for this trip, so I researched regulations (which, as it has been widely publicized, had recently been tightened to required passports for most travelers between the US and Canada) in a detailed way prior to leaving.

I was quite certain that permanent residents of the US were allowed to enter the US with just a green card (as I did on my visit to Canada in May), but was less certain about Canada. For once, I was more worried about getting into Canada than getting into the US!

I investigated and found

http://www.cbsa-asfc.gc.ca/E/pub/cp/rc4161/rc4161-e.html#P003

which seems to hint (but not conclusively imply) that a US green card is enough to enter Canada.

Just for good measure, I thought I would double-check the US requirements. I found that according to http://www.cbp.gov/xp/cgov/travel/alerts/whti/documents_needed.xml that my green card was enough. It said, in part that

U.S. Lawful Permanent Residents (LPRs) must provide one of the following:

  • I-551, Permanent Resident Card (“Green Card”)

OK. I have one.

Also page 7 of

http://www.cbp.gov/linkhandler/cgov/toolbox/publications/travel/welcome2us.ctt/welcome2us.pdf

EXPLICITLY states that

“Lawful Permanent Residents are NOT required to have a passport.”

Just for good measure, this PDF file http://www.cbp.gov/linkhandler/cgov/travel/alerts/whti/document_requirements.ctt/document_requirements.pdf shows pictures of the documents required, and the green card is enough for departure and entry by air.

I know, I know… overkill in the research department. Chill, Richard! Don’t be so paranoid. Right?

Then I took my trip. United Airlines automated check-in flying out of the US requires a passport, so I had to stand in line and deal with a counter clerk. Very annoying. Good thing I got there early. Then after landing in Canada, I gave the border agent there my green card and said that I’d applied for a passport and was still waiting for it. No prob.

Flying back to the US. The Vancouver airport lets you pass US immigration before you take off. Handy. The line was huge, and I handed the guy my green card. He asked me if I had a passport and I said no. He says, “Are you familiar with the new passport regulations?” Then he proudly hands me a slip of paper with the new regulations on it that reads AND I QUOTE:

“Beginning on January 23, 2007, all persons – including U.S. citizens – traveling by air from Canada, Mexico, the Caribbean, and Bermuda will be required to have a passport (unless traveling with a U.S. Permanent Resident Card, asylee or refugee document, Merchant Mariner’s Document, or NEXUS Air card) to enter the United States.”

I could tell he was happy about having caught what he thought was just another scofflaw. He says “Everyone needs a passport.” I stammered lamely “But… but… I have a green card?” He says, “Doesn’t matter.” Never mind that I could point out the part in parentheses on the slip of paper HE JUST HANDED ME to prove him wrong. “Here,” he says, sliding the piece of paper a little closer. “Keep that.”

I could tell his guard dropped and he was going to let me through, but I was still stammering. I explained that I’ve applied for a renewal and I’m still waiting and no, I didn’t have any proof that I’ve applied for a renewal (I don’t know what proof I’m supposed to get). I show him my passport that expired ten years ago that I brought along just in case. Still beaming at trapping me, he finally lets me pass.

Not that it matters — I suspect if he’d escalated me to the secondary room where questionable cases go, I would have gotten through pretty quick with someone who actually knows what the regulations are. Er. Maybe.

Viva bureaucracy!

The Life of Pi (with a Free Boost)

At some food outlets, you order at the counter and then wait for your order to come up. A lot of these places will give you an order number printed on your receipt. But some will instead ask your name, and then call your name when your order is ready. I suppose this is an attempt to “personalize” service, and make you feel like more than just a number.

One time, I ordered at a place like this, and when asked my name, I said “Richard” because that’s what it is. The teenaged employee then asked “Is it okay if I just put ‘Rich’?” This kind of irked me… I didn’t volunteer my name. They asked. I told, only grudgingly. Being corrected simply for the sake of the convenience of the slow-typing employee was kind of adding insult to injury.

My first instinct was to promise to myself that I would answer future queries of this sort with “Bartholomew” and then when asked “Is it okay if I just put ‘Bart’?”, triumphantly state “Absolutely not!”

[I will only briefly touch upon the obvious issue that asking a person’s name to match them to orders solves the problem very poorly compared to a guaranteed unique order number. I would guess if your name is “John” or “Brittany”, you would frequently have to delve down to the specific contents of your order to make sure you haven’t gotten food intended for someone else whose parents were as uncreative as your own.]

Of course, reason set in, and I realized that this poor employee did not invent this ridiculous policy asking customers to disclose personal information in an attempt to allow them to have a easily recalled primary key. So instead of wasting effort on how to make their lives more difficult, I then turned my energy to figure out how to make their lives easier.

Obviously, a short name is easier to type. So now, when I order my Orange Berry Blitz (which although has curiously disappeared from the menu board, can still be ordered) with Fiber Boost at Jamba Juice, I lie about my name.

At first I would use the name “Gus”, since it’s short, so quick to type, and rare, so I probably won’t have to delve down to choice of free boosts the figure out which of the three of us similarly named folks this Orange Berry Blitz actually belongs to. Also, the name is funny, which for me, is key.

However, whenever I said “Gus”, I always got this look that seemed to say either “Huh?” or “I don’t believe you.” I always had to say it a couple times. And it’s not that easy to say or hear in a loud environment.

What are the criteria for a pleasant name lie? Short. Easy to say (because I’m lazy too). Easy to remember. Easy to spell. A real name in North America. Recognizable, but not too common. Male.

Here’s a brainstorm list of two-letter possibilities: Al, Bo, Cy, Ed, Hi, Mo, Pi.

The names Cy and Bo are known in athletics but uncommon enough to probably elicit the “huh?” response from unworldly teenage clerks. Al and Ed are simple but common male names.

Lately I’ve been trying “Ed”. I figure an employee would have to be admirably lazy to try to shorten that. “Is it okay if I just put ‘E’?” That takes way longer to say than to find the “d”.

But “Ed” is also not that great a choice. It’s easy and fast to say, but it is also not that easy to hear, especially over the rabble of blenders grinding up energizing smoothies. It’s not that easy to touch-type (although it is easy to one-finger type) on a standard QWERTY keyboard. And worst off, I always have to think about it when they ask me my name, which makes me paranoid that they have trapped me in a lie.

I could try Al, but worry since it is short for Albert, Alan, Alex, Allan, Alvin, Allen, Alberto, Alonzo, Alfred, Alexander, Alfredo, Alejandro, Alfonso, Alton, Ali, Alvaro, Alexis, Alphonso, Alva, Alphonse, Aldo, Alden, Alfonzo, Alec, and Alonso, I could end up fighting for my juice with a dozen people all with different names and several ethnicities.

Mo is less common, but can also be spelled “Moe”, which means I would have to say and spell it.

That leaves Pi. Sure, I’ve never met anyone named Pi. But it is arguably the most famous Greek letter, and the name of a character whose Life Of is documented in a recent award-winning book.

And the best part for this customer who has always had a soft spot for mathematical constants, is that my order identifier would finally be my favourite number… something that just can’t happen at a stodgy traditional place that confines their order numbers to integers.

How very transcendental.

Bay to Broke(n Tummy)

I ran the Bay to Breakers today. It was my fourth year in a row. Got up at 5:20 AM so I could drive to Daly City and take BART to the starting line.

As a “pledge runner”, I got a starting position near the front of the pack, and started quickly. For training, I mostly run a 3.85 mile loop, completely flat. The race is 12K (7.45 miles), and has a big hill between mile two and three. So it’s no surprise that I started out fast and got tired after the first half.

This means that for the last two thirds of the race, I am a slowpoke laggard getting passed left and right. I was constantly at the back of whatever pack I was affiliated with. Everyone passed me: a guy pushing a baby carriage; women — even tiny girls (I would find a burst of energy when this happened, and try to keep up, generally to no avail); guys dressed as Spider Man and Little Bo Peep. It was humiliating.

Yet, I did better than I ever have by nearly three minutes. My official time is 53:10, and I was ranked 365th. Hooray! And I felt like I ran FAST… hit the first mile marker in about 6:05, which is very good for me. My stomach was cramped all day, like it sometimes does when I run too hard. So I don’t feel like I could have asked for much more. It’s the malady that proves the effort.

Norwegian Pearl Guest Set

Yesterday was the last day of a cruise on the Norwegian Pearl with my brother and sister-in-law(ish gal). It was a lot of fun, although I did stay up too late pretty much every night. What does it mean when you come home from a vacation and need to sleep? Not to mention a weird, dizzy feeling. Inner ear overcompensation?

On Thursday night, there was a talent show, similar to the one on the Norwegian Dream last year. Just like last year, I came in second, again by one point, this time to a kid who did hip hop dancing. I did not really see his performance (I was out of the room for most of it). I do distinctly remember walking into the room while he was doing his thing and thinking to myself “If I lose to him, I am going to kill myself.” (So far, I have not followed through… I think maybe I was just kidding.)

There were two comics, but I was fifth and he ninth, so I was the first comic the audience saw, and I had to warm them up. But they were willing, and I did some tried and true material with a couple fairly new things and one new venue-specific joke (about all the hand disinfecting machines around). All in all, it was a good set. Every joke worked – some better than others, but there were no duds. Five solid minutes.

Even though I did not win, I had a great set. If you’re going to take a cruise and do some comedy, Norwegian is the one to do.

Math Jesus

Today I got multiple copies of a “pump-and-dump” spam. You know, the kind where they tell you about a stock that is “going to go through the roof” which then does because enough people believe it, so it becomes a self-fullfilling prophecy. The best part is, no one even has to be convinced about the fundamentals of the stock — they just have to believe that enough other people are going to buy. Thus, the pump. Alas, the dump is a tough one. Good luck with the timing on that. But I digress.

Somehow, many copies of this spam made it through Gmail’s normally excellent spam filter. Each was from a different, made-up sender, with first and last names probably independently chosen from some list. What was cool was the name on one of the spams: “Math Jesus”.

How wonderful. I immediately claim ownership of this moniker, since the spammer is probably not aware that this pairing was made. And how fitting. I am very good at math — not the best mathematician the world has ever seen, but definitely way up there. Not a math god. But, yes, dare I say, a Math Jesus.

Thus my new screen name/nickname/band name. Math Jesus.

Gödel showed that we need an infinite number of axioms for a system that can embed the natural numbers to be complete (that is, for every statement to be provably true or false). Something along those lines.

So let me say right now: ten commandments ain’t gonna cut it. That’s just gonna be the tip of the infinite iceberg.

Mr Whiskers Rides The Bus

From http://www.dailymail.co.uk/pages/live/articles/news/news.html?in_article_id=447527:

Bus drivers have nicknamed a white cat Macavity after it has started using the No 331 several mornings a week.

The feline, which has a purple collar, gets onto the busy Walsall to Wolverhampton bus at the same stop most mornings – he then jumps off at the next stop 400m down the road, near a fish and chip shop.

(Click link for full story.)

Clearly a smart cat. It made me wonder how he figured it out in the first place. I figure he must have seen people get on at the first stop and get off at the second, and he became curious in that cat way.

The kitty has two different colour eyes… just like the cat I had when I was growing up. It means the cat is special. Not evil.

ROYAL FLUSH

I once got dealt a royal flush.

That’s right. A “natural” royal flush. On a quarter video poker machine.

To make matters even more amazing, it was on the first quarter I gambled that day. (Can you imagine if the guy who had been playing that machine for hours just before saw me come over to “his” machine and hit a royal flush on one quarter?)

The probability of being dealt a royal flush is quite low. There are exactly four such hands — one for each of hearts, spades, clubs and diamonds — and there are 52!/(47! * 5!) different poker hands.

[Where does this number come from? Well, the first card has to be one of the 52 cards in the deck. The second has to be one of the 51 remaining, so there are 52*51 ways to get two cards. The third has to be on of the 50 remaining, so there are 52*51*50 ways to get three cards. Using this reasoning, there are 52*51*50*49*48 ways to get dealt five cards. But rearranging the cards doesn’t change what’s in the poker hand — that is, ace of clubs and two of hearts is the same as the two of hearts and the ace of clubs — so we have to divide by the 5*4*3*2*1 ways to arrange the cards.]

So there are 2,598,960 different poker hands, and exactly four of them are royal flushes. This means the odds of being dealt a royal flush are 1 in 649740.

Them’s not very good odds.

Here’s what happened. Several years ago, I was flying somewhere — I believe to Spokane to visit a friend of mine that lives just over the Idaho border in British Columbia. My plane landed in Las Vegas. I had to switch planes, so I got out and went to the gate. I had a good 45 minutes before boarding started, so I thought I would do some gaming. After all, how much can you lose in 45 minutes?!

I selected a quarter video poker machine. I put in my money and hit deal. It dealt out the cards pretty fast, then made the little happy note sound and highlighted the “Royal Flush” payout line. I was a little surprised (to say the least) and not too sure what was going on. It took me a few seconds to realize that I had actually been dealt a royal flush. I held every card (I was once dealt four deuces in a “Deuces wild” game and I was so flustered, I failed to “Keep” any of them, and thus failed to collect my $50), and hit “Draw”. Ta-da! For my one quarter, I won $75.

If I had put in five quarters, I would have won $1000. Yikes!! So of course I immediately started kicking myself for not having put in five quarters. But hey, what can you do.

Yeah, it was cool. But it was also a downer. I had hoped to kill 20 minutes or so. Now what was I supposed to do… keep playing? As a percentage, I was WAY up. And extremely unlikely to change that one way or the other.

I played a few more anticlimactic hands of poker, then cashed out my now $60-some odd dollar draw and went on my way.

It’s great that I got it. But also it’s a bit of a downer — not because I never CAN do it again, but because I probably never WILL do it again. If you play 450365 hands, you have a 50-50 chance of seeing a royal flush. I probably won’t play anywhere near that number, so I have much less than a 50% chance.

Of course, that’s just being DEALT a royal flush. The odds that it will happen with a draw are much higher, but it’s harder to calculate because it depends upon your strategy. Nevertheless, since I don’t play poker that much, I think it reasonably prudent that I don’t expect to see a royal flush ever again.

But that’s okay. I got mine.

Lazy Bones

I’ve always been proud about how lazy I am. I often say that I will do an incredible amount of work just so I can be lazy. Something along those lines happened today, and I realize that what it is is that I hate is routine busywork; so much so that I would rather do a certain quantity of creative work to avoid an equal quantity of busywork.

At my company, we have used Apple’s deprecated WebObjects 4.5, which uses Objective-C and WebScript. Years ago, WO4.5 was the most fun web development environment, but since it turned 5.0 and substituted Java for Objective-C, it’s been much less fun and it’s not used very widely outside Apple, and it’s not really admired as much as it used to be. It’s gotten worse (Java over WebScript? Get real) and other environments have gotten better (I like Django a lot right now).

Anyway, we have a specific application that has been bothering us for a long time, and it’s time to port it.

I’ve been looking at “SQLAlchemy”, a Python-based object-relational modeling tool that works with Oracle (which I hate, but that’s a story for another time). It seems using this tool will make the port from WO4.5 to Python a fair bit easier.

The first step seemed to be to create new model files that describe the object-relational mapping. Of course, the syntax for these files (pure Python, it turns out) is quite different from the syntax used in WO’s EOF object-relational mapping layer. We have a lot of objects, so rather than do it by hand, I thought I would write a tool to do it.

EOF uses a plist file format. There are Objective-C routines to read these files, but I couldn’t find any libraries to do so in Python. So I installed pyobjc so I could use one particular Objective-C call from Python. This made parsing very easy, and creating the Python model file was a piece of cake.

It’s not 100% yet, but I was quite amazed not only how quickly I could produce the translation tool, but what great lengths I would go to to be lazy.

Revisiting my Cubist Period

In preparation for a Rubik’s Cube contest at an 80s party I went to last week, I picked up the puzzle and have been studying and playing around with it a bit lately.

I happened to be in Hungary in the summer of 1980, shortly after the cube was invented by Ernö Rubik, and several months before it became popular in North America. Someone gave me an article in Hungarian about how to solve it. I can’t read Hungarian, but it included a bunch of photos and some “patterns” — that is, series of moves that tweak a small number of “cubies” without disturbing anything else. With these patterns and a little initiative, I taught myself to solve it.

With practice, I could solve it pretty reliable in 90-120 seconds. That’s where I am now. My algorithm is quite simple: first, solve one side. This step does not use any patterns besides one that I devised myself. Each of the following steps does use patterns: place the corners, orient the corners, place the edges, orient the edges.

Three of the four patterns were extracted from that mysterious magazine article, but the forth, which orients the edges, I replaced with a pattern a friend of mine showed me. He called it “Rubik’s maneuver”, so who knows, maybe it was discovered by Rubik himself.

Although 90 seconds is okay, it’s definitely not world class. The real pros can solve it in less than 30 seconds consistently. Maybe less than 20. I’ve look at this site which has a different method of solving the cube that does not do one side first. There are some interesting ideas here I’m going to explore further.

(Oh, by the way, the contest was canceled… they forgot to bring the cubes.)

An Old Alternative is New Again

Radio station 104.9 is back!

At the end of 2005, the radio station at 104.9 suddenly and violently changed format from mildly alternative to Spanish. In a swoop, one of my favourite and commonly punched-up presets in my car became obsolete.

Of course, my habit of cycling through radio stations to find something good playing right this second (a habit that my sister shares, although I am a rank beginner compared to her) included this old favourite stop for quite some time after the changeover. And me. I’m so dumb. I would stop on this station and lean forward, listening hard. Like in five minutes I’m going to “figure out” Spanish.

Eventually I removed the preset from the list. Acceptance. And closure.

But it’s back, baby! As stated on a concise bulletin on MySpace (thanks Krysti!), 104.9 is now back to its old format, which I would describe as “very much like 105.3 except slightly softer”.

Spread the word. And enjoy the reincarnation of an old friend.