GFX::Monk Home

If you think RSS is dead, you're doing it wrong

People keep saying that RSS is dead at the hands of twitter and facebook, and I sincerely hope they’re wrong (or at least an insane minority). I find the following quite shocking, from an (obviously biased) review of flipboard:

Some might wonder why RSS isn’t used. That will be a limitation for some people, especially if you are trying to follow a blogger who doesn’t yet put their stuff into Twitter (naughty!) In reality, though, there is so much that IS on Twitter or Facebook that this limitation isn’t that big a deal. If you find some cool blog you can Tweet it and then it’ll show up in Flipboard anyway.

It’s amazing to think that people find twitter a better source of content than RSS, but at least all is not lost: readtwit gives you an RSS feed where whenever someone you follow posts a link, you get an RSS item with the content of the tweet, followed by the content of the page that was linked to.

Dealing with non-local control flow in deferred CoffeeScript

…a continuation (hah!) of defer: Taming asynchronous javascript with coffeescript.

In my last post, I outlined the ideas behind defer and its current state. One of the things I mentioned is that how to deal with return statements in asynchronous code is not yet decided. I'd like to explore a few of those ideas here. If you haven’t read the previous post, I suggest that you do.

defer: Taming asynchronous javascript with CoffeeScript

defer is something I've been working towards in various fashions for many months now. It’s a way of writing asynchronous javascript in a more straightforward and synchronous-looking way. My current approach has been to modify the CoffeeScript compiler to introduce a defer keyword. There is currently some debate on the issue (parts one and two have even more history) as to whether the functionality is necessary, useful or appropriate. Here, I hope to show the reasons behind the idea, why it does what it does, and how it helps programmers write more concise and readable code.

iPhone OS "multitasking"

So apparently iPhone OS 4 (or iOS, as it’s now awkwardly named), still has no way to sync data in the background. “Multitasking done right” indeed.

To be clear, that means that for every application that syncs data with the web, you must explicitly open it (and maybe tap some buttons) to initiate a sync. If you have a third-party mail client, an RSS reader, a todo list and instapaper, that’s quite a lot of tedium to go through every time you want to sync data. Heaven forbid you have more than a handful of apps that might need to talk to the internet without your explicit direction.

Get over your ego, Apple, and just copy android properly next time.

Scala on Android

As an addition to my last post, I'd like to point out a great resource for getting started with android programming in scala. This article gives you a nice template to go from, and a brief rundown of the sbt build tool you can use to build and deploy your scala-based android app. Good stuff!

Pagefeed Android App

After getting an android phone about a month ago, I finally got around to writing a workable pagefeed sync app. This app can handle share intents from any app (I use NewsRob mostly), and save that link to pagefeed on next sync.

It also downloads the links (not the content, this is a lightweight app) so you can delete links from the app and have them deleted from the webapp as well.

You can download the apk here (I haven’t signed up for the market yet). The source is also up on github.

Android as a platform

Overall, I found android frustrating to learn when dealing with some of the newer and less-documented parts (like SyncAdapters and how they interact with ContentProviders, for example), but overall I'm finding it to be a very well-designed system that is easy to write for.

For comparison (because I've written an iPhone app or two), this app could not exist on the iPhone because interaction with other apps (via intents) is crucial, as is background operation (which has only just arrived in OS4). It would also be a royal pain in the ass to obtain, store and validate user credentials – all of which android makes general and reusable (I am happily reusing the google-provided authenticators).

Oh yeah, and it’s written in scala! I seem to have an aversion to platform-specified languages, having used python for my biggest iPhone app. Of course, that meant that I had to void my warranty and only run on jailbroken iPhones. Android doesn’t care how you write your app, and that’s the way it should be.