2016: Year in Review

Merry Christmas and Happy Holidays everyone. Gosh, is it the end of the year already, I’m already almost 30 in Korean age! 2016 came and went pretty fast.. I think the major story here is that I found much more success with women this year than I did last year, which is great, but the night schedule of working in Korea and having ill health finally wore me out. This year I got both incredibly homesick for Canada/California when I was in Korea, and also got incredibly homesick for Korea once I got back. I always have some form of depression or loneliness wherever I go – whether it be in Korea or USA. Both countries have advantages and disadvantages. In USA, I have access to everything I want, people speak my language, the weather is good in California and I can go see a doctor whenever I want. In Korea, I have easy access to beautiful girls and nightlife wherever I go.
So, the ups and downs always haunt me – I could never be fully comfortable living in Korea and at the same time living in California was also boring and lonely.

-Trip to Japan and Taiwan, finally completing my East Asia tour
-Dated at least 5 Korean girls this year, overall a much more successful year in relationships than last year, and I learned alot from each one.
-Got Lasik surgery done, which improved my self-confidence a lot.
-Got my San Francisco apartment back! My health should also start improving since I am in the regular sleep cycle again.

-Lost a combined $8000 in bets from both the Cleveland Cavs winning and Donald Trump winning – both underdogs btw. I’ll never underestimate underdogs again.
-Didn’t find any Korean girl who could come back to USA with me. This is obviously one of the biggest failures of my life, and makes me wonder what I ultimately accomplished during my 2 years in Korea. Of course, I don’t regret it, and I learned a lot, but still. This was a big disappointment for me. Now I am prompted to move somewhere else again just because San Francisco has so few Korean girls.

I think the most important thing for me this year was that I gained a lot of relationship experience, and I got a lot of feedback about how to treat Korean girls and ideas about what they like and dislike a lot better than before. Last year, I was essentially still blind to what they liked. This year, I amped up the aggression and confidence a little bit, did lasik surgery, changed my hairstyle, and it seemed to make all the difference. That said – I have to keep it up. I have to keep working on my Korean and working on my next goal of getting to Vancouver – because ultimately San Francisco isn’t the same as it was even 2-3 years ago. I have few friends left in SF – most of them went back to Korea so I know just 3 good American friends here – all guys of course. There’s virtually no ways for me to meet Koreans here anymore, and very few go to meetup or online language exchange websites anymore. My ultimate failure to keep a relationship in Korea and bring a girl back is what causes my current situation and next challenge. I have to keep trying therefore, to achieve my goal of marrying a Korean girl – but it has to be done either in USA or Canada, which makes things all the more challenging. But I don’t really have a choice – unless I want to work in ‘Hell Joseon’ (what Koreans refer to Korean work culture as), I could never stay in Korea long term.. this is the only thing I can really do, and fight for, and I’m not getting any younger just sitting around.

Programming School/Work

Switchfly Fedex Day Projects: Facebook integration, Passbook Integration

My company, Switchfly have events called FedEx days, which basically means we set aside 24 hours for employees to work on whatever project they wanted given that it provides some business value to our application.

Fedex Day 1:
So, I joined with a few other engineers and business people to create Facebook sharing and liking for hotels and itineraries.
So, after 24 hours of toiling, we had a few mockups to present.

Facebook Like for Hotels
Facebook’s Like feature relies heavily on the Graph API, and the most difficult part of implementing this is due to FB having to have a public, static, unique URL for every page that you want to link Like with. Since our hotels are generated with a random key, this proved quite difficult, and in addition, FB like requires heavy use of metadata tags, which have to be inserted into the body. The problem is that the info required for the metadata, such as the Hotel name, Hotel description, is available only after the page renders, and inserting meta tags dynamically into the head of the page breaks the Like feature. So, using PHP or Coldfusion, the page has to grab info from the shared database at page render time, so that the meta data exist in the source, and publicly pingable by FB. So our mockup looks like this:

Liking hotels using FB API
Liking hotels using FB API

Meta data on the page looks like this:

This will share this hotel or send your friends a message telling them what hotel you are looking at.

Facebook Share your Trip
So, we also have FB sharing your trip after you make a booking. This is done via simple facebook API functions, and currently sends a link on FB that leads to the same hotel/flight search that you did, but if we were to expand it, it could look something like this:

Facebook Trip Sharing
Facebook Trip Sharing

Basically, we want to be able to make custom objects and custom actions using Graph API to post information about your itinerary to your friends. You can see what friends are on your flight, and change your flight plan, book a hotel, change a reservation, or rent a car using the post. Anyways, for 24 hours, building these two proof of concepts have been pretty fun, and I someday hope to implement these features in full.

Fedex Day 2:
For Fedex day 2, we decided to make Passbook integration for our itineraries. I was the only engineer on this project this time around (and again toiled for 24 hours).

Passbook Generation
So, Passbook is an Apple application, and in order to integrate with Passbook, you need to be an Apple dev with provisioning to generate a Passbook id for integration. This part was kind of confusing because of the way how certificates and certificate requests were set up. But after looking at the Passbook documentation, I managed to generate some sample passes for our app.

Amex Switchfly Air Passbook
Amex Switchfly Air Passbook
Amex Switchfly Hotel Passbook
Amex Switchfly Hotel Passbook

Integrating with the application

Passbook and SMS Integration
Passbook and SMS Integration

Integration with the application was more difficult. Firstly, the SMS service I wrote (to send users links to their booking confirmation) integrated well with Twilio, and that API was fairly straightforward to set up (Kudos to Twilio), the limiting factor I found being the 160 char limit on SMS texts and the trial account. Secondly, the passbook service was more difficult. Basically, I had to capture the information on the page into json, and ajax it over to our coldfusion/sitebricks endpoint so that we can make use of it. Unfortunately the signing of the pass required a cryptographic algorithm which Apple doesn’t help you with. I had to use Jpasskit, a third party library to help me with that. Even then, the main issues I ran into were:

1) Passbook only contains limited space on the front. Doesn’t even have enough room to put a roundtrip flight, let alone flight + hotel.
2) Each passbook needs to be signed by a certificate which has a keystore and a password from somewhere on the server.
3) Our context and encoding filters prevent .pkpass from being distributed.
4) Even if it was working, only Mac OS and iOS users would be able to make use of it (via email or Safari).
5) Not sure how I could get the SSL Handshake with Apple’s restrictions working.

So because of these issues, not sure if this will make it to prod, but it was a good learning experience nonetheless.