Sunday, April 18, 2010

Are you the Matt Damon of your game?

This is generally a technical blog, but some observations, although non-technical, are too interesting to not write about. I love Hollywood movies and I like Matt Damon ones a lot. Until last night however I didn't realize the most interesting pattern in the roles Matt Damon has portrayed over the years. It struck me after I watched Rounders last night.

Count the number of movies in which Matt Damon has played a character who is the absolute genius of his field. Here is a list.
  1. Good Will Hunting A Math Prodigy
  2. The Rainmaker A talented lawyer who wins his first case barely out of the law school and against a behemoth Insurance company.
  3. Rounders A genius poker player
  4. The Talented Mr. Ripley A murderer who is unusually talented in covering his tracks
  5. The Legend of Bagger Vance A prodigy Golf player
  6. The Bourne {Identity, Supremacy, Ultimatum} A one of a kind CIA operative who is absolutely unbeatable
He has a thing about playing a genius, doesn't he? And no doubt he is very good at it too. All his characters are thoroughly entertaining and deeply inspirational at the same time.

Hoping to see his latest movie soon - Green zone.

Saturday, April 17, 2010

ReaderScope 1.9 - OAuth

For past month or so, some of you (ReaderScope users) might be facing problems if you were using AutoLogin. This happened after I updated the login mechanism in v1.8.2 to support Google Reader authentication changes. I won't go into the details, but AutoLogin is very likely to fail in the new scheme of authentication. So I advised some of you who sent me the error reports to switch to Username/Password login. It was a temporary solution.

Today I am glad to announce that starting with v1.9 ReaderScope supports OAuth login for Google Reader - the right way to login without password (compared to other password less alternatives at least).

This has been possible only after Google Reader team enabled OAuth login for their service a few weeks ago. I have been working since to get ReaderScope working with OAuth. Not all the time was spent on OAuth, but in order to implement OAuth I had redesign entire networking layer of ReaderScope (which I am glad I did because I could improve some things along the way).

Finally RS with OAuth is ready. If you were still using AutoLogin, then after upgrading to v1.9 you will get a warning message that AutoLogin is no longer supported and you will be automatically logged out. On restart you will be taken to Login screen where you can start doing OAuth login.

If you are using username/password, then after upgrading to v1.9 you will get a message informing that a new password less login option is available. You won't be forcefully logged out though. You can choose to logout and relogin.

I have been testing most of the functionality in past couple of days. But I won't be surprised if some holes were left out. Please report any problems you might face or sent crash reports if you get any.

Enjoy the upgrade!

Wednesday, March 17, 2010

New app "Find Comments"

Over the weekend I found a simple API from ContextVoice. It was something I was looking for a long time. A service that when given a URL of a news story, returns reader comments from all over the web.

It didn't take long to put together a simple app around this API.

FindComments is really simple.

1) Install app
1.1) Do NOT look for a new icon in the launcher. You won't find it.
2) Browse any news story or blog post in the browser.
3) Press Menu > Share Page
4) Press "Find Comments"

Voila!

Available in Android Market, AndAppStore, Slideme.

Here are screenshots. Give it a spin.



ReaderScope users, give it a try. Would you like to see this integrated tightly with ReaderScope?

Monday, March 15, 2010

@font-face-lift

I always found that customizing the look of one's website is greatly constrained by the inability to customize the typeface. Traditionally browsers use pre-installed fonts and with the CSS font-family property, you can provide a list of typefaces that you would like your text to be rendered with (Trebuchet MS, Verdana, Sans-Serif, monospace, for instance). But this list is merely a suggestion. You don't have complete control over how your web page is going to look like in X browser on Y platform.

On last friday however I found that it is about to change now (at least in my hopes). I stumbled upon a blog post which had its text rendered in a very beautiful font. After some digging through its source, I discovered the @font-face CSS property.

It's not that this is some brand new thing in latest CSS spec, but it seems to have become of practical use only in latest browsers. You can learn more about how to use it in this post. I am going to talk about my experience with it and how it is still not perfect.

If you are reading this post in an RSS reader, go on and open it up on my blog at this point. You will see it rendered in a beautiful font. But not all of you may be. What it should ideally look like is:


But is that what you see?

The snapshot above is of Safari 4.0.4 on Mac OS X. I believe it looks the same on latest Chrome versions of Linux and Mac OS X. It looks similar in Chrome on Windows XP, but on my eeepc it looks very light for some reason. It won't look anything like it at all in Firefox on any OS. That really disappointed me, but the fault here is not of Firefox, but of my blogging site blogger.com.

After a lot of debugging of why Firefox wasn't loading @font-face, I found that Firefox does not allow a webpage to load fonts that are served on a different domain. Blogger does not allow the user to host any arbitrary file, so I host my font files on www.altcanvas.com. That offends Firefox and instead of loading the custom fonts (Junction, Santana), it falls back to Trebuchet MS. You can find more details about Firefox's policy on this matter in this article.

I spent whole friday doing fun-font research for my blog. But it stoked me enough that I started redesigning www.altcanvas.com too, which desperately needed a facelift anyway.

So over the weekend with the help of two new fonts (Junction and Comfortaa) and my recently learnt CSS tricks, I redesigned my website. Check out the new look of http://www.altcanvas.com

Again the ideal look is like this:


Don't know what you will get to see. But this time, Firefox's rendering will look  just like what you see above. That's because the fonts are now hosted under the same domain that is serving the web-pages.

What I also found was, even if all modern browsers successfully show custom fonts defined with @font-face, their rendering differs. For instance, the Junction font is only available in Regular font-weight and no bold variant is available. So the bold text doesn't look any different from normal text when viewed in webkit browsers (Chrome, Safari), but Firefox (and I believe IE too) smartly creates a bold variant of the typeface. Also I guess, the final look is affected by the OS platform, screen resolution, Anti-Aliasing settings, etc. (The 'e's look poor for Junction font in IE.)

So in conclusion, we have a new powerful tool. It's not perfect, but it's pretty good.

If you want to customize typeface of your own website or blog, I highly recommend fontsquirrel's free @font-face kits.

Ads:
* CSS: The Missing Manual
* Head First HTML with CSS & XHTML
* Fonts & Encodings

Friday, March 12, 2010

ReaderScope 1.8.{2,3} - new authentication and global share

I released 1.8.2 couple of days ago. The only change it had was the new login mechanism. Google reader team announced on fougrapi group (that stands for "Friends of the Unofficial Google Reader API") that Google Reader soon will be discontinuing the old SID-based login mechanism. Thanks to them for announcing this well before the actual change is supposed to happen (sometime in April). ReaderScope accordingly has been updated to follow the new rules.

This change is almost painless for username/password based logins. However the  AutoLogin is a little hairy issue. The library used to get AutoLogin working is unsupported and undocumented. There is an official way to do AutoLogin kind of thing on Android 2.0 devices, but it requires access to actual device to test and still I hear it's not well documented. Besides the devices at versions <2.0 are going to be there for  a long time. Therefore I got the undocumented and unsupported library to get working somehow with the new auth mechanism. However the changes I had to make were only little short of hocus-pocus. So I was very skeptical about how it was working. I released a preview on ReaderScope mailing list. So far the feedback of the preview release and actual 1.8.2 has been positive. I haven't seen anyone reporting issues due to failed logins. I have strategic log statements to detect if things go wrong with authentication. So just mail me the logs if you see suspicious behavior. Settings > Logs. Menu > Email.

Today in 1.8.3, I also fixed a bug which would have caused auth problems if anyone was upgrading from pre-1.2.5 installation.

With the new authentication done, I have a very exciting feature implemented in 1.8.3.

When you share the news item now, you will have option to trigger the global sharing apps. They could be your favorite Twitter, Facebook, Email clients. The most useful one I found was "Read It Later" which lets you save the news item to your InstaPaper account for reading later. These are the same apps that you see when you "Share Page" from browser.


I remember someone had requested this feature once long time ago. I am sorry it took so long to implement. But now that it is here, I am sure you will enjoy it.

Ads:
Hello, Android: Introducing Google's Mobile Development Platform (Pragmatic Programmers)
Professional Android Application Development (Wrox Programmer to Programmer)
Android Wireless Application Development