Category Archives: Uncategorized

RDFites respond

A few responses to my Legacy RDF post.

Firstly:

What this suggests to me is that in the world of open-source software, a world where everything is free, it’s not necessarily the technology that is most important: instead, the community is key.

http://boakes.org/feel-the-community#more-446

I agree with this to some extent. However, there is not doubt that the RDF community is strong and full of very smart people. I think that the RDF community == the MIT/Stanford style of design. That isn't a bad thing, but I think history is repeating itself.

Secondly:

Next time you see someone questioning RDF (once you’re sure they know what they’re talking about ;-), just look and see if they assume that fans of RDF don’t know about XML and other markup, relational databases, worse-is-better arguments and so on. Most of the people I know that are using RDF are doing so because it's a better fit to the task, generally after they've considered the alternatives. That's better as in better, not worse.

Danny Ayers

I have some doubts with this one. I was on the mailing list when RSS 1.0 was defined. Making that RDF was a mistake.

Finally:

If I was coming to RDF new, I'd be reading this stuff and going “oh, well, even if RDF's great, I'll never be able to get any support from the community, they sound like real nutcases. I'd better use OPML instead.”

Phil Wilson

Oh dear.. I don't want to get into the whole W3C vs DaveLab thing ;)

Legacy RDF

I get to chat a bit with Ben Adida who, having been left with my legacy of using RDF for Creative Commons found himself chair of the RDF-in-HTML task force (quite possibly the worst job in the W3C — I should ask him how he did it sometime) and, now discovering that overnight a major competitor (Microformats, pushed by Technorati) has arisen, is trying to get them to convert. I've been friends with the Technorati guys and I take their position, telling Ben that it's a hopeless endeavor. Ben is a little shocked at this — I was the one who got him on the RDF train after all — and pushes back. And eventually he manages to convince me that it wouldn't require hardly any additional work from the Microformats guys to be RDF A-compatible.

Aaron Swartz

I'm currently working on a metadata related project, and I find RDF the most annoying thing to work with. Every time anyone dares to question RDF the RDFites assume they don't know how it works. That's why it is good to see former RDF proponents like Aaron beginning to realize that perhaps the worse-is-better argument applies in the XML formats vs RDF field as well as in most other areas.

Tim Bray removing AdSense

It is interesting that Tim Bray is getting rid of AdSense essentially for the same reasons that I complained about earlier.

He says:

I’m not surprised the revenue is low, the ads are lame and uninteresting, I wouldn’t click on ’em either.

which is exactly how I feel. It seems many people are annoyed at the “blogging” ads appearing on their blogs: perhaps Google could allow publishes to specify their own stop-word to avoid being targetted by those ads.

Anyway, my own targetting software is working as well as AdSense now. For instance, on my Computer Science Gansta Rap entry I'm getting ads for books about LL Cool J and Run DMC. On the other hand my ROME sightings entry is generating links to every book and DVD about Rome (the place, not the Java library). I'm not sure how I'd fix that one..

CS gangsta rap

From Wired:

Tupac and Biggie, move over. A new hip-hop feud is brewing that glamorizes not guns and 'hos but Java and secure encryption algorithms.

It's a good article, but only the lyrics can express the true genius of MC Plus+

DES is wrong if you listen to NIS
Double DES ain't no better man, that got Dis'ed
Twofish for AES, that was Schneier's wish
Like a shot from the key
Rijndael made the swish
But Blowfish is still the fastest in the land
And Bruce used the same to ECB and I'll crack your ciper text
Try CFB mode to keep everyone perplexed

From Alice and Bob

UPDATE: The CS Gangsta rap feud is in full swing:

Yo, MC Plus Plus, my rhymes are so phat,
I'm PSPACE-complete but I'll reduce you to 3-SAT.
My crew is so hard that we roll in NP,
And bitches dereference my pointer for free.
..
..

My flow is so intense that I will overflow your buffer,
Corrupt your stack pointer makin' all your data suffer.
I've got saturated edges but your flow is sparser,
Real gangstas sip on Yacc; instead you generate a parser.
While you're busy poppin' stacks I'll pop a cap in your skull,
While you smoke your crack pipe I'm gonna pipe you to /dev/null.
I may not have a label but I rap like a star;
I'm an unsigned long int and you're an 8-bit char.

Monzy's So Much Drama in the PhD

Targeted advertising

I've been using Google AdSense on my blog for quite a while now, and have generally been pretty
happy (hey – who'd complain about money for free?). Recently however, I've been somewhat disappointed with the targetting of the ads that have been showing.

Naturally, I came up with the great idea that I could do better myself. A bit of hacking later, and now I have targetted Amazon ads running
on my website. It isn't quite as easy as it looks (maybe all those Google PhDs actually do something), but I think I'm getting roughly comparable
results – although I'm limited by the performance of the Amazon search index (which isn't wonderful).

Some of the more intersting pages are:

Needless to say there are plenty of reasons for these results (not least the fact that Google has a much bigger inventory than just using Amazon can supply).
Anyway, I'm fairly pleased with the results. Now all I need is for millions of people to decide to buy books through those links…

AJAX: problems solved

It turns out that DWR already has a solution to my asynchronous problems with AJAX:

DWREngine.setOrdered(true);

Turns out there is some really useful stuff in the Script Engine documentation; for instance you can set pre call and post call hooks to “wish to grey out certain components to prevent them being used again until the call returns”.

I'm actually using an older version of DWR that doesn't seem to support this – time to updgrade I guess.

More on AJAX problems

Ben & Dion picked up my problems with the “A” in AJAX, and got some good comments. I especially like the closure idea.

Another thing I found useful (since I'm locking the UI) is the following:

document.getElementById('tree').style.cursor = 'wait';
....
....
document.getElementById('tree').style.cursor = 'auto';

That sets the cursor the the hourglass cursor, and then back to the normal cursor (works on Firefox & IE).

AJAX: Best practice for Asynchronous Javascript

I've been doing some AJAX work (a large tree viewer) using the wonderful DWR.

One thing I see missing from most of the discussions about AJAX is implicit in its name: the calls are Asynchronous. This introduces
the potential for some very nasty bugs when the state of the view is different to the state when the remote method was called.
If (as is typically the case), the data returned from the call is used to modify the view all kinds of unusual problems ensure.

(Here comes my “doh!” confession…)

In my case, I was tracking the “current node” of my tree view in a javascript variable, set when the user clicked on it. The same
onClick handler then made a call via DWR to the server to get data, and the function that was called when the data is returned added
the data as tree nodes under the current node.

In 99% of cases this worked fine, until I suddenly discovered nodes appearing under the
wrong parent. What had happened was that the server was under more load, there were more nodes in one particular branch and the data was taking
longer to return than before. That gave me a chance to click on a different node (changing the currentNode variable), and when the data
was returned it was added under the new currentNode.

Now (of course) that bug seems obvious, but I've never seen much discussion of this previously, so I suspect I'm not the only one who
has been bitten by it.

There are two solutions I know to this problem:

  1. Lock the view. This means having a flag variable that makes sure only one call is in progress at any time. It has the
    advantage of being very easy to code and debug, but the disadvantage of restricting the number of things that occur at once.
  2. Pass the view state to the remote method and return it along with the data. This means the the function that processes the
    returned data can reconstruct the correct view state when the data is available. This has the advantage of allowing multiple interactions
    to occur at the same time on the same screen, but makes coding much more difficult (for instance, is it always appropriate to reconstruct
    the old view state when the user has chosen to do something else?)

In my case I just locked the view. That appears to have worked well, but I am tempted by the potential of the alternative method. I'd really like
to see some kind of toolkit support for this kind of thing.

Agro the Aggregator: now with added Goodness (Google Maps and Findory)

Agro the Aggregator now includes information from Findory, and it will display relevant satellite pictures
for a limited number of cities thanks to Google's new Maps API.

The Findory supports works in a similar way to the previous Yahoo news support (extract keywords and pass them
to the Findory API), but the Google API is somewhat different.

Currently it's quite limited: it scans through a list of known city names, and then allows the user
to display the satellite pictures from the first one found (even if other locations are also mentioned in the item).

For instance, this post will be aggregated via the JavaBlogs
and PlanetApache aggregator views, and will
(hopefully) allow you to see a photo of Aberdeen, despite support for the following cities:

  • Aberdeen
  • Adelaide
  • Albuquerque
  • Algiers
  • Amarillo
  • Amsterdam
  • Anchorage
  • Ankara
  • Asuncion
  • Athens
  • Atlanta
  • Auckland
  • Austin
  • Baghdad
  • Gaza
  • London
  • Madrid
  • Moscow
  • Seattle
  • Washington

Generally speaking, looking at the BBC Feed will should find you something that talks about one of these cities.

It's still Firefox only, though!

Another nice project would be to reverse the UI on this: Display a map of the world, with the location sensitive headlines displayed at the
correct location. I'm sure fame (if not fortune) awaits the first to implement that one…