Thursday, December 25, 2014

Single Finger Programming

Yesterday I was charged with helping my grandson (he’s three months old) get to sleep for a nap. After walking around and speaking softly to him for a while I got him to sleep. On my chest. Now of course I didn’t want to take a chance on him waking up or of getting assigned another task so I didn’t put him down anywhere. I sat quietly on a rocker making sure he was comfortable like any good grandfather would do. After a while though my mind started to wonder to my current programming task. I’m writing a Breakout style game in TouchDevelop

image

Since it is being written in TouchDevelop it will run on anything with a web browser and I have been developing it mostly on my laptop. But you don’t hold a laptop on a lap already occupied with a sleeping grandson. So I took out my phone. I can run TouchDevelop on any smart phone with a good web browser but there is also an app for TouchDevelop that runs on my Windows Phone so I opened that and started in.

It turns out that in some ways it feels easier and more natural to program TouchDevelop using a touch screen on a phone than using a mouse on a laptop. I made great progress trying out some new (to me) features of the language and completely changed (for the better) some aspects of my program.

TouchDevelop is more than just a touch optimized IDE though. The library of commands makes a lot of things, especially related to game creation, pretty easy. Sprites, obstacles, boundaries and more are all clearly defined and easy to implement. And gravity too! There are also methods for handling things like swipes and taps. I can’t imagine getting as much done in this game so easily and quickly in traditional languages.

There is an advantage to domain specific languages. One may give up something in the way of general purpose programming but in return one gets a lot of advantages in the specific domain.  But giving how much we are moving to devices that are in  the domain of what TouchDevelop is made for I think I may be using it more in the future.

No comments: