Michael has been beavering away working on ajaxpatterns.org for a while now, and it’s nice to see all the work paying off for him. The book is still in progress, but you can follow along (and even contribute) on the ajaxpatterns.org wiki. I look forward to reading the finished book!
I’m kinda surprised M1K3¥ hasn’t blogged this. A couple of weeks ago there was a preview screening of serenity in Melbourne.
serenity movie poster
Serenity can be viewed as a standalone movie, but is based on the TV series Firefly, by Joss Whedon (of Buffy & Angel fame). Unfortunately Firefly was cancelled mid-season (after being partially aired out of order!), but the whole season is available on DVD.
To keep this vaguely on-topic, one of the interesting aspects in Firefly/Serenity is the mixture of English & Chinese. This is largely illustrated by the use of Chinese to replace swearing, but it is indicated that in the Firefly universe (set in the year 2517) English/Chinese bilinguality is the norm.
No spoilers here, but I will say I enjoyed the movie a lot (more than most movies I’ve seen this year).
Serenity is out in Australia on September 30. Go see it!
Michael has an explanation of how the itunes sale counter works using AJAX. This reminded me of the storage space count on the gmail page (if you have an account on gmail you may not see the dynamic counter unless you logout).
I won’t give a full walkthrough, as I’ve only spent about 30 seconds looking at the code. But the gmail counter is a bit simpler than the apple version, probably due to the fact that google completely control the rate of growth. This allows them to rely only on static data served with the page (they’ve scheduled/estimated the amount of storage that will be available at some times in the future), and then they simply use linear interpolation based on the current time.
For example, my page was served with the static data defining the [time, capacity] pairs:
For the curious, these entries correspond to the start of June, July and August respectively. I expect as it approaches August, they will start serving pages with an entry for September.
The update code simply finds the relevant entry in the CP array, and then interpolates based on the current time.
This is a good illustration how precomputation can avoid trips to the server.
Although, since it doesn’t use a roundtrip, I guess it doesn’t count as AJAX at all…
A few months ago I started using bloglines to aggregate RSS feeds.
The result?
‘136 unread articles in bloglines’
81 feeds, and 136 articles I’ve kept unread because I haven’t had a chance to read yet! I’ve noticed that I now spend about an hour a day just reading the new entries, and despite a concerted effort to try to clear the backlog, I’m getting further behind.
Tinyapps has a post (complete with some nice screenshots) discussing the use of jBrowse, which augments a web page with “furigana” (Kanji with the hiragana reading above it). While it’s a great idea, it’s a plugin that is only available for Internet Explorer (firefox and safari are both superior).
rikai.com is a great alternative that uses javascript to augment a site, displaying the readings and meanings of Kanji (including compounds, and some katakana words) when you mouse over the page. Just enter the URL into the box near the top of the page, and hit Go.
For example, given the following text:
2年前から日本語をべんきょうしています。
私の日本語はまだ下手ですががんばています!
(For the last 2 years I’ve been studying Japanese.
My Japanese is still poor, but I’m sticking with it!)
You can also enter Japanese text directly into the box for a translation.
If you enter a URL, make sure it is the only thing in the box, otherwise it will be interpreted as text (see above point).
This includes empty lines (i.e. don’t put in the link and press <Enter>)
The augmented page has some advertising at the top
It doesn’t seem to work when the URL contains japanese.
For example, my blog entry こんにちは! doesn’t work.