Google Developer Day 2007 – Advanced Topics on Google Data APIs

  • GData gives access to Apps, Base, Blogger, Calendar, Code Search, Notebook, Picasa Web Albums, and Spreadsheets. List is growing.
  • A protocol for reading and writing structured data over HTTP based on REST. A lot less complex than SOAP.
  • Atom Publishing Protocol uses HTTP GET to get feed data, HTTP POST to add a new entry, HTTP PUT to edit and HTTP DELETE to delete an entry. Interesting.
  • Authentication works through ClientLogin (highly trusted applications) and AuthSub (for less trusted web applications).
  • AuthSub is works like Flickr’s authentication model as well.

Google Developer Day 2007 – New Features in the Google Maps API

  • MarkerManager manages which makers to add depending on how large the viewport is. All markers are in memory, but that’s fine since markers are really small. Makes sure you don’t have 20,000 markers on a map of the whole US.
  • You can use map.addOverlay with GGeoXML, which uses KML, to overlay geo data onto maps (and Google Earth). They also support GeoRSS. He’s showing 6 lines of code overlaying interesting airplanes throughout the US.
  • They’re showing off Tile Layer Overlay, which allows you to overlay tiles on maps. Tiles are based on X, Y and Z (Z = Zoom). The example is of Stanford’s college campus map overlayed on top of the standard Google Map. Hot. You can set transparency on tiles too.
  • They use the Mercator Projection (must investigate this).
  • No way to easily say “I don’t have data outside of this boundary box”.
  • Driving directions just launched in the Google Maps API. Four lines of code to create a map with drections. Insanity. Also, allows you to load “Way Points” (ie. directions from Foo to Bar and then Bar to Baz) along with locales.
  • 10,000 requests per key per day.
  • They’re now embedding sponsored links directly into the maps. You’ll be able to enable Google Adsense on your maps. This is an opt-in feature. This would indicate that advertisers can now geo tag their advertisements. Advertisers can be blacklisted, ads are shown based on viewport and HTML content around the map.
  • Plans are in motion to base traditional AdSense ads shown outside of the map on the actual map dat.
  • All of the AdSense stuff above should launch sometime in June.

Google Developer Day 2007 – Enterprise Search APIs: Making Information Accessible at Work

  • The usual presenter technical difficulties to start things off.
  • An entire group devoted to enterprise was created in 2002 with over 7,000 customer of all shapes and sizes.
  • Search (Google Search Appliance), Geospatial (Maps and Earth), Collaboration (Google Appes).
  • You can post content to the Google Search Appliance (similar to Google Site Maps for the GSA).
  • GSA Feeds Protocol allows you to add meta data to each record, which can then be used to filter search results.
  • You can feed the content of the document into the index as well, which allows you to control the actual content that’s indexed. Interestingly, you can post binary data formats as well.
  • You can group content into “collections” which are based on URL patterns.
  • XSL stylesheets for search results (already knew this. You can also query via the GSA’s XML interface).
  • Based on URL patterns you can mark some content secure, and others unsecure. Along with an access parameter to restrict search results. Additionally, the search appliance can ping a callback URL via HTTP GET with the user’s cookies and show results based on response (401 = unauthorized, 200 = authorized).
  • The GSA’s now allow you to install “OneBox”‘s (e.g. weather, FedEx, etc. data from Google) that shows dynamic information in search results. Triggered by a keyword and then grabs information from a provider URL based on that query. OneBox’s trigger an HTTP request to the provider URL, which returns XML that is then translated by your OneBox’s results XSL template. Insanely cool.
  • GSA’s can do up to 30,000,000 documents and beyond with custom setups.

Google Developer Day 2007 – YouTube API

  • YouTube API philosophy is to get YouTube everywhere, give flexibility, maintain some consistency of overall YouTube user experience and, respect developers and content creators.
  • Just showed a new “beta” video player that has screenshots scrolling along the bottom of featured videos.
  • http://youtube.com/rssls for more information on their RSS feeds.
  • Offer REST and XML-RPC API’s. XML-RPC returns REST’s XML response escaped as an XML-RPC data structure. Seems a bit hacky to me.
  • Standard feed responses include thumbnail images.
  • Working on a new set of API’s that conform to the GData API standards. They’re investigating open/upload/write functionality. New search calls, filtertering, etc.
  • They’re working on adding ability to show a specific frame number as opposed to whatever thumbnail they give you by default. No release date.
  • They’re working on adding more programs where users can create businesses around their content. Those who use an app to manage Google My Business listings know what I mean by good content and how to use it to the full.
  • Also working on allowing users to do seeking, etc. from the API (ie. start the video from a specific start point). No planned support for allowing JavaScript to control the player.
  • For the foreseeable future they do not plan on allowing access to the raw videos (e.g. usurp the embedded player).
  • Lots of plans for extensive statistics for YouTube video viewing (e.g. how much of a video was watched, who’s watching, etc.).
  • They are working on an upload API, which is currently focused on device manufacturers and not necessarily 100% open to all (what about GData?).
  • Search only allows searching meta data, but implicit data (e.g. voice recognition) isn’t searchable. It doesn’t sound like they’re working on it, but Google being Google you should expect this (didn’t they just launch face recognition for image search?).
  • Geo tagging and deep geo tagging is on their roadmap. They’re going to be adding steps to the upload process that should allow better information. Once there’s enough of that data they’ll be exposing it.
  • Doesn’t exactly sound like they’re working on editing, but that they’re interested in it.
  • Google Analytics? Haven’t done any work to allow such things, but the hope is that stats will be available from them and exposed publicly.

Introducing correlate.us

As some of you know I’ve been working on a little side project and I’d like to officially announce that correlate.us is open for business. Whatever that means.

I’ve been kicking this idea around for quite some time. The basic idea is that you authenticate your various Web 2.0 accounts and then correlate.us goes out and aggregates that data, groups it by tags and makes it generally more browseable for everyone involved.

The best part about it is that you can add friends. Once you’ve added a few friends you can view your friends’ activity online in an aggregated view as well. Don’t forget to add correlate.us to your facebook profile.

Intelligent image thumbnails

A recent project I’ve been working on required 4:3 thumbnails of all images no matter the original image’s orientation. This required me to do a little math and cropping before actually making the thumbnail. I use the package Image_Transform to figure out which orientation the image is and then crop it appropriately.


$o = Image_Transform::factory('IM');
if (PEAR::isError($o)) {
    return $o;
}


$result = $o->load($ds1);
if (PEAR::isError($result)) {
    return $result;
}


$w = $o->getImageWidth();
$h = $o->getImageHeight();

if ($h > $w) {
    $newWidth = $w;
    $newHeight = ($newWidth * .75);
    $newY = ($h * .15);
    $newX = 0;
} else {
    $newWidth = ($w / 2);
    $newHeight = ($newWidth * .75);
    $newY = ($h / 2) - ($newHeight / 2);
    $newX = ($x / 2) + ($newWidth / 2);
}

$o->crop($newWidth, $newHeight, $newX, $newY);
$o->save($ds2);

The first check checks to see if the image is in landscape or portrait (in portrait the height will be greater than the width). With portrait’s I use the width, multiple that by 0.75 to get my 4:3 ratio and finish by going 15% down from the top of the portrait (assuming that you’re focusing your portrait in the upper portion of the image). With landscape images I simply go outwards from the center of the image (again, assuming you’re focusing your landscape in the center of the image).

The Rick Mathes chain letter

More fan mail from my family and friends who keep sending me stuff that you’d think they wouldn’t forward their liberal, tree hugging, hippy relative who lives in the land of “The Gays” and doesn’t even own a car. Can you imagine? No car?! I mean, he rides a bike to work! The most recent is a letter written by Rick Mathes about his run-in with a Muslim imam at a prison workshop. The letter asserts:

  1. The Muslim religion is the fastest growing religion per capita in the United States, especially amongst minorities.
  2. That Muslims are assured a place in heaven by killing an infidel.

I’m really not even sure where to start, but I’ll give it a shot. So here are a few counterpoints to this letter. Feel free to pass them on to your own friends and family if and when you get this chain letter.

  1. Actually, the fastest growing religious identity in the United States is “none”. In fact, the number of people describing themselves as having no religious identity has doubled since 1990.
  2. The definition of infidel (a term originally coined by Christians to describe Muslims during the Crusades) is “a non-believer”. Most Muslims generally accept that Christians and Jews believe in God, which makes sense when you take into account that Jews, Christians and Muslims all believe in the same God. The major sticking point is exactly who the messiah is; Jews don’t believe he/she has come yet, Christians believe it was Jesus and Muslims believe it was Muhammad. It should also be pointed out that the Old Testament is the Jewish Torah and that Muslims believe both the Torah and Bible to be the gospel of God.
  3. Don’t miss the Snopes.com page, which includes a reversed version of the letter and refutes the claim the minister was talking to an actual imam.