So much for the Semantic Web
As I have mentioned before, I’d like to use gravatars here but can’t because I don’t capture commenter’s email addresses. This is because there is no reason for you to give me an email address, and frankly I wish more sites didn’t demand one; an awful lot of weblog sites seem to make completing the email address compulsory, which I do not understand at all. I mean, why?
Anyway, I had this additional idea, which was: let’s use the Semantic Web! People do leave their URL. I can connect to that URL, find the FOAF autodiscovery tag, and thus find their FOAF file! So I tried that, over all the URLs on all the comments on kryogenix.org. Total number of FOAFs found: 18. Ha! One of which, interestingly, was a very complete indeed LiveJournal FOAF file; the LJ people seem to actually be getting into all these standards and stuff, probably without making a big deal of it in the LJ community itself, because they have such a massive collection of metadata. If the Semantic Web works then it’ll work on LJ first, I tell you.
Anyway, my original plan was to grab images out of the FOAF feed: there is a foaf:image tag and a foaf:depiction tag. Total number of FOAFs in my 18 that had these: 1 (one). Bah.
I did also think that I could grab the sha1sum of the email address, which is in everyone’s FOAF, and then convince the gravatars guy to not only serve up a gravatar when you have the md5 hash of an email address but also when you have the sha hash of an email address. Response to my email: 0 (zero). I was quite disappointed by that.
So, basically: so much for the Semantic Web in practice, at least so far. I shall wait a while before trying this sort of thing again.
For those of you thinking, “I have a linked URL, and a autodiscoverable FOAF file, and an image in that FOAF file; am I the one?” then the answer is no, unless you are Gary Fleming. You may be thinking: huh? Why was mine not included? The answer is: because tidy wouldn’t tidy your website into compliant XHTML properly, or the Python minidom parser wouldn’t parse that XHTML properly. Because I couldn’t be arsed to write a Python HTML parser, because I was doing this with an (increasingly complex) one-liner command, I grabbed the HTML at the URL you specified with a comment, threw it through tidy, threw that through
python -c "from xml.dom import minidom;import sys;d=minidom.parseString(sys.stdin.read());print [n.getAttribute('href') for n in d.getElementsByTagName('link') if n.getAttribute('title') == 'FOAF'][0]"
and so on. Not sure what the problem was, but by eyeballing it there weren’t that many it failed for. (Failed for my own site, ironically enough. Aquarion’s, too.) This is my fault for being lazy, rather than your fault for site coding or tidy’s fault or minidom’s fault, but it did give me an indication that this images-from-FOAF trick is not worth coding if it’s going to provide one image every three years.
As for ‘why emails?’ I ask for email addresses for the following reasons:
I don’t see a problem with taking email addresses, as long as they aren’t shown on the site.
Shame you didn’t hear back from the Gravatars guy though…
-6361 seconds later
Jon: I do entirely take your point on being able to communicate outside the bounds of your own website. In practice, I don’t find myself doing that that much, mainly because I find that the majority of the conversations I have that are prompted by things I’ve posted ought to take place in public, because they’d be useful for other people to read. The few times I’ve thought that this doesn’t apply haven’t happened often enough to warrant asking any and every commenter for their email address. I’m not keen on the general perception, in this age of spam, that you have to bang your email address in everywhere in order to get anything done. The americans complain that their Social Security number works like that; you have to give it to everyone all the time, so that it acts like an unofficial identity number; the US government can’t declare that it is an identifying number, though, because the right wing will freak out about that. I’m worried that, on the net, email address is going the same way. This is why I thought that the sha1sum-from-your-FOAF-file idea was a good one. I may mail him again.
-1801 seconds later
Instead of Gravatars, have you considered Favatars?
Favicons might not be as pretty, but it’s a simple hack making use of existing data (I’m using a tweaked version of Paul James’ function for my weblog).
11 hours later
Matt: I have considered them, but only since yesterday when I found out about them ;) I’ll be implementing them shortly.
20 hours later
Of course, unlike the SSN email addresses are many–to–one (well, SSNs are but in general they aren’t supposed to be…)
I tend to sign most of my blog comments with my @livejournal address, but that’s by far my only available address.
21 hours later
I don’t know whether to feel smug about doing things the “right” way finally paying off, or depressed that what should be such a simple thing doesn’t work in the vast majority of cases.
When my home computer finally decides that it wants to work again, I’m planning on doing gravatars that fall back on favatars, with some caching thrown in. Can’t beat a good caching strategy.
21 hours later
Gary: you are great. Is it cold up there in that ivory tower? :-)
23 hours later
I’ve tried, but I don’t understand any of this.
44 hours later
[...] And then I had a brainwave. LiveJournal is built on free software, and it’s released and available. And they do photo hosting. After a bit of looking around, I established that yes, indeed, they do, the code is open source, and so off I went to LJ. And now I have my photo gallery online. Well done, Brad and LiveJournal. I said before, a long time ago, that if the Semantic Web works then it’ll work on LJ first; looks like running a public profitable service without hiding your source away is working first there too. [...]
116 weeks later