Nelz's Blog

Mah blogginess

Project Begets Love for AppEngine and Python at Java's Expense

The Project

For the past year or two I’ve had an ongoing side project where I post to the Twitter account @bman_countdown. It started out as just a simple countdown, but I realized I could use it as an opportunity to provide more information about the event, so I started to tack on links to relevant content on the BurningMan.com website.

Over time I’ve increased the functionality from being a static set of links, to mixing in the most recent blog post from the Burning Blog. (Actually, this functionality just went live today.)

This has been a great ‘toy’ project that I use to experiment with different technologies.

The Environment

For the first couple of iterations it was a Ruby script that I ran off of my ‘media server’ (a Mac Mini which I had set up as recommended by MacMiniColo). To emulate cron functionality, I used launchd to run the script once a day.

Predictably, this setup caused some hiccups in the continuity of the service: when my ISP service went out; when my router borked; when the hard drive failed; when I moved; etc. (Yay for providing non-mission-critical projects!)

Around the time of the 2010 Burning Man event, Twitter removed the ability to use Basic Auth, which is what the library I used relied upon. I decided the service could take a break right after the event while I figured out what I was going to do with it.

I had done some minor playing with Google AppEngine in Java, so I was familiar with the basic services GAE provides. (I love AppEngine’s first-class cron support. And the TaskQueue concept ecourages truly asynchronous and scalable design.) But, since this project is what I use to experiment with stuff, I figured I’d try out Python.

Meeting Python

First, I had to get up to speed on Python itself. So, I got the book Programming in Python 3. I studied several chapters of this book and did a couple of the ‘programming assignments’ (which I thought was a great idea), until I felt I was familiar enough with the language to take a poke at upgrading the countdown.

I came to realize that the process of developing in Python is so easy! (Even more so in GAE, as the development server environment that you get is great, and shit just works: just save the changes to the file and you can hit the page, and you get instant feedback.)

I know I’m a latecomer and I am treading dangerously close to Programming Language War territory here, but I have to say that I am entirely fed up with the edit/build/deploy cycle that leaks time and energy in Java projects. Do you realize that in big Java shops, there are engineers whose entire function is to iterate on the build process? Remember that whole “Google App Engine in Maven + IntelliJ” blog post that I made? In Python, the build-cycle-via-build-tool process doesn’t exist. Imagine a future where you don’t need to wrestle through Maven’s bullshit to get stuff done. I can see this future in Python, and it gives me tingles in my naughty bits!

Sure, I’ve got rose-colored glasses on here. I am a native speaker of high-protocol Java (my kingdom for a native “?” operator!), who is currently a tourist in a strange land speaking a stilted pidgin version of Python. Admittedly, I have an incomplete grasp on what the costs and benefits are when moving from a compiled language to an interpreted one. But it sure seems easier so far.

Future of Java

I was originally pulling for the Java ecosystem, whether that comes from a selfish (it’s where my bread gets buttered) or a philanthropic (because I’ve seen so much good Open Source stuff come out of it) point of view, I’m not sure. I was happy when some very smart people talked about ways that at least the JVM could stay relevant by embracing more dynamic languages built on top of it.

But then there was last weeks announcement that Mac OS X would deprecate support for Java. This generated a lot of excellent discussion. My favorite post both described why this is a death knell for Java, while also outlining a strategy for ensuring Java could continue to function (by breaking up it’s fairly monolithic API into discrete modules).

Alas, because of a very specific interaction I had, I fear Chris Adamson’s cogent post will probably be ignored by Oracle. Back when the news came out that Oracle was buying Sun and therefore Java and MySQL, I spoke to a friend of mine who worked for Oracle. I told him I didn’t care if Oracle owned Java and MySQL as long as they didn’t fuck it up. His response: “Don’t worry. We’ll fuck it up.”

The mere fact that I heard this kind of pessimism coming from an employee within Oracle makes me think Java will be viewed more and more as a legacy system in the months and years to come.