Asynchronous Pair Programming at Scale
Introducing a new video series: Pivotal with Reto Meier
Watch along as I update an app from 2011 to use all the new APIs, tools, and best practices available in 2016 on my new video series — Pivotal.
Pivotal is a radical departure from the style of a lot of the video content I’ve been contributing on the Android Developers YouTube channel. It’s longer, less polished, and features a lot more code.
In Pivotal I’ll show my working
Most live-coding, training, codelabs, videos, and talks show code that’s been carefully pre-written and prepared. That’s very useful, but it’s so abstracted from the reality of sitting down and pounding out code that it can leave a gap.
In Pivotal you can watch me make mistakes (and debug them), talk through my decisions (and go back on them later), and develop an app architecture (then build something that often ignores it). I’ll get my code reviewed by other engineers, ask for advice, and even look stuff up on Stack Overflow.
No one wants to watch me stare silently at a blinking cursor for 10 minutes. I’ll edit it to cut out the really boring parts, and speed up the typing. Typically about 2hrs of coding compresses into about 15mins of footage.
By the end, you’ll not only have the best-practice implementation, but you’ll have heard why it should be done that way, and seen how the code evolves along the way.
It’s like pair programming. But more efficient. And at scale.
In 2011 I presented a session at Google I/O that covered best practices for building context-aware apps to offer the best user experience, and minimize battery drain.
The associated sample app targeted Honeycomb (Android 3.0) and supported Android platforms back to Cupcake (Android 1.6). At the time, that was 98% of active devices — today that same span represents less than 3.2%.
It’s only been five years, but literally every aspect of the app has been deprecated in favor of more robust patterns, tools, and APIs.
We’ve seen the introduction of the Android Support Library, the Fused Location Provider (including the new Geofencing API), Job Scheduler (and the GCM Network Manager), material design, enhanced Notifications, Android Wear, and all the features of Ice Cream Sandwich, Jellybean, Kit Kat, Lollipop, and Marshmallow.
I also developed the whole thing using the ADT Plugin in Eclipse — long since deprecated in favor of Android Studio. It’s even hosted on Google Project Hosting, which has also been deprecated now that everyone is over at GitHub.
Things will evolve and change as the coding gets underway
Having a perfectly preserved app whose Target API has just fallen off the sliding scale of relevancy offers a wonderful opportunity to refactor a codebase and replace a series of tricks, hacks, and deprecated APIs with more modern and robust architecture.
I imagine things will evolve and change as we get going, but here’s a look at some features and changes I plan to implement:
- Migrating from Eclipse to Android Studio and integrating with GitHub source control
- Using the Fused Location Provider
- Using the Geofencing API
- Using the Job Scheduler and GCM Network Manager
- Improving Notifications and adding support for Android Wear
- Using the Support Library and adding material design
You can follow along as I update the app using the Android Protips for Location open source project from GitHub.
I put together a prequel to see how it might work
In this “prequel” screencast about 2hrs of coding across two days is compressed into about 16mins. I show the entire process of building a simple location-based app.
Stay tuned for more episodes of Pivotal on the Android Developers channel on YouTube. I plan (hope!) to release a new episode every month — starting in a couple of weeks.