Looking Back at 2010

2 days past 2011 and I think it’s time for me to reflect back on 2010 and looking forward for another 363 days in 2011.

2010

2010 has been a wonderful year but with very less result to show. I started off 2010 with a “money can’t buy” internship at Microsoft Research India. Exactly today (3rd Jan) but in 2010. I came back on 29 March and spend the rest of 2010 pretty much on hacking (not this hacking but this) and learning. More on learning and less on hacking… so, a lot of input but a little output.

In between, I’ve got the chance to meet and pitch to Steve Ballmer and I’ve competed (last competition for me as a student) in PolyU Global Student Challange 2010 in Hong Kong.

Personally… I’ve been learning Python (Django) and Objective-C (iOS) and hacking around a location based game project. Initially, I was working on a Facebook game, but I’ve put it on hold indefinitely and switched to iOS (iPhone). You can still check out the landing page: playtraveloot.com. For this who have subscribed as beta tester… sorry :(

2011

No fancy resolution but it will be a “lot of hacking and less of learning” year for me. I’m looking forward to release my first app called Lootpop!

Facebook OAuth 2.0 for Canvas App Explained

Facebook is getting better in providing OAuth 2.0 support for its canvas app, that is apps on facebook.com. But one thing that drives people nuts is the documentation. A lot of people getting stuck while trying to adopt the new OAuth authentication method and the Graph API because lack of proper documentation for developers.

This post will explain how simple actually getting OAuth to work with canvas app (both FBML and iFrame). There are two references you need:

  1. http://developers.facebook.com/docs/authentication/
  2. http://developers.facebook.com/docs/authentication/canvas

Authenticating User

The docs on authentication explains that you need to perform two steps to obtain the access_token that is:

  1. Redirect the user to https://graph.facebook.com/oauth/authorize  with your client_id and the URL the user should be redirected back to after the authorization process (redirect_uri)
  2. Exchange it for an access token by fetching https://graph.facebook.com/oauth/access_token. Pass the exact same redirect_uri as in the previous step (1).

For canvas app, it is much more simpler. You do not need to perform step 2. What you need is just step 1, the authorization process. See code below:

1 2 3
https://graph.facebook.com/oauth/authorize?
client_id=...&
redirect_uri=http://apps.facebook.com/yoursuperduperapp/

After this process, you can parse the signed_request (see below) to get the access_token.

The signed_request

All canvas apps will have this signed_request parameter attached to the callback URL that contains the user_id, oauth_token, expires and profile_id. You need to parse the signed_request to get these info. Example codes can be found here: PHP, .NET (C#), Python, Java.

So, now you are able to parse and get those info, and yes you will get the oauth_token directly. If you get nothing returned (no user_id, oauth_token, etc), don’t freak out. This means the user has not authorize your app yet. So, just perform the authorization process above and you are good to go!

The Good and Bad

The good thing is, it much more simpler — you no longer need to request for a new access_code/access_token when it expires, back and forth. Just parse the signed_request to get the access_token (oauth_token).

The bad thing is, the authorization process doesn’t work well with iFrame-based canvas app. You will get a Facebook inside Facebook effect, that is a Facebook page loaded inside the Facebook frame.

The Workaround for iFrame

The current workaround is using Javascript to load the authorization URL on top:

1
<script type='text/javascript'>top.location.href = '<theurl>';</script>

This will solve part of the problem. After the user authorized your app, Facebook will redirect back to your site specified by the redirect_uri. You will get the problem again (you will see a Facebook logo with a ‘Go to Facebook.com’ link). After much hack-around, I found out that by adding type=’user_agent’ and display=’page’ to the authorization URL, the problem is fixed. See the modified URL below:

1 2 3 4 5
https://graph.facebook.com/oauth/authorize?
client_id=...&
redirect_uri=http://apps.facebook.com/yoursuperduperapp/&
type=user_agent&
display=page

There you go.

Rackspace Cloud to Linode, A Perfect Switch

Perfect for two reasons: cost and performance (speed).

I was a Cloud Sites customer since October 2009. Back then it was $100/month but recently it has gone up to $149/month. Old customers like me are not affected by the new pricing, I’m still billed $100/month.

Well, I never though of making any switch… away from Rackspace Cloud. Rackspace has been fantastic all this while and I’m very happy with them. But after reading this post at Hacker News and Linode was mentioned couple of times, I decide to give it a try.

I signed up for a Linode 512 plan (512MB RAM, 16GB storage & 200GB transfer), setup a LAMP stack and quickly port one of my blogs over. The immediate effect is the loading speed — way faster than Rackspace. I googled and found more positive and funny reviews about Linode, mostly about speed. I’m half sold.

When I look back at Cloud Sites, my blogs and websites only consume around 1/5 of the monthly allocated resources, so in other words, I’m paying $80 ‘extra’ every month. OMG, but true. My blogs’ traffic have gone down gradually over the months because I no longer blog actively. Based on my calculation, if I move everything over I’ll not max out the resources at Linode.

So, I’ve decided to make the full switch and move everything over to Linode. It took me around a day to setup everything and now all my blogs and websites are living happily ever after at Linode for $19.95. I get to save $80, a big big saving considering I’m going to launch my startup, Traveloot soon.

If you want to give Linode a try, perhaps you can use my Linode referral link. I’d be very very happy. TIA.

Microsoft Imagine Cup Malaysia 2010, A Recap

I feel very honored to be invited over to the 2010 edition of Imagine Cup Malaysia Finals held in Langkawi, the Legendary Island as a guest. Previously, I had two good years as a participant in 2008 and 2009, both in Kuala Lumpur. This year, it is the grandest of them all featuring 29 teams for both public and private universities as well as university-colleges with 4 special awards apart from the exclusive Top 3.

It is amazing to see how Imagine Cup in Malaysia has evolved, from a very unknown competition back in 2008 to a mammoth, media-frenzy, student-crazy competition. Kudos to the Ministry of Higher Education (MoHE), Universiti Teknikal Malaysia Melaka (UTeM) as the organizer, Microsoft Malaysia as well as the support from MDeC. IMHO, without MoHE’s support, I don’t think Imagine Cup Malaysia can be this successful — in terms of participation and as well as the scale of the competition. I hope the Ministry and other partners will carry on with their utmost support for this competition in years to come. I’m very positive about it. So, who are the champs?

The Winners

Champion: Team HDC (APIIT-UCTI) — Project Apple
First Runner-up: Team Celestial (USM) — MiDS
Second Runner-up: Medialab Studio (UMP) — Eco Bumi

Special Awards

Best Team Presentation: Team HDC (APIIT-UCTI)
Coolest Application: Celestial (USM)
MDeC Most Promising Solution: Cyber MarksMan (UPNM)
Best Implementation of Multipoint: Cyber Knight (APIIT-UCTI)

Consolation (Top 7 Teams)

Beginner (TARC) — Green Reconnect
Cyber MarksMan (UPNM) — Search And Rescue Tactical Management System  (SARTaMS)
Hello World (UPM) — SAFER
Marshmellow (USM) — Traveler Health Awareness Tracker

*Team HDC will represent Malaysia in the Worldwide Finals in Poland this July.

My Two Cents

Here are my brief, personal comments:

  • Lots of cool, creative projects — games, multi touch, great user experience, nice design but still lack of usability. UI & UX must be specific for your users.
  • There are still projects that try to solve all MDGs with only one solution. Bro, impossible la.
  • Some projects focusing on wrong MDGs, or I should say not really targeting on the MDGs. Must know the main goal of your project as well as who are the users.
  • Many projects lack of user research, pilot test. This is a MUST! This shows that you really dig into the problem and not just mere assumption and your users really benefiting from your project.
  • Still lack of creative presentation. But the are some creative ones.
  • No business sustainability. There are teams argue that solving the world’s toughest problems requires no money “UN, the Gov, NGOs will support me for sure” If your project is a Gov pet project, fine! Else find a biz model for your project! I still remember a comment for a judge last year, Dash “You will be part of the MDGs’ problem if you don’t have a business model to sustain your project”. Very true! Gov & NGOs will not support if you are also part of the problem.
  • “This is my idea (or this & that team’s idea), why that & this team have the same (or copy my) idea?” Oh boy, there are only 8 MGDs, ideas might collide. Others might solving the same problem. It’s not the matter who copy who or having the same idea with others, what matters is the execution, implementation and the innovation of the solution from the idea.
  • Not enough effort & preparation. This is very obvious, teams do last minute slide edit, coding, script, etc. Imagine Cup is the Olympics of technology. You have well prepared and give in everything, even 1% counts. This is how my team won the D4D Awards last year in Egypt.

Disclaimer: This is my personal thoughts and have no intention to hurt any teams or targeting specific teams/projects. I’m speaking on behalf of myself, generally.

P.S. Pictures of this competition available on IC Malaysia Facebook page.

That Was It, Microsoft Research India

Finally my 3-month internship at Microsoft Research India has come to an end. It has been a super duper 3 months with the privilege to work on 2 projects, priceless experiences and best of all, lots of fun!

Happy family: Microsoft Research India TEM Group

I’ve derived an equation to calculate MSRI as follows:

MSRI = Exceptional people + fantastic workspace + amazing projects + lots of fun!

I’ll definitely miss my regular MSRI breakfast (Nutella + bread + cornflakes + milk) and will dearly miss those exceptional people in the TEM group. There are really a few places in this world that you can find such people, and MSRI is one of them. I’m really honored, really.

So long and take care guys!

Rapportive Messing Up User’s Info?

I’ve been using Rapportive (a super Firefox/Chrome plugin that replaces the ads in your Gmail with the sender’s social media info) for over few days now and enjoying it thus far till…

Repportive showing wrong user profile

Can you spot-the-not?

How on earth service@youtube.com is a guy (or gal) named Boe Schrik from Bahamas? And oh best of all, his Friendster, hi5, MySpace and beboaccounts link to nonsense, spammy profile, which is clearly NOT Boe Schrik!

According to ReadWriteWeb, Rapportive gets the sender’s social media information from Rapleaf and does some caching on their own side. From the picture above, clearly there is something funny going on.

Well, well, well… something has screwed up for sure and most likely at Rapleaf side but might as well Rapportive.

MSR India Hands On!

Phew… It has been one week plus a month since I first arrived in Bangalore on 2nd of Jan. Well, I’ve pretty much get used to the environment – culture, people, food and the traffic here. OK, so after four weeks of internship at Microsoft Research Lab India (MSR India), I experienced something really different, inside. People there are ever so hardworking and passionate in what they do… but when it comes to chill out time, they are no less than a bunch of super crazy dudes! Below: Oh… dancing all night at TAB Cocktails and Dinner.

Work hard, partying? Even harder!

There are lots of places to hang out for discussion, drink and breakfast (that is what we do every morning at third floor). Below: Lazy chairs good for a quick nap and those square wooden benches, that is our breakfast hang out place!

MSRI has a few spots to chill out. This is my fav!

Cool gadgets, yes there are. Microsoft Surface is quite impressive but too bad Xbox 360 is not there… it was there once upon a time. Below: Surface awesomeness!

Very rare gadget.

We get unlimited sugar and caffeine, which is a Microsoft tradition since the very beginning. The pantry has lots of drinks, snacks and fruits. Too bad there is no mash potato machine (Microsoft Malaysia has one!) Fruits are fresh and big…the bananas are so lovely that lured KS to eat 6 of those every day! Below: Apple and ciku from MSRI’s pantry.

Fruits from the pantry...

Lunch is great too but we have been very careful when eating – avoid chewing chili, which is super duper hot, at least for us. Snack’s time is equally great with a lot of surprises, sometimes it is good and sometimes it is not but nonetheless good to try because you will never get those in Malaysia. IMHO, the most enjoyable place to be is the top of the building, especially during sunset. You will get a good view of Bangalore, not all but part of it.

Best thing to enjoy every evening.

Above: A great view from top of MSRI’s building. MSRI (Bangalore) is a nice place to be if you like spicy food and a not too cold and not too hot weather. For me, it is the best working place I’ve ever work at.