If you have an Android, you have …

20 Mar, 2011 — Design & Usability, Google

Disclosure: I work at Google, but I’m unaffiliated with the Android team. This blog post reflects my own personal opinions, not my employer’s.

Better Apps

  • Native Gmail. Which means you can get Conversation View, colored labels, stars, search and spam reporting right from within the app. Apple’s draconian rules prevent any other email client from being accepted into the App Store.
  • Turn-by-turn Navigation. This has got to be the killer feature on Android. Using the in-built Google Maps app, pick a destination, and ask Android to navigate to it. Then keep doing other things such as checking email, or viewing Facebook — of course, only if you’re the passenger, not the driver. The app speaks directions as the car drives, and uses text-to-speech technology to speak names of streets and cities, so you don’t have to ever look at the phone — focus on the road. The iPhone’s Maps app is terrible in this regard.
  • Full Google Voice integration. Android allows any application to hook into its innards. So when you use the Google Voice app, it replaces the actual telephone dialer completely. The iPhone app is not permitted to integrate fully, so it does what it can as a second-class citizen on iOS. (If you’ve ever used Google Voice on the iPhone, check your call log: it’s littered with the behind-the-scenes numbers that Google Voice connects to, not your actual contacts’ phone numbers. There is nothing that the Google Voice app can do about this.)
  • Widgets on the home screen tell you important bits of information with a quick glance. I use the Pure Calendar widget to see my daily events without having to start up the calendar app. It’s there, it’s ready, and it’s opportunistically visible even when I didn’t pull out my phone to check my schedule.
  • Crop your photos before posting them. The default photos app lets you crop your photos before you post them via email or to Facebook.
  • Double-click to reflow text in the browser means that you no longer need to scroll horizontally to read articles formatted for larger screens. Double-clicking in a block of text doesn’t just zoom into it (like the iPhone also does), but it also reflows the text maintaining a minimum readable font size to fit within the horizontal dimensions available (which the iPhone does not do.) You have to experience this to see what I’m talking about.
  • You don’t have to wait for an app to update its data. Apps such as Twitter and Facebook can run in the background and update their data, so when you pull out your phone, they already have the latest tweets and status updates up on the screen. On the iPhone, these apps can fetch data only after they’re fired up, which means you must wait until they’re done fetching before you see the updates.
  • Sync photos from Twitter & Facebook Contacts. Just enable Contacts Syncing, and start seeing your contacts’ photos from their Twitter and Facebook profiles when you dial their phones.
  • Bluetooth-related apps can do amazing things! I use the Car Locator app which comes with a Bluetooth plugin; once you pair it with your car, it will auto-detect your car’s location the moment the Bluetooth connection is lost — i.e., as soon as you park and shut off the car. Apple does not allow apps to do things like this on iOS.
  • Barcodes scan quickly with live video capture. On Android, the barcode scanner app has full access to live video when you fire it up. This way, it can constantly refine its view and try to locate a barcode within the field of view. On the iPhone, you have to fire up the app, then 1) take a picture 2) crop it 3) click a button to acknowledge that this is indeed the picture you’d like to use 4) wait to see if the app recognizes a barcode 5) rinse, repeat until code is recognized. On Android, you keep waving the phone at the barcode for a few seconds until it recognizes the code. Zero button presses.
  • Switch out of Silent Mode automatically after a preset interval: I have missed several calls because I forgot to switch out of silent mode when leaving the office. Phone Silencer is an app that shows up when you put your phone in silent mode using the usual way (power button, or turn ringer all the way down), and asks if and when you’d like to revert to normal mode. You can pick a time and a volume setting, and the app makes sure you don’t miss a call (well, at least for this one reason.) iOS will not and cannot let apps do such a thing, because silent mode is controlled by a hardware button.

A True Post-PC Device

  • Contacts sync over the air. Because a true post-PC device does not require to be synced with a computer every time. On Android, I edit my contacts within Gmail on my desktop, and a few seconds later (yes, seconds; usually about 2 to 5), the contacts on my phone are updated automatically. And vice-versa.
  • Apps are installed over the air. With the new Android Market, if someone shares a link to an app while you’re using your computer, simply login and click to have the app sent to your phone. When you take your phone out of your pocket eventually, your shiny new app is there, waiting for you. No connecting to iTunes (or other desktop software) required.
  • Sync your photos online as soon as they are taken. You can have an app upload your photos to PicasaWeb as soon as they are taken, so you never have to connect your phone to a computer to get them off it. Lose the cable.
  • Full multi-tasking. If you click a link in your email app that opens the browser, clicking ‘back’ will take you back to your email app. If you click a link to a map from within the browser instead, then clicking ‘back’ twice will take you exactly where you expect it to.
  • You can skip carrying a laptop. Android lets you download, copy, move and send files by email. Any type. This means that you can actually skip carrying your laptop on trips, and have a device that will let you do all that you want with it. No artificial limitations. If someone sends you an archived file, you can open it, browse it, email it, move it into your Dropbox, …
  • Data is easy to get in and out. iTunes not required. If you’ve ever tried to copy music to your iPod/iPhone from a computer other than the one it’s synced with, you know what I’m talking about. I could never get a file out of an iPhone unless it was a photo. Android lets me move, copy, delete, do whatever with any file on the phone with a standard USB cable.
  • Not really about being a post-PC device, but: Charge your Kindle and Android phone with the same cable. Depending on the manufacturer of your Android phone, you might just be able to charge it with the same charger as the Kindle (Micro USB) so you need to carry one fewer charger while traveling.

User Interface Niceties

  • A consistent, global back button.. You know exactly how to get back to the previous screen in any application, and don’t have to rely on the developer of every single app putting a Back button in a consistent position. Ditto with the ‘menu’ button — it’s always where you expect it.
  • Instant previews of incoming notifications. It’s better than a cryptic numeric badge on top of an app icon. You don’t have to fire up an app to see the new email or text message you just received, or a notification when someone mentions you on Twitter. The pull-down notifications area scrolls a quick preview once, and after that, it is available to scan quickly.
  • You can tell if you’re typing in upper case or lower case, because the keyboard keys change accordingly.
  • Unlock your phone with a pattern instead of using a PIN. Of course, if you’d rather use a PIN, you have that choice too. You, as the user, are in complete control of your experience.

And finally …

  • Freedom. I cannot stress this enough. With Android, your phone is yours. It is not rented from a corporation who decides what you can and cannot install on it. If you don’t want to upload your app to Google’s Android Market, upload it to Amazon’s Android Market. Or put an .apk file on your server, and distribute it yourself. You don’t have to pay anybody 30% for the privilege of dictating to you what you are allowed to do with your phone.

HOWTO Use custom DNS redirects to save browser keystrokes

Given the recent interest in DNS and its role in the public infrastructure of the Internet, sparked by the release of Google Public DNS, here’s a hack that can help you save keystrokes in the browser while accessing your favorite sites. Instead of typing in “youtube.com” or “twitter.com”, you can just type “y” or “t”. If you’re looking for a map of San Francisco, CA, you can type “map/sf” and jump to the right place in Google Maps.

A bright bold blinking marquee disclaimer before we start: this is advanced territory. If you don’t know what sudo is and why 127.0.0.1 is special, be careful following these instructions because you may unintentionally destroy your ability to do anything at all on the Internet — including looking up instructions for getting unstuck. Also, these instructions only apply to Mac OS X and Linux, or other UNIX variants.

Redirect custom DNS hostnames to frequently-accessed sites

The file /etc/hosts on your machine is consulted by the DNS resolver before making a request to a DNS server. The idea is to add new DNS entries to the hosts file on your machine, pointing short domains such as g and t to 127.0.0.1. Now, whenever you type g or t into your browser, the hostname will be matched from your /etc/hosts file, instead of receiving an NXDOMAIN reply (i.e., this domain does not exist) from an upstream DNS provider. Since this request is received by your own machine, you can then handle it to do whatever you want, including, but not limited to, redirecting the user to the intended destination.

This HOWTO assumes that Apache is installed and running on your system with PHP and mod_rewrite support.

Modify /etc/hosts

Open /etc/hosts in your favorite text editor, and add one line for each shortcut you’d like to set up. Leave everything else unchanged. (You will need to sudo edit this file.)

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1 localhost
127.0.0.1 c # for Calendar
127.0.0.1 f # for Facebook
127.0.0.1 g # for Google Search
127.0.0.1 m # for Mail
127.0.0.1 map # for Maps
127.0.0.1 t # for Twitter
127.0.0.1 w # for Wikipedia
127.0.0.1 y # for Yelp
127.0.0.1 yo # for YouTube

255.255.255.255	broadcasthost
::1             localhost
fe80::1%lo0	localhost

You can test that this change worked, by typing in the address (e.g. http://g/ in your browser. Instead of seeing a page that says that your browser “can’t find the server ‘g’”, now you would see a page saying that your server isn’t configured correctly, or welcome to Apache, or whatever you would see if you typed http://localhost/ instead. If that worked, proceed.

Configure Apache to handle requests for unknown domains/URIs

Edit the following lines in /etc/apache2/httpd.conf. The following code shows an excerpt with lots of context around the line you need to edit. Locate the relevant section in your file.


#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/Library/WebServer/Documents">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    #
    Options +Indexes +FollowSymLinks +MultiViews

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride All # <-- Change this from None to All

    #
    # Controls who can get stuff from this server.
    #
    Order allow,deny
    Allow from all

</Directory>

Locate your Apache root directory. It’s usually /Library/WebServer/Documents on the Mac or /var/www in Ubuntu. If you’re unsure, check where it is by issuing the following command in a terminal: (assuming you’re running Apache 2.x)

grep “DocumentRoot” /etc/apache2/httpd.conf

In that directory, save the following file. It should be named exactly .htaccess. (That’s htaccess with a period at the beginning, so it’s a hidden file on UNIX.) Save it as /Library/WebServer/Documents/.htaccess on Mac OS X or /var/www/.htaccess on Ubuntu.

<IfModule mod_rewrite.c>

RewriteEngine on
RewriteBase /

RewriteCond    %{REQUEST_FILENAME} !-f
RewriteCond    %{REQUEST_FILENAME} !-d
RewriteRule    (.*) /index.php [L]

</IfModule>

The actual redirection script

Here’s the script that I use for redirection, but you can roll out your own, and do anything with each request you receive. (If you do something phenomenally awesome, I’d love to hear about it in your comments.) As you can see, it’s customized to the sites I frequent, including location preferences (e.g. the Yelp shortcut takes me to Yelp San Francisco directly. The search box is preconfigured for SF.)

Save this as /Library/WebServer/Documents/index.php (on Mac OS X) or as /var/www/index.php on Ubuntu.

<?php
  $uri = preg_replace('/^\//', '', $_SERVER['REQUEST_URI']);
  switch($_SERVER['SERVER_NAME']) {
    case 'c':
      redir('http://calendar.google.com/');
      break;
    case 'f':
      redir('http://facebook.com/');
      break;
    case 'g':
      redir('http://www.google.com/search?q=' . $uri);
      break;
    case 'm':
      redir('http://mail.google.com/');
      break;
    case 'map':
      redir('http://maps.google.com/?q=' . $uri);
      break;
    case 't':
      redir('http://twitter.com/');
      break;
    case 'w':
      if ('' === $uri) {
        redir('http://en.wikipedia.org/wiki/');
      } else {
        redir('http://en.wikipedia.org/wiki/Special:Search/' . $uri);
      }
      break;
    case 'y':
      if ('' === $uri) {
        redir('http://yelp.com/sf/');
      } else {
        redir('http://yelp.com/search?ns=1&find_loc=San%20Francisco,%20CA&find_desc=' . $uri);
      }
      break;
    case 'yo':
      if ('' === $uri) {
        redir('http://www.youtube.com/');
      } else {
        redir('http://www.youtube.com/results?search_query=' . $uri);
      }
      break;
  }

  function redir($url) {
    header('Location: ' . $url);
  }
?>

That’s it, now type your shortcuts into your browser instead of the longer URLs, and there you are. If you run into trouble, leave a comment and I’ll address it.

The only downside of this approach

Redirecting involves an additional HTTP request to your machine, which introduces additional latency. The request, however, is from your machine to your machine itself, so there’s no network involved. Personally, I feel that the keystrokes saved by the technique would have taken longer to type than the shortcuts I set via this method. But you don’t lose anything if you set this up and don’t use it — just continue to type entire URLs and you will never pay a latency penalty.

The query: Protocol

Update: I implemented this idea at http://queryprotocol.appspot.com. Comments, questions, and suggestions are welcome!

When trying to explain a concept to others over email, I often find myself linking to a search engine’s result pages for a specific query, instead of a single destination URL. These are non-navigational queries, and there is no single result that I expect to be the most important one. Instead, my intention is to provide the reader a variety of links on the topic such that s/he may draw her own conclusions, or solve their own problem — all they need is a nudge towards the right query term to use. If, over time, better search results are available for the same query, then future readers get the benefit of automatically updated results.

E.g. Q: Where can I find the latest numbers related to the spread of the Swine Flu?
A: Try [H1N1 update].

To do this today, I simply link to my favorite search engine, Google. But that does not seem fair to fans of other search engines: Bing, Yahoo!, Altavista, and others. I would prefer to use a notation that allows the reader to use their choice of search engine to obtain the results. Just as we specify our default browser and default email client, we should be able to pick our default search engine.

We have already solved the first two problems (picking default browsers and email clients) using protocol handlers in the operating system. When I pass around a link to a web page, starting with http://, I do not specify the browser it should open in. Your operating system determines that it’s a link to a hyper-text transfer protocol (HTTP) document, and invokes your default browser. Similarly, for emails, the mailto: protocol provides for an application-agnostic way to invoke the user’s default email client to send an email.

It is easy to see how a query: protocol could be implemented similarly. To point you to the search results for a particular term, I would send you the following link: (don’t click on it, it won’t work — at least as of this writing.)

[h1n1 update]

The URL that the above links to is query:h1n1+update. Note there’s no HTTP protocol marker specified. If the OS wanted, it could provide local results as well. This means that the protocol extends seamlessly to Desktop Search as well.

Syntactically, this validates as a URI. Just as the mailto: protocol handler defines standard parameter names, subject, cc, and bcc, similar parameters can be standardized for the query: protocol. These may include corpus restricts (corpus={web, images, desktop, ...}), pagination controls (start=0, num=10), or domain restricts (site=manas.tungare.name).

Implementation is simple: all operating systems and major browsers support external custom protocol handlers. They can be configured as follows:

Protocol Prefix: query
Application Name: /Path/to/Application

The application does not need to be very complicated. It’s a mere stub, which, depending upon the user’s preferred search engine, converts a URI of the form query:h1n1+update to http://google.com/search?q=h1n1+update or http://bing.com/search?q=h1n1+update and opens that link in the user’s default browser.

Eventually, if browsers understand the query: protocol, there is no need for the stub application, and users may be able to share and exchange queries and yet seek results using their favorite search engines.

(The opinions expressed in this blog post are solely my own, and may not reflect the opinions of my employer, Google.)

Personal Information Backup – Twitter, Gmail Contacts, Google Calendar, Reader

2 Jan, 2009 — Google, HOWTO

Make a New Year’s Resolution to start backing up your data regularly. Not just local files, but even data from the cloud. Here’s how to backup your data from a few of the most common online services. More importantly, I’ve also included instructions on how to restore from that backup.

Twitter

How to backup?

Copy this URL to a new browser window.

http://twitter.com/statuses/user_timeline/USERNAME.xml?count=10000

Then replace the string USERNAME with your actual Twitter username. Press enter to start downloading. If your browser does not prompt you with a file download box, but instead opens the file showing a bunch of text, choose File > Save As to save your backup to a secure location.

How to restore?

You cannot restore this data into Twitter (neither to your own account, nor to a different account.) But you will have access to your witticisms and interesting web links that you posted to amuse your friends. Do with it as you please.

Gmail Messages

How to backup?

Use an IMAP client such as Mail.app on the Mac, or Thunderbird on any platform. Make sure it’s configured to download and cache every email and every attachment.

How to restore?

You can access your messages from these programs even if Gmail is down. If you need to transfer messages to another account, add that new account in the same program as a new IMAP account, then drag-and-drop messages from your old account to your new account to transfer them there.

Gmail Contacts

How to backup?

Login to your Gmail / Google Apps email account, then open the Contact Manager. Click on the Export button in the top-right corner. For maximum compatibility with other applications, choose the third option for data format, vCard format. (It’s a standard format for contact information exchange.)

How to restore?

The vCard format is fairly standard. Gmail itself can read back the same file without trouble. To import into Mac OS X Address Book, simple double-click the .vcf file and let the import proceed. Microsoft Outlook also supports importing addresses from vCard files.

Import Contacts into Gmail Contact Manager

Google Calendar

How to backup?

Google Calendar publishes feeds of your calendar in the iCal format. If you save this feed to a file, you can use it as a backup. On the left side of your main calendar, there is a list labeled “My Calendars”. For each calendar that you want to backup, click on the little downward-pointing arrow next to the calendar name, and select “Calendar Settings”.

My Calendars > Calendar Settings

On the Settings page, under Calendar Details, locate the section labeled “Private Address”. Click on the button labeled ICAL and copy the URL there. Open a new browser window and paste the URL there. This will start downloading a file; save it to a safe location — this is your calendar backup. Lather, rinse, repeat for each calendar you want to backup.

Calendar Details > Private URL > ICAL

How to restore?

The iCalendar format (also abbreviated as iCal or .ics) is a standard calendar format. You can import the backed up calendar file into Google Calendar, Apple iCal or Microsoft Outlook simply by opening it.

Google Reader

How to backup?

Login to Google Reader, then come back here and click on this link: Export Google Reader subscriptions as OPML. Save the file that your browser will prompt you to download. This is your backup.

How to restore?

Google Reader and lots of other feed readers know how to import OPML files. In case of Google Reader, go to Settings > Import/Export to import it back. For desktop software, try looking for an “Import from OPML” menu item somewhere.

Need instructions for more services? Write a comment and I’ll try to provide them.

Email should have Expiration Dates

The entire idea behind this blog post has been summed up in the title, so all I need to do now is to explain why I think email should have expiration dates, and how that would make personal information management better.

Email, as we all know, started off as a way of sending short messages to colleagues within a department. It has since evolved into a monster of a tool that does everything it was never designed to do. The paradox is that it is exactly the kinds of messages that email was designed to handle that cause me the most trouble these days.

  1. I often receive email from my friends about meeting up for lunch. This is important, but only for that particular day (and that too, if I receive it before lunch time).
  2. My research collaborators send me email when a paper submission deadline is near, with the draft attached to it. Those emails are not nearly as important after the deadline.
  3. My friends and I exchange travel plans over email, but is it as useful after the trip is done?

These are the kinds of messages I’m talking about: important but time-sensitive. Then there are others which are not really important, but simply one-time notifications that I can take action on and then forget (“bill is due in 2 days”, “X added you as a friend”, “your order was received”, “your package has shipped”, “free donuts in break room”, “we are not meeting today”, etc.)

Why do they linger on in my mailbox for years? They become indistinguishable from the really important email that I need to save for years, such as some very interesting and intelligent discussions I have had with others. Note that I’m not including spam in this discussion, because in my opinion, there are adequate spam-filtering tools circa 2008 that perform well enough for most users for the most part with an acceptable false positive rate. Not perfect, but acceptable.

The Keeping Problem

Email is no longer ephemeral — people hold on to their email for years. This is what results in the Keeping Problem in Personal Information Management: there is so much of information coming at us that we don’t want to spend the time to decide what to keep and what to trash, so we end up keeping all of it. We hope we never have to do spring cleaning, and instead rely on search to find what we want.

Filing is not the answer

Many people file and tag their email, but the question is, is the cost of doing so (time as well as attention) worth the payoff at the end? Consider the two alternatives: spending 10 minutes each day filing your email, versus spending an hour a month looking for that one email. Pretty soon, the second alternative starts looking better while swimming in a sea of email with no signs of abating.

Same needle, bigger haystack

The bigger the haystack grows, the harder it is to find the needle. The solution is to reduce the size of the haystack. Automatically. Most other solutions empower the user to filter, sort, file, tag and do other sorts of things to their email that do not scale very well. That’s where Email Expiration Dates come into play. For it to work, they need to be (1) defined and (2) honored.

Defining an Email Expiration Tag

Email expiration tags can be defined in several ways by several entities that handle the email message at some point of time in transit.

  1. By the sender of that email who cares about the recipients;
  2. By the email client (MUA) used by the sender, automatically inferring from certain common-sense words; e.g. subject contains lunch and body is less than 100 bytes;
  3. By the email server software that intelligently tags email based on common patterns seen across multiple users;
  4. By the recipient’s email client, based on heuristics;
  5. By the recipient’s email client, based on a user-defined rule set;
  6. Or explicitly by the recipient in a spring cleaning session.

Honoring an Email Expiration Tag : Fully standards-compliant

RFC 822 allows custom tags (Sec. 4.7.5). These are commonly referred to as X- headers, since the specification requires that all such tags be prefixed with “X-”. Many applications built on email make use of such tags: mailing lists use the X-List-* headers to specify the list name, subscribe URL and unsubscribe URL in a mail message. Spam filtering software such as SpamAssassin assigns a score to each email, saved as an X- header. Mail clients are free to interpret these tags as they see fit.

An expired email will not be automatically deleted if the user does not want it to be. This is important for archival purposes and to satisfy the stringent reporting requirements of the Sarbanes-Oxley Act. But now the user can make a one-button choice about whether or not expired emails be deleted, archived, moved away or kept around.

With help from legitimate bulk email senders (not spammers)

Bulk mail such as Facebook notifications could have expiration dates set to “one week after receipt”. Bill reminders could set the expiration date to be “2 days past deadline” (and then send another notification if payment is not received by then.) Donut announcements could expire at the end of the day. Talk announcements could expire at the end of the talk.

Fixing the post-vacation blues

Returning from a vacation is no longer refreshing, as we are thinking about the sheer volume of email we need to process once we get home. If I was on vacation when the donuts were on the table, I should not be bothered about it when I return. Go away! If it’s an invitation to a talk that happened while I was away, I don’t need to hear about it now.

What will it take for adoption?

Defining a standard is no use if it isn’t used. The best way for such a solution to be adopted is for a major email provider implement it themselves, perhaps in a limited beta? On the interface side, this requires two additions: one for sending, one for processing received messages. The widget at the sender’s end is simply a calendar picker, or a drop-down with relative dates (“tomorrow”, “next week”, etc.) At the receiving end, it’s a three-way radio button that lets users “Delete”, “Archive” or “Leave alone” expired messages.

Till then, it’s back to manual spring cleaning. Oh well.

Acknowledgments: I have had several stimulating discussions with my advisor, Manuel Pérez-Quiñones, and my colleague, Pardha Pyla, about our respective email filing strategies, (that mostly began as venting sessions). This idea no doubt borrows from my analysis and conclusions based on some of those conversations.

Next Page »