Doodles for Google Apps

 

Since 1998, when the first doodle was released, they have been one of the most loved features of the Google home page. There have been doodles to celebrate all kinds of events, including national holidays, birthdays of artists and scientists, sports competitions, scientific discoveries and even video games! Also, doodles have evolved from simple static images to complex applications, such as the interactive electric guitar used to celebrate the birthday of Les Paul.

Want your company logo to change for selected events or holidays, just like doodles? The Admin Settings API allows domain administrators to write scripts to programmatically change the logo of their Google Apps domain, and Google App Engine offers the ability to configure regularly scheduled tasks, so that those scripts can run automatically every day.

With these two pieces combined, it is pretty easy to implement a complete solution to change the domain logo on a daily basis (assuming the graphic designers have prepared a doodle for each day), as in the following screenshot:

 

Let’s start with a Python App Engine script called doodleapps.py:

import gdata.apps.adminsettings.service
from google.appengine.ext import webapp
from google.appengine.ext.webapp import util
from datetime import date

class DoodleHandler(webapp.RequestHandler):
  # list of available doodles
  DOODLES = {    
    '1-1': 'images/newyearsday.jpg',
    '2-14': 'images/valentinesday.jpg',
    '10-31': 'images/halloween.jpg',
    '12-25': 'images/christmas.jpg'
  }

  # returns the path to the doodle corresponding to the date
  # or None if no doodle is available
  def getHolidayDoodle(self, date):
    key = '%s-%s' % (date.month, date.day)
    if key not in self.DOODLES:
      return None

    return self.DOODLES[key]

  # handles HTTP requests by setting today’s doodle
  def get(self):
    doodle = self.getHolidayDoodle(date.today())
    self.response.out.write(doodle)

    if doodle:
      service = gdata.apps.adminsettings.service.AdminSettingsService()
      // replace domain, email and password with your credentials
      // or change the authorization mechanism to use OAuth
      service.domain = 'MYDOMAIN.COM'
      service.email = 'ADMIN@MYDOMAIN.COM'
      service.password = 'MYPASSWORD'
      service.source = 'DoodleApps'
      service.ProgrammaticLogin()

      # reads the doodle image and update the domain logo
      doodle_bytes = open(doodle, "rb").read()
      service.UpdateDomainLogo(doodle_bytes)

# webapp initialization
def main():
    application = webapp.WSGIApplication([('/', DoodleHandler)],
                                         debug=True)
    util.run_wsgi_app(application)

if __name__ == '__main__':
    main()

The script uses a set of predefined doodles which can be edited to match your list of images or replaced with more sophisticated logic, such as using the Google Calendar API to get the list of holidays in your country.

Every time the script is triggered by an incoming HTTP request, it will check whether a doodle for the date is available and, if there is one, update the domain logo using the Admin Settings API.

In order for this script to be deployed on App Engine, you need to to configure the application by defining a app.yaml file with the following content:

application: doodleapps
version: 1
runtime: python
api_version: 1

handlers:
- url: .*
  script: doodleapps.py

We want the script to run automatically every 24 hours, without the need for the administrator to send a request, so we also have to define another configuration file called cron.yaml:

cron:
- description: daily doodle update
  url: /
  schedule: every 24 hours

Once the application is deployed on App Engine, it will run the script on a daily basis and update the logo.

The new Search app for iPad from Google

 

Google launching a significant redesign for the Google Search app for iPad. Whether you’re doing research and comparing results, or exploring beautiful imagery, we have added new features to make the app more interactive, more visual and to help you find what you want more easily.
 

More interactive

You’ll notice that searching is faster and more interactive from your first keystroke. As soon as you begin to type, Google Instant starts to display results, so you don’t even need to press the search button.

Once you pick a web page to visit, you’ll see the page load on a new, slide-in pane that will layer over the search results. You can slide the pane to the right to get back to your search results, and even keep scrolling through the results as your web page is loading. This allows you to go back and forth from results to web pages quickly to get the information you are looking for.

View search results on the left and a web page on the right in the slide-in pane


More visual

Viewing image results in the app is now much more vivid. Tap on any image result to use the new image carousel, which lets beautiful images shine. You’ll see the image you selected expand, and you can easily swipe through the carousel to see other similar images.  

Swipe through the image carousel


Often you may be looking to find something you have seen before again or are continuing research on a topic. But on a tablet, typing can be a challenge. That is why we have created a visual way to explore your search history. Swipe right to view snapshots of pages you’ve visited, stacked and organized by search term. You can also manage your search history from this new view.

With this release, we also brought Instant Previews to the app so you can quickly compare web pages before you choose your result. Tapping on an icon in the top right of the screen brings you into a visual preview of the pages for your search result, easy to scroll through with the swipe of a finger.


Find easily

Finally, we added a few extra features that we hope will help you find what you want more easily.

After you’ve selected a result, a new tool helps you find exactly what you need within a web page. Tap the magnifying glass on the top right-hand corner to highlight the most relevant section of the page. You can recommend pages you like with the new +1 button, right next to the magnifying glass, and help others find relevant sites more easily as well.  

Helpful tools while you search


We’ve also made it easier to find and use your favorite Google services like Google News, Calendar and more in the new Apps menu. Tap on an icon to quickly read an email in Gmail, or share a post on Google+ within the slide-in pane. When you slide the pane to the right, you’ll be right back to searching.


Easily find more Google services


The app is available worldwide for iPads with iOS 4.0+. Download it in the App Store and start enjoying a faster and more interactive experience now.

Bing Maps: “The Hurricane Season”

 

The term ‘hurricane season’ recently brought new meaning to many communities across the U.S. East Coast in the wake of Hurricane Irene.  Being able to see the latest developments and impacted locations online through Bing Maps makes it possible to better anticipate, respond and recover from the destruction of hurricanes.

Around the world, people use Microsoft technology every day to stay in touch during difficult times. Today, we’re calling out a Bing Maps app launched by the Wall Street Journal that tracks hurricanes in the Atlantic Ocean. Tech geek or not, you have to admit this is a useful app, especially now during hurricane season. Let’s take a closer look.

 

The app is an interactive graphic that charts both current hurricanes as they are happening, and chronicles previous hurricanes dating back to 2005. So if you’ve always wanted to be a weatherman, you can bookmark the link and visit it often to see the latest weather patterns – hurricane season or not. The app is easy to use, so no meteorology degree is required.

To watch a current storm’s path, you can follow it from the moment your browser opens to the app. The storms strength is categorized on the right hand side of the screen so you can see the severity of the storm and the route it is predicted to take.  Here, we see an example of a storm pattern that started near the Bahamas as a tropical storm and as it grew stronger it became a Category 5 making its way up through the Gulf of Mexico. As it got closer to the Gulf Coast it became less intense, still remaining a Category 3 and then tapering off back to a tropical storm status.

 

To see a past hurricane, just click on one of the blue lines and it will take you to the storm’s history and the calendar at the top will move to the month it happened.

 

 

 

With Bing Maps, it’s easy to zoom in and out by scrolling your mouse so you can zoom in to see high-levels of detail or zoom out to see the past patterns of multiple hurricanes in the Atlantic.

 

 

For you self-proclaimed geeks, here’s more on how the app was built and all the things it can do:

Bing Maps’ partner, OnTerra built the hurricane tracker working closely with the Wall Street Journal team. It was created using the Bing Maps AJAX7 API, JQuery and JavaScript. It gets data from NOAA which is processed into JSON data files and refreshed every few hours, which includes the hurricane path, predicted path and the cone of uncertainty polygons. The application works great on modern web browsers including iPhone, iPAD, Android and Blackberry devices, unlike Flash and Silverlight applications. The HTML5 support in the AJAX7 API provides solid mobile device integration for interactive mapping apps like the Wall Street Journal Hurricane Tracker.