Tuesday, December 11, 2007

Learning German with Google: Browser Language Preference


So, I had to change my browser language to a different language in order to verify that the LocalSearchControl based the language of its text ('search') on the browser preference. And then once I did that, I thought - well, why not just change the browser language permanently? I'm in German class right now at Google (taught through Berlitz), and I need ways to absorb more German outside of class. So, I changed my browser language to German and saw most of my Google services suddenly had a lot more 'k's in their UI messages. The cool thing is that I've pretty much memorized the UI of stuff I use all the time, so I can translate just based off position in the site layout. The hardest part has been with banning spammers in Groups. It's a lengthy process that involves expanding a message, clicking one link amongst a row of 10, confirming ja/nein, going to the moderate members section, finding the member, and then selecting an action from the dropdown menu. The fact that it's not as obvious as other UI has made it so that most of the words I've learned so far are from Groups (eftnernen = remove!), since I can't rely on position as easily and actually have to think about it.



Anyway, it's been a learning experience. Moving to Germany would probably be a whole lot more effective immersion, but that might be slightly more difficult. ;)

Thursday, December 6, 2007

"Voices that Matter" Conference: GWT + Maps + Gears


Today at the last day of the "Voices that Matter" GWT conference, Dan Morril (of Valleywag-Muppet fame) and I presented a session on using the Maps + Gears API wrappers in GWT. (And yeah, I overslept, couldn't make a Caltrain time, and paid $100 for a taxi ride up to SF. One day I'll learn. Maybe.)



So Dan and I presented a pretty fun/useful combination of the two APIs: Offline Driving Directions. First I presented the non-Gears-ified Driving Directions example, which basically tries to mimic the Google Maps "to" and "from" box, complete with auto-suggest based on entered queries (using the nifty built-in MultiwordSuggestOracle), and of course, the directions steps and map overlays. Screenshot below:





Then, Dan showed how to make the app more functional by adding Gears, in two ways:


  1. Use the local Db to store entered queries, so the app remembers all queries we ever enter on that computer, regardless of browser shutdown. That data persistence makes our auto-suggest alot more useful.

  2. Use the local DB to store directions results (the text), and use the local server to capture the files used by the application.




Want to try it out yourself? First you need to download the google apis wrapper library (beta) here. Then download the zip file of the driving directions sample here. The gears version isn't up there yet, should be soon.



Note that you can't actually take the Maps API tiles and functionality offline with Gears, for a couple reasons. The local server can only store files that are on the same-domain as the app. That means it cannot be used to capture Maps API tiles or the Maps API script. It is technically feasible to download the script to your server and setup a proxy for the API tiles, but that would be against the (in)famous Maps API Terms of Use.

Saturday, October 20, 2007

Using Google AJAX APIs to show "me on the web"


I realized the other day, as I was struggling to find all the videos of me/by me on YouTube, that I'm scattered across the web. I'm guessing we all are - at some point, we choose some arbitrary service to upload our creations or thoughts to, and at some later point, we might abandon that service and start putting ourselves somewhere else. That's one of the reasons I love Google -- I hope that at some point, everything I put on the web will be within a Google service, and I'll have one profile I can point people to. But, that day hasn't come yet. So how can I create a page that requires no maintenance but still reflects my current self on the web?



The answer: Google AJAX APIs. The AJAX APIs let you retrieve solely via Javascript information on the web, either ATOM/RSS feeds with the AJAX Feeds API or Google search results with the AJAX Search APIs. The AJAX APIs also come with several controls (slideshow, video bar, etc) that you can take advantage of if you like. So I've replaced my server front page (previously featuring my old projects blog) with this. It uses the AJAX Feeds API to display thumbnails from my flickr feed, youtube uploaded videos, youtube playlist, and uses the provided FeedControl class to display snippets from the Google Maps API blog, my old projects blog, and this blog.



So hopefully I won't be depressed anymore when I go to my server front page and see loads of outdated information. Atleast I know that atleast some section of those feeds will update frequently, and the knowledge that this is the representation of me to the world should motivate me to add to the feeds. Here's for hoping. :)