A few years ago I wrote a post about creating a groovy client-side script to automatically send out post-commit emails for any projects in subversion. Now about 6 years later, I find myself at a new job and have the same need again because the subversion server here is not configured to send out post-commit emails either.

Company email servers are probably under close surveillances,  I don't want to accidentally trigger any security investigations in case it sends out a large number of emails in a short period of time. Therefore this time around I thought that I should find an alternative.

Instead of sending out emails for every changeset, I decided to just create a RSS feed containing the changesets so that I can read them as if I am reading other RSS new items in a RSS reader.

I modified my script to work as followed (modifications are in bold):

1. Check out the project you want to add the hook to, then for every 5 min, execute 'svn log -r BASE:HEAD' on that project to get a list of revisions and logs.

2.Parse these logs to get a set of revision numbers (and the author, date, etc). Then for each revision, execute 'svn diff -r $rev1:$rev2' for each adjacent revisions. For example, if the revisions were r182, r183, and r184, then the script needs to to a diff for r182:r183 and r183:r184. Create a RSS feed file, for each diff, add the diff as an entry in the feed.

3. After all the diffs are performed, execute 'svn up -r $lastrev' to bring your local copy to the latest revision that you had checked against (note: do not update it to HEAD because there might be commits during the time when the script is processing).

The generated RSS feed can then be loaded into a RSS feed reader/aggregator so that I can read them whenever I feel like reading the subversion activities. Most RSS feed readers won't read local files but I found one that will. It's called QuiteRSS . It also has all the functionalities that I need, including auto refresh, feed items aggregation and feed items management (mark item as read, delete item, etc).

To add a local RSS feed file to QuiteRSS, you need to add it using file: url scheme, i.e. "file:///C:\Users\abcuser\Desktop\geoGoogle_rss.xml"

With all of these things setup, I can again read every change made to a project of interest just like having post-commit emails. Here's what it looks like when the generated feed is loaded in QuiteRSS, it works just like getting the diffs in email.

Here's the full script for your viewing pleasure:

A few additional notes about this groovy script:

1. The script generates a {Project_Name}_rss.xml file in the same folder of the script.
2. The RSS feed format is a strip down version of RSS 2.0 format, this format seems to work well with QuiteRSS but it has not been tested with other RSS feed readers. Most RSS feed readers should be forgiving enough to be able to process the generated feed.

3. In the rare occasions that someone check in a large text files, the script can run out of memory processing large text checkins.


The team went to D&B for group outing. The next day Spiderman showed up in the office...


One of the main theme about the iphone UI is its 'springy' interface. You can find it everywhere from the home screen to pretty much all UI screens on iphone. The iphone home screen is called 'spring board', I am pretty sure the word 'spring' is referring how you can swipe the icons off screen and then they bounce back. Most scrollable screens on iphone have this spring effect that allows you to scroll the UI further than the bottom or top and then automatically bounces back.

Palm Pre, in addition to having multi-touch just like the iphone, also copies this spring UI pretty much exactly (download the SDK and try it yourself).

Andoird's UI, however, does not have this spring effect. Since the entire android platform is open sourced, I figured I can bring the same effect to android by modifying its source codes . As it turned out, it's not difficult to do at all. On android, there are actually some codes in view scrolling to limit the scrolling by the height and width of a view. So all I need to do was remove these restrictions and then add a little bit of logic to make the view scroll back when you scroll past the view bound.

Here's what it looks like on android with the same effect:

So Android is perfectly capable of having this spring UI effect and I am sure the developers of android know about this. I think they were really trying to avoid copying too much from the iphone (for whatever reasons). It's also interesting that HTC's new phone Hero , which has a modified android UI (that is developed by HTC) also copied this springy UI effect. I am pretty sure they did that by modifying the android source codes just like I did :-)


1. Round corners look better than sharp corners, round all corners
2. Background that are semi transparent looks better than opaque background, regardless how little the transparency is
3. Gradient, high light, shadow look good, add them to everything
4. Big text > small text, non-color (black, white, gray only) text > color text
5. Colorful icon = good, big and colorful icon = better
6. When in doubt, see Iphone


Good news! Now I can build some cool apps with these free servers.

it can make http/https requests, has cron jobs, and best of all, it's from google :-)



By Jay Liang


Lambda 4 JDT

By Jay Liang

LOL, so it comes down to this for closure in Java. Install this eclipse plugin then you can have the option to collapse inner classes code to closure style. It's not real closure, it's just ... well I don't know what it is. It's cool I guess. :-D