Monday, July 30, 2012

Making Apps Indistinguishable from Magic

"Any sufficiently advanced technology is indistinguishable from magic."
– Arthur C. Clarke
Imagine yourself from 1990 transported to the present, and being handed a smartphone

Had you handed 12 year-old me a Galaxy Nexus and a Nexus 7, and I'd have assumed they were props from ST:TNG. Show Asphalt 6: Adrenaline to a kid who's been obsessively playing Test Drive II on his 33Mhz 386, and watch him shit his pants.

When I was 12 years-old, it was 1990. I was running a BBS out of my parents living room and the World Wide Web didn't exist, but I downloaded shareware from local BBSs and browsed USENet with my brand-new 14.4kbit/s modem.

I'd seen a mobile phone, but the first SMS message wouldn't be sent for another 2 years.

Today we all have handheld devices that operate by voice and touch, that let you take pictures, record video, watch movies, and play songs. If that would have been vaguely comprehensible to a 12 year old in 1990, throw in a quick demo of Shazam or an international video Hangout.

You're not building apps for a portable handheld computer with a cell radio-based Internet connection. You're developing apps for a magic box

When you watch a good movie you don't think about how it was made. It's only when something breaks the illusion: an actor glancing at the camera, a piece of the set falling over, or a boom mic dropping into frame, that you're reminded that you're not looking through a magic window, but at actors on a set.

As developers, our goal should be to provide an app experience so immersive, that 12 year-old me never loses the feeling of wonder while playing with the magic box from the future.

Hide the connection

Make it seem as though all the information your app provides is somehow magically stored within the device itself.

You don't stop to think how you're online until you need to wait for a download to complete or when a connection fails. Aggressively prefetch and queue-and-send messages when you're next connected.

It's your responsibility to ensure that network speeds and intermittent connectivity don't leak in to the user experience.

Hide the Internet

The Internet Protocol provides best effort delivery over a service characterized as unreliable. That means downloads will fail, connections will be dropped, and errors will be received.

Your users don't need to know or understand what this means or why it happens; implement silent retries with exponential back-offs to handle data transfer problems without interrupting your users, and display error messages only when they're actionable.

Hide your user interface

We learn through positive and negative reinforcement, so when you guess wrong Venkman gives you a shock, and you're that much more hesitant to guess the next time.

The best interface is the one you don't notice, where the very first thing you try does exactly what you want it to do, and any accidental actions that prove destructive are easily reversed.

Help your users establish and build trust with your app.

Hide the battery

Magic devices run forever without being plugged in. You can't stop the battery from draining all by yourself, but you can do your part to ensure it lasts as long as possible.

Hide the device

A good app includes a combination of dynamic layouts flexible enough to support any screen size. A great app considers how its core functionality is best served given the screen and hardware on which it's running.

That probably includes a series of different layouts, but might also require an entirely different user experience when the underlying hardware is radically different from a standard smartphone. A magic app seems as though it's designed specifically for whatever platform you're running it on.

Hide your app

A magic box provides a series of useful actions and functions: sending a message, looking at a map, or recognizing music.

To keep the magic alive your app should should be designed to serve a particular function, one that's obvious as soon as the app loads. Similarly, it should be available whenever you need it (even if you didn't realize you needed it), and should be accesible by clicking an intuitive icon, a widget, or a notification.

An alternative title

Sometimes you don't know what point you're trying to make until long after you've finished making it. Such was the case for me this year upon reflecting on my Google I/O 20212 session, "Making Good Apps Great", which - as it turns out - I should have titled: "Making Apps Work Like Magic."

Monday, July 09, 2012

Making Good Apps Great: The What and the How

Once again the 1,300-seat main Android session room at Google I/O was consistently jam-packed, with attendees sitting on the floor and lining up to get in. As such, it was a real thrill to deliver my sequel to last years Android Protips presentation -- Android Protips 2: Electric Boogaloo.

It's now on YouTube for your viewing pleasure.

If you want a closer look at the slides, I've created this gallery, which features speaker notes as the captions.

If downloading is more your thing, they're also available for downloading as a PDF.

The code snippets are posted at Making Good Apps Great: The Code Snippets for your copy/paste pleasure.

Presenting Without a Computer

Like last year, I presented without a computer -- instead using a Asus Transformer Prime paired with a Nexus 7. One app, running on two tablets, connected via Bluetooth.

The Transformer Prime was wired up with HDMI-out and a USB-connected clicker that let me transition between slides.

The Bluetooth-connected Nexus 7 showed me my "Speaker View": My speaker notes, the current / next slide preview, my pre-written live tweets, and a countdown timer.

Whenever the Transformer Prime transitioned slides, it transmitted the current slide to the Nexus 7.

The slides themselves I created using Powerpoint, using the "Export as a series of pictures" option. Except the animations which were custom created by Pandamusk, as detailed here.

The app just steps through each of the images / animations in sequence.

Can I Get the App? Can I See the Source?

Yes and yes. I need to make a few improvements before I open source it.

Really? Because you said that last year and…

Yes. Sorry! The code took a little more tidying than I expected. I'll try and be a little more... prompt, this year.