If you have a Windows Mobile 7 phone, and haven't tried out Microsoft Research's TouchDevelop app, you need to stop and go check it out as it's one of the neatest projects I've seen in years. It's a mobile scripting app released last summer that lets you quickly and easily write programs on the handset itself. It combines a custom scripting language, an on-phone development environment, a bunch of useful APIs (including all the hardware functions, as well as fun stuff like a physics engine), and a social script sharing site into an incredibly innovative new dev platform. Seriously, this stuff is as amazingly cool and cutting edge as it gets in mobile.
The project's team has been constantly upgrading TouchDevelop's capabilities since it launched, adding more APIs and tweaking the scripting language. And last Friday they released a packaged runtime so you can download the scripts you've written on the phone as a ready-made .xap file, which can then be uploaded directly to the Windows Phone Marketplace as a standalone app. How insanely cool is that? You can actually create good looking, incredibly useful mobile apps directly on the mobile itself. It's the beginning of a bootstrapping process which elevates mobile devices from peripherals towards being standalone systems in the same league as PCs. It's a revolution akin to HyperCard, the original Visual Basic, or the first Web Browser - it's that amazing.
Here's an app I wrote using TouchDevelop, which just got published to the Marketplace today: MinuteMatch. Here's a screen shot:
It's basically a match three game with a time limit and a leaderboard. It's not overly complex, but the point is that I wrote it entirely on a phone. Then I was able to download the packaged version and submit it as an app to the Marketplace, the same as if I had written it using a PC and Visual Studio. That's pretty astounding.
When the project launched last year, I was sort of in the right place at the right time last year to try it out. Nokia had decided to embrace Windows Mobile, which meant that I had gone out and gotten a new Samsung Focus to get more familiar with the OS. And, as a part of my job in Nokia Research Center's marketing group, I subscribe to a bunch of different research blogs, including Microsoft's, so I saw the project as soon as it was announced. I was immediately smitten with the idea of creating scripts on a handset and started creating a bunch of them. I was particularly excited about developing games, just to learn how to do them and ended up creating a bunch of different variations. Developing games became what I did on my phone during those random moments, rather than just simply playing them. How cool is that?
Here's some examples of the scripts I wrote and published last year:
MinuteMatch V1 - The first version of my match-three script using shapes.
SaveTheBubble - A simple 'one-touch' app which uses the integrated gravity physics and graphics.
BreakIt! Touch - A Breakout clone which used touch to play. I also wrote another version using a handset's tilt controls.
MegaPegs - A Peggle-style game where you watch the ball drop and bounce off pegs which disappear. I had to learn about vector physics to make this work like I wanted it to, but it was all supported in the APIs.
HundredBubbles - A simple game where you had to touch bubbles which slowly rose to the top of the screen.
SpringTest - This was just a simple script I wrote to test how the 'spring' object was supposed to work and it ended up being very soothing to play with - it uses the tilt controls to fling the balls around which then bounce and swing slowly back into place.
Wallpaper Maker - I wanted a background that was clean, yet colorful, so I created a random image maker into an app to scratch that itch.
The ease in which you can quickly write code with one finger using TouchDevelop is pretty surprising. This isn't like the various 'coding' apps on the iPhone or iPad I've seen, which are basically slightly enhanced text editors and an interpreter. By using their own scripting language, and controlling all the facets of the development environment, the researchers developing the app were able to reduce much of traditional coding down to choosing from various option buttons and menu lists.
Yeah, but how easy is it for someone who's not a developer in the first place? Well, last summer my son and I were on vacation and driving from Tahoe down to Yosemite along a 4 hour stretch of Nevada highway. We started to talk about computers and programming, and he wanted to learn how to do program. So I gave him my phone and talked him through, step by step, how to create some fun little scripts which covered the basics. While I was driving, my son created his first program ever using a mobile phone. Here's his script - a multiplication test. How awesome is that?
It's been my contention for a while that as mobile devices such as phones and tablets get more functionality, the need for power users to be able to script them will increase accordingly. TouchDevelop's easy-to-use environment shows how this could easily be implemented in a way that doesn't require anything but the device itself. Also, think about the fact that for many millions of people around the world, a handset will be their first experience with computers - this project shows how you don't need anything but the device itself for those people to develop their own custom apps.
Okay, time to stop raving. But seriously, as much as I criticize and am generally annoyed by Microsoft, they definitely are capable of doing some really amazing stuff, as their research org has plainly shown with this project. It's an absolutely fantastic bit of work, and as cool as it is now, you can see even more possibilities in the future. Definitely go get TouchDevelop if you have a WP7 phone around, or if you don't have one yet, this might be worth going to get one just to play with it (preferably a Nokia Lumia, of course, so I can keep getting a salary).