DK Ancora Imparo

Runner add-on

I just released a new update plus an add-on for Worqshop, an IDE for the iPad. The add-on allows users to execute small Python and Ruby scripts from the iPad. Is it allowed by Apple? Yes, because the execution doesn’t happen on the iPad itself but on the cloud.

I envisioned Worqshop to be an alternative development environment that can truly replace computers for software development. Well, it’s not there yet, but I’m taking small incremental steps towards it. One of the steps is to provide a runtime environment where users can execute their scripts from the iPad. And this functionality is provided by the new Runner add-on.

Price

The add-on is a 1-month non-renewing subscription for US $0.99. Some people might say: “Outrageous! It should come with the app for free!” I’m not making any profit from this and the server-side cloud costs money. I implemented the add-on as in-app purchase to prevent unauthorised users and jailbroken devices from accessing the Worqshop cloud. The price of US $0.99 is the lowest price tier allowed on the App Store for in-app purchase.

Light Table

I’ve watched Bret Victor’s presentation and Chris Granger’s video of the Light Table Playground. I really like the concept and, reflecting back, that’s how I learnt Python. When I’m stuck with a piece of code, I just open up a new Terminal window, run Python, and test the code there. The short feedback loop of executing and seeing the results helps me to understand the code better and allows me to build larger functions / programs. Another example, in the past when I used Eclipse and developed Eclipse plug-ins, one of the features that I liked was the Eclipse Scrapbook Page.

At the moment, the Runner add-on behaves like the Eclipse Scrapbook Page, i.e. run the script and display the output. There is no code introspection like the Light Table Playground. Nevertheless, I’ve experimented with Python introspection and I’m hopeful that I can implement it on the server-side code.

Implementation

The Runner user scripts are executed on Amazon EC2 instances. The instances themselves are managed by a couple of Google App Engine apps. When a user runs a script, it is sent to a particular EC2 instance, executed, and the output is sent back to the iPad. The script execution is limited to 15 seconds. Using GAE as the intermediary allows me to utilise other IaaS providers, just in case AWS goes down :-)

Alternatives

Some other alternatives on the App Store that allow you to run Python / Ruby code: Python for iOS and CodeToGo that utilises Ideone. I was thinking to use Ideone APIs, but not happy with the price. I managed to embed the Python interpreter on Worqshop but I removed it to avoid problems with the App Store team.

Quitting my job

I quit my job as a research fellow last year, a few weeks after I attended WWDC 2011. I liked my job, it was exciting. We were implementing a scalable debugger that can debug thousands of processes. But, being in the academic environment, the only way forward is to publish more papers and get more grants. Publish or perish, like they say. Secretly, I longed for my PhD years where I can get my hands dirty with code and build something real (something that can be used as opposed to something that can be read).

I’ve been a long time Hacker News lurker. It has news pretty much about bleeding-edge tech, APIs, web apps, frameworks, etc. And of course, startup success stories from a company that builds Amazon EC2 load balancer to a one-man-company that builds a profitable online bingo card creator. The tech is exciting and the stories are inspiring.

I think I want to build startups.

In December 2008, I decided to try something new, something fun that could distract me from my thesis writing. Writing iPhone apps. It was amazing! I had lots of fun! I still remember the feeling when I got the money from the Apple App Store in early 2009. It was small compared to my salary but the feeling was exhilarating: earning my own salary! Furthermore, hearing positive comments from people that used my apps gave me lots of joy.

Scratch that. I definitely want to build startups.

After several months of deliberation, I quit my job. I knew what I wanted to build and the RFS confirms it. I want to build a development environment for the iPad. I think tablet will be the future. Correct me if I’m wrong, but I’ve never seen a single laptop in any Star Trek episode that I watched. In addition, IMHO, I think I have enough experience in building tools for remote application development.

Last week, Apple approved my app. I’m really proud of it. For sure, it has bugs (I just submitted an update two days ago) but I can see the potential of it. Where people can develop apps just by using the iPad. Where students can learn programming just by using the iPad.

Getting the release out of the door is not the end, it’s just the beginning. The beginning of constant improvement and bug fixing. The beginning of a tool, that I hope, can be truly useful.

Note: I am really grateful for Tom Howard, Fenn Bailey, and Tim Bull. I met them last year during the Melbourne Mentor Live event and they have offered me a lot of advice and support. I can’t thank them enough.

Footnote: There were a lot of deliberation before I decided to quit my job. Hacker News is also filled with stories of failing startups. So, think through the whole thing first before making major decisions. Nevertheless, if you’re on the verge, just remember what Nike says: Just Do It!