Wednesday, May 7, 2008

Searching for faces with country domain restrictions with AJAX Image Search

Inspired by Phillip's nifty hack with Google Image search (People Around the World), I hacked together a gadget which uses the AJAX Search GimageSearch with the face restriction set and sending the appropriate search ("site:de" for German, e.g.). I also added a timer/randomizer for lazy people.

Play with it below:

Next step - Map it!

Saturday, April 12, 2008

Spelman College Gadgets Competition

A week after my Spring Break trip to Costa Rica, I flew down to Atlanta to help judge a college Gadgets contest. I crawled out of bed (before actually starting to sleep) for a 5am flight to Atlanta on the Friday, and arrived "12 hours" later at 5pm, just in time for the classic college pizza dinner. I chatted with Marcus Mitchell, who apparently is a rather high-up engineering director in NY, and then met Kevin Rabsatt, who used to work on Maps and is therefore cool with me. :)

Later that night, I held office hours for teams working on their Gadgets to meet with me to work out technical problems and get advice. Every consultation was different - some people were trying to figure out how to go from Dreamweaver to the Gadget editor (change relative URLs to absolute!), some were trying to figure out how to get around the cross-domain request (_IG_FetchContent!), and some were just looking for suggestions (e.g. add a tab with a Google code search, for the C++ cheat sheet gadget).

After that, the Googlers and I headed off to Sutra Lounge, where we started off with some drinks and then danced the rest of the night. The music was good (80s/hiphop/techno), and we even met some Atlanta Googlers there.

The next day, we woke up bright and early to judge the Gadgets competition. Each team presented their Gadget to us, explained the purpose, and showed off the functionality. I was really impressed with their presentation skills - that's something that usually CS students usually lack, honestly. The technical difficulty varied - but considering that the Gadgets contest was just one segment of the whole competition (and that they're full-time students) - I don't blame them for not having all the time in the world to spend on their gadgets. The breadth of the Gadgets was impressive - there were games, utilities, portals, and more. It was great when I could see the other students were sincerely interested in using another team's gadget for themselves. That, to me, is a definition of a successful Gadget. Check out pics from the competition below:

The rest of the day, Kevin and I tried to get work done in a lab while occasionally wandering out in the hall to watch the Lego Mindstorms robot competition. There's something fascinating about watching a robot - seeing it try to make its way around an obstacle course- wondering what it's "thinking" (or if it's simply been hard-coded).

At night, we checked out another club called Halo. It started off chill and I had my doubts as to its "club-ness", but the music and crowd picked up soon and we danced until the close @ 3am. We then went to a diner and wandered back into the hotel at 5am. I woke back up again at 8am, not feeling *terribly* amazing. Somehow I convinced myself to suck it up and go to the airport on time, but of course, the flight was delayed - delayed so much that I missed my connection in Dallas, TX. So, it took more than "12 hours" to get back to Palo Alto, but all in all, it was worth it. Atlanta was a fun city, and I need to go back to visit its Aquarium - I hear it's the biggest in the world now (better than Boston's??).

Wednesday, April 9, 2008

24 hours + 15 Google APIs + 45 students = ?

Last year, my colleague Jason and I were both just lowly college students at the University of Southern California. While there, we helped the UPE chapter organize a 24-hour programming contest, appropriately dubbed "P24". The contest comprised putting teams of students in our campus student center from noon-noon on the weekend, fueling them with all sorts of horrible junk food, pizza, and caffeine, and watching them hack desperately at their laptops into the wee hours of the night. Amazingly enough, the teams came up with some impressive and innovative projects (all to the tune of a "Tubes" theme).

So this year, we decided to try the contest again, but give it a twist and a new name: each project made during our "Google All-Nighter" would have to involve at least one of our numerous Google APIs. And since we didn't expect everyone to already be familiar with our APIs (apparently they're not yet taught in grade-school curricula), we spent the week before the contest holding workshops and talks about the APIs, alongside talks from UPE board members about general web development topics. Check out this page for links to all of our slides, codelabs, and even our ghetto attempt at taping the events (think "Blair Witch" style).

After a week of ingraining our APIs into the impressionable young minds of students, it was finally time for the All-Nighter to begin. 11 teams of students showed up to our campus building and made their nest for the night, surrounding themselves with Google-provided lava lamps and some going as far as making a multi-monitor setup and bringing a coffee machine (see pic).

We'd announced the theme of "Think Green" the night before, so most teams came prepared with project ideas involving the environment, thinking, or well, just the color green. They set up projects on, created design docs on the wiki (possibly spurred on by a 6pm contest for 'best wiki'), and began divvying up tasks amongst themselves (typically by designating a JavaScript lead, server-side lead, and graphics lead).

For us Googlers, the contest was just like extended coffee hours - teams would email or ping us on GTalk and ask for "maps help in side room" or "spreadsheets help needed by team geekc0ders" and we'd come running (or sluggishly crawling in the late hours) to their side. It was a great opportunity to see how novice users of our API were able (or unable) to use our documentation and APIs, and we now have a list of bug reports and feature requests from the students.

At the end of the 24 hours, I think we were all kind of anxious and wondering the same thing - would these teams of overworked students be able to come up with full apps using Google APIs in such a short period of time? As we watched them present their ideas and demos, the answer clearly became "yes." Judging was difficult, but we managed to award the following prizes:

  • Most Technical: "FaceMap" - An application that integrates the facebook API, google calendar, and google maps to help you see where your friends are and where they will be

  • Most Fun: "PigeonRanking" - A game where you play a pigeon that must shoot down enemy search engine carriers in order to find google search results.

  • Best use of Theme: "DreamBig" - A website with a Google map of endangered animals, aggregated environmentally thinking blog feeds, alarming statistics.

  • Best Overall: "ThinkMap" - A collaborative and interactive location-based internet games platform, built with the Google WebToolkit and using atleast 5 of our APIs.

  • Most useful - "Think Green with Your Cuisine" - A Maps API & LA CitySearch mashup that helps users find out both the price of a restaurant, and the CO2 waste that will result from visiting it.

All of the projects code is on our project hosting, tagged with uscgan2008, so feel free to check it out. Pics from the event are in this Picasa web album. Here's for hoping we get to hold another of these next year!

Friday, January 18, 2008

Using Google to Find Housing in SF

About a month ago, I decided that I wanted to find a new place. I'm currently living in a 1-bedroom apartment near the San Antonio Shopping Center in Mountain View, and I have a couple issues with it: 1) It's BIG. Until I moved my bed into it, the "bedroom" just served as an area for me to walk through on the way to the bathroom. It's entirely unnecessary for one person to have both a living room and a bedroom. (Keep in mind that I literally lived in a closet last year at USC). 2) I'm all alone, and 'fraid of the dark. I know, I'm supposed to get over that fear - but I can't help it if the monsters are still alive! It would be better for the environment for me to live with roommates, as there's a chance I'd then turn the lights off at some point, and it'd be better hygienically as there's a chance I'd take showers at night. 3) I miss having roommates. I love having the possibility of interaction with a human while I'm sitting on the couch coding and watching trashy TV.

So, thus begins the housing hunt. I started off at this AMAZING mashup site called CribQ (I knew about it as the author emailed me about geocoding issues previously). It's a Craigslist/Google Maps mashup similar to, but it takes it to a whole new level. It gives you a login, lets you rate listings, add notes, search by viewport and price range. Plus, it shows how Google Maps + Virtual Earth can live peacefully together: whenever you click on a marker, it loads the Birds Eye View for that location below the Google Map. How perfect is that? You get the great aerial navigation of Google Maps plus the hard-to-navigate-but-easy-to-look-at side view from Virtual Earth. Oh, and one more thing: it's a mashup of mashups. It has another tab that loads in a WalkScore ranking for that location, and WalkScore is another of my favorite Google Maps/AJAX Search mashups. So I used CribQ to find a listing from a guy interested in starting up a house in the Mountain View area, contacted him, and together we signed a lease for a house he'd found earlier using a different Google hack. He'd done Craigslist searches for certain housing criteria, then subscribed to them in Google Reader, and starred the ones he liked. The house he found was pimp - 4 bedrooms, outside covered hot tub, and plenty of room downstairs for a bar and dance floor.
So thus began the hunt for a roommate, and of course, more Google hacks. We made a shared Google calendar between us for tracking when we were meeting up with potential roommates, created a Google doc for our ridiculously organized and comprehensive Craigslist roommates wanted listing, and created a Google spreadsheet to keep track of room rent prices/dimensions and potential roomie pro/cons. The collaborative aspect of Google technologies is what makes them so useful for doing something like a househunt together.
Anyway, we're pretty much decided on our roommates now, and moving in in a few weeks. I look forward to using Google apps for doing our house party planning (and clean-up duties :)!

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. :)