This is as days pass by, by Stuart Langridge

Lugradio Eight

And now LugRadio Season 2 Episode 8, What is it good for?, is available from lugradio.org! It’s a really good one, although we didn’t have Mr Revell with us this time; we interview Jeff Waugh about Gnome and what’s going on in Neighbours, we talk about the National Lottery’s blind Firefox-blocking policy (although they don’t block Netscape 7, and they’re the same thing!), and lots more. Go and grab it, listen, laugh, and post about it on your own weblogs if you like it, which we think you will.

-----

More on favatars, and the urlparse module

Bit more detail on how I implemented the favatars stuff, perhaps. The template that defines how a comment is output looks like this:

<div id="au$cmt_time" class="onecomment">
<img class="favatar" alt=""
src="http://www.kryogenix.org/favatars/$cmt_link">
<h4>$cmt_author_and_link</h4>
$cmt_description
[<a href="#au$cmt_time">#</a>]
</div>
The key bit in there is the <img class="favatar" alt="" src="http://www.kryogenix.org/favatars/$cmt_link">. http://www.kryogenix.org/favatars/*SOMETHING* goes to a Python CGI. You call it with a full URL, so http://www.kryogenix.org/favatars/http://simon.incutio.com/ will display either the favicon from Simon’s site or my “no icon” icon. This is made very easy by Python’s excellent urlparse module. You see, we need to get the favicon from the root of the server. To do this, just use urlparse.urljoin to join whatever URL you like with “/favicon.ico“. The key thing there is the / at the beginning. Watch:

>>> import urlparse
>>> urlparse.urljoin('http://www.kryogenix.org/','/favicon.ico')
'http://www.kryogenix.org/favicon.ico'
>>> urlparse.urljoin('http://www.kryogenix.org/days/','/favicon.ico')
'http://www.kryogenix.org/favicon.ico'
>>> urlparse.urljoin('http://www.kryogenix.org/days/something','/favicon.ico')
'http://www.kryogenix.org/favicon.ico'
>>> urlparse.urljoin('something that is not a URL','/favicon.ico')
'/favicon.ico'
>>> urlparse.urljoin('','/favicon.ico')
'/favicon.ico'
So, if you join the URL the punter left with “/favicon.ico“, then you get the URL for favicon.ico at the root of their domain. If they fill in something that isn’t a proper URL, like an email address, a mailto: with email address, blankness, or some bullshit, then you just get back “/favicon.ico“. The script checks, and, if the joined URL is “/favicon.ico“, it shows the “no icon” icon. If it isn’t, then it fetches the URL, transforms it to a 40×40 PNG, and streams that PNG for display. All nice and easy, thanks to the Python urlparse, urllib, StringIO, and Image libraries. The code also caches icons so that it works faster. You can read the code for favatar.cgi if you would like more details; it won’t work directly for you without some tweaking. You’ll also want a line similar to this in your .htaccess file:
RewriteRule   ^favatars/(.*)            /pyblosxom/favatar.cgi?url=$1

Favatars

OK, favatars implemented, pretty much. I’ve blown them up to 40×40; not sure if this is a good idea, and I’ll remove it if I need to. But now you all get little icons next to your comment if you leave a URL, and that URL has a favicon. The “no icon” icon needs to be a lot better, but I’m in a rush right now. The whole damned site needs a redesign, I think. Nice simple little Python CGI, though. I love Python, in case you hadn’t realised.
Update: how the magic was done.

Staring down the barrel

It’s my birthday. Ha haa!
Those of you who have enjoyed the guessing games from previous years (2003 2004) may have a bit more difficulty this year; I can’t find anything interesting to say about my age this year. It’s not a cube, it’s not perfect, it’s not a third power. Even the Wikipaedia struggles before coming up with such lame attempts as it being the atomic number of copper and the number of bones in the skull, although it is prime (and apparently a primorial and Sophie Germain and half a twin prime as well). In fact, I would almost go so far as to say that it is the first number without any interesting properties, except that (and those of you who know some maths will already know this bit) that being the lowest dull number is in itself an interesting property, and therefore it is an interesting number after all! Interesting solely in its dullness. I know a couple of people like that.
Anyway, this new release of Stuart Langridge Esq does leave me staring down the barrel of middle age; the next milestone on my personal road to death has the number “30” carved on it. Ouch. I’ll be thirty! And have a sports car, which means that people will accuse me of having a midlife crisis. Not the Faith No More song, either. Nevertheless, it is my birthday. Had a very entertaining meal last night with Jono and Sooz, cut short when Niamh was sick (which was not nice). I hope she feels better today; everyone has been ill recently. Mr Bacon himself has been struck the worst, actually getting bronchitis, but Sam’s been off work for a week, I was off for two days, Sooz is starting to get it now as well; what hideous disease is it that is ripping through my family and friends? Maybe someone at work gave it to me. Anyone want to offer me a different job? Drop me a mail :)
It is nice to have a birthday, though. I’m going shopping for clothes, because I don’t have enough. More news on that as it happens.

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.

LugRadio recordings

Jono has been waxing lyrical about LugRadio’s popularity (warning: linked page contains beard), saying “It never ceases to amaze me just how far our little show is spreading. I am also pleased that now we are over a year down the line, each episode is still as simple to do as when we started. I was a little concerned that it may get a little stale and we may feel the pressure to keep the quality of the show up. Luckily this isn’t the case. We just show up and have a laugh. :)”
He is not wrong. It’s absolutely great, sometimes, when someone says “I discovered LugRadio the other day and thought it was really funny“. We’re slowly insituting a policy of reading out on the show some of the emails that get sent to us (email address is “show” at the LR domain lugradio.org), and they’re fascinating. Listeners from Long Island, Beijing, France, all over the place. I’m really looking forward to meeting (hopefully) some of these people at LugRadio Live, which will be the greatest event in human history. Really. On a par with that meteor that killed the dinosaurs.
The recording of episode 8, which happened on Wednesday, was fantastic. Really enjoyed it. It’ll be out on Monday, and you should all get listening. If you haven’t listened before, why not?

New hackergotchi again

Once again I’ve updated my hackergotchi head: I’m never going to be satisfied. Bah. Wish I was more photogenic.
Stuart Langridge

-----

Bloglines meme

After Andy Todd we present: the Bloglines meme. Go to Bloglines. Find your own blog. (If it’s not there you can sign up and add it. If you don’t have a blog this one’s not for you.) Click related feeds. Post the top 5 (or more) on your blog.

  1. kottke.org

  2. Boing Boing

  3. Aaron Swartz: The Weblog

  4. Slashdot:

  5. kuro5hin.org

  6. Jon’s Radio

  7. Google Weblog

  8. Scripting News

  9. BitWorking

  10. Google Blog – Live

  11. Wired News

  12. Thinking About Computing

  13. Scobleizer: Microsoft Geek Blogger

  14. SimpleBits

  15. Ned Batchelder’s blog

  16. Clay Shirky’s Essays

  17. Ben Hammersley’s Dangerous Precedent

  18. Surfin’ Safari

  19. mozillaZine

  20. Anil Dash

  21. Blogzilla – a weblog about Mozilla

  22. World Wide Web Consortium

  23. Photo Matt

Incidentally, the following little bit of Python will create that list for you:
print '<ol><li>'+'</li>\n<li>'.join(re.findall(r'<h2.*>(<a href=".*?">.*</a>)</h2>',s))+'</li></ol>'
if you cut-and-paste the text of the page and stick it in the Python variable “s“.

More random stuff

Ah, my earlier random links post went through all the tabs I had open in Firefox, but didn’t go through all the “keep new” stuff in Bloglines. (These should be unified. Fuck knows how, though.) Anyway, more linkdump:

  • A Javascript port of MarkDown (via Michael Moncur). I’m thinking about going to MarkDown rather than Textile for writing my posts, which you don’t care about, and I’m also thinking of going to MarkDown for comments rather than Textile too, which you might.
  • The blogosphere as a tuple space. Interesting.
  • A new BitTorrent search engine, TowerSeek (via Gary Fleming). Good if you like that kind of thing (especially since loads of others shut down). I’ve had mixed results with it so far, but it’s pretty good.
  • Ade talks about XML resumes and whether they’re a good idea. This sort of thing is always good, but no-one ever takes them on. Recruitment people normally won’t even look at a CV unless it’s in MS Word format. Them picking out metadata automatically would make people’s lives a lot easier, but it falls into the category of “Semantic Web pipedreams” as far as I can tell.

Buffyology

Buffyology (via Sarabian):
1. The study of “Buffy the Vampire Slayer”
2. Knowledge of, or information concerning, “Buffy the Vampire Slayer”
3. Website containing such data.

Cool. Cooooooool. Searchable database, too. That’s most cool. I have at least one reader who will like this :)

Photography

After a good eighteen months of thinking about it and pissing and moaning about the lack of it and starting and discarding plans, I have a photo gallery. Yay!
Uploading to it is ridiculously easy: I just right-click an image in Nautilus (or highlight a bunch of images and right-click) and say Scripts | Upload to Web Gallery.
I am missing one essential component, which is the editing bit; I need to write myself an administration interface, which will let me add metadata to an image, rotate images, and that sort of thing. But I have one! Superb!
The rather nice camera icon that the left-hand navigation uses is from gphoto.
Some kind of useful writeup must be done on how it all works, but for now I’ll settle for saying that all the photos are sitting in my pyblosxom installation: the gallery is just another weblog. Just say no to databases!
The other cool thing is the thumbnailer, which autothumbnails images when called appropriately; look at some image URLs in the gallery. Don’t deliberately piss about with it too much, if you please, or I’ll have to lock it down ot only rendering certain resolutions. It’s really handy, though, because if I decide that the thumbnails on gallery pages should be bgger or smaller, I don’t have to re-render a load of thumbnails. Very handy. And it wasn’t my idea; it was Simon Willison’s idea, which I immediately stole. Thank god for the Python Imaging Library, eh?
I shall get on with uploading all the photos on my camera to it at some point. But now I have it! Woo!

Nautilus

I like Nautilus, the Gnome file manager. Having said this, I’m trying to not refer to it as “Nautilus“; I’d like the fact that it’s an application to disappear. Like the Mac, I’d like it to just be that my desktop shows folders. Not “my desktop starts Nautilus to show the contents of a folder“. The Nautilus window is the folder. It’s all spatial, see?
Anyway, a gripe and a wish about this non-existent application.
The gripe is: Ctrl+T is bound to “Send to Trash“. This is an unbelieveably shit idea, because Ctrl+T is “New Tab” in Firefox. So, if you hit Ctrl-T when you think that your Firefox window is focused, but instead a folder has the focus, then whatever is selected gets deleted. This is the World’s Worst Idea. One of the things you’re supposed to do when implementing new stuff is look at the failure modes; what if it goes wrong? Now, this is, of course, not the Nautilus people’s fault, and neither is it the Firefox people’s fault. It’s just unfortunate. What is not unfortunate, though, is that there is no way to change that Nautilus keybinding. I’m not asking for keys to be arbitrarily rebindable: this is not KDE we’re talking about. But I can’t make it go away, and today I deleted two folders by mistake because of it. Fortunately, I could fish them back out of the Trash. Unfortunately, the Trash is crap; the Windows Recycle Bin is a lot, lot better, because things in the Recycle Bin know where they came from and can be put back there with a mouse click. The Trash is just another folder somewhere, as far as I can tell. And if you delete something by mistake, because it was highlighted, you don’t know what it was that you deleted. It’s only because I know the folder that was showing well that I could pull out of my head what the thing I’d deleted was. This is bad, and I do not know how to fix it.
Update: it seems to be removed in later versions of Nautilus. It went away in version 1.647.4.3, as can be seen from the diff (search for “accelerator =” to find the line that disappears), even though, rather bizarrely, the changelog doesn’t really say anything about it. Anyway, looks like it’ll be gone in 2.10, which I’ll get when hoary gets stable.
The wish is: can we have TortoiseSVN for Gnome, please please please? It’d be really handy. The “nautilus-python”: bindings should make it pretty easy to handle this—Nautius already supports WebDAV, after all—but they seem to be pretty new and untried and (more importantly) not packaged for Ubuntu, more’s the pity. People are using them for cool stuff like displaying Creative Commons licences that apply to particular files and I want some of that customise-my-folders action. Especially if I can make folders know that they are Subversion working copies.

Whistle and flute

Last night Jono, Sooz, Sam, and I went to see Chas and Dave live. It was fucking brilliant. Brilliant, I tell you. Even if both Jono and Sam were unwell and we had to leave pretty early on. Now I just have to work out how to get the pictures off my phone.

-----

While I was away

Feeling better now, thank Christ. Lots of things happened over the last few days, and I’ve picked up a few seful web bits. Some will get a proper treatment, but first a linkdump; haven’t done one of these in a while.

  • Zed is a launch pad for independent creative expression that uses TV and the Web to seek out and broadcast the best new short films, videos, animation, visual art, performance and music in Canada and around the world.
  • Bruce Perens has written The Emerging Economic Paradigm of Open Source (via Simon Willison). Long and a bit ponderous, but interesting.
  • Open Source Radio. A bloke who does a regular spot on technology seeing whether the collaborative process can help him build a spot on open source.
  • Ed Felten and Matt Haughey are discussing why TiVo aren’t innovating. Heughey’s points are that “lawsuits are killing innovation“, and that “anything that helps customers enjoy TV, movies, or music is a target for lawsuits“, and he’s totally right. “The content company dinosaurs are so wed to their antiquated business models that they’ll send off their legal department to attack at the slightest provocation (this includes imagined potential profit losses).” This is a shit state of affairs. ReplayTV tried to innovate in the TV-playing space and were sued back to the fucking Stone Age by executives incapable of broadening their market in case they lose their white-knuckled grip on it. Arseholes all.
  • Free vector mapping for London! Well, sorta, says NTK. Only London, but if the principle works then perhaps it could be broadened. Links to the ill-fated openstreetmap too, which was mentioned on LugRadio and hasn’t gone anywhere since either.
  • F-Spot has been mentioned in these pages before. It seems to have got a bit cooler. Still not using it, because it’s a Mono application. Yes, this is prejudice on my part. Tough luck.
  • Sam Buchanan talks like the LugRadio team after he listens to LR. Hahahahaha! The day of the LugRadio begins.
  • First Crack podcast. Is that, like, the first crack of dawn? Or is this like beaujolais nouveau but for cocaine addicts? “Le crack premiere est arrive“, as the latest shipment arrives from some hillside lab in Medellin?

More coming up.

Transmetropolitan

I’ve just finished reading Transmetropolitan. It’s pretty cool. I’d never actually read any of it before, although I was aware of who Spider Jerusalem was in a sort of light way (mainly that he looked like James Grant over at Flem Comics. What surprised me the most was that he actually is a journalist; that’s his point. As I say, I knew roughly about it before, including his profession, but I thought that that was just background: I didn’t appreciate that the whole deal is that he is. Even given the whole gonzo-journalism-but-turned-up-to-eleven vibe. Pretty cool, in the sort of way that rabbits freeze in headlights and people watch in brain-loop horror as their children fall off a wall; your thoughts lock solid and all you can do is watch in captivated fascination. There has to be an explanation for that. Everyone says afterwards, “I should have done something. I don’t know why I didn’t!” And the reason you didn’t is: you didn’t think of it. There was no thought in your mind about stopping the thing, just of watching it. Must be why TV is so successful, as a watered-down version of the same reflex. Anyway, that’s what reading Transmet was like. Sorta.
Has left me with the urge to go and shoot some stuff and do some writing, though. Not necessarily in that order. See, I don’t think this is a world where you can just wander around the place punching the shit out of people and occasionally shooting them. Spider can do that and you can’t, not because he’s cooler but because his world lets you. Then again, Nick Kent probably could have done it, too. Different world.
On the third hand, it’s a lot easier to deal with Spider Jerusalem when you’ve met him in real life.
On Call Bald as Spider Jerusalem

CSS signatures on every site

Remember the CSS signature idea? That was a good idea, that. The theory is: everyone puts a unique identifier, like the domain name, as the id on the body tag of their HTML. So, here, it would be
<body id="www-kryogenix.org">
(replace dots with dashes) Then people can adjust my CSS to their own preference using user stylesheets and an appropriate CSS selector. Don’t like my link colours? Change ‘em! Just say:
#www-kryogenix-org a { color: red; }
in your user stylesheet and then this site will have red links. Neat idea. However, unsurprisingly, it does rather rely on the whole world picking up the idea, and it did, unsurprisingly, not happen. Now, of course, in our Brave New World, and with this being the Year Of The DOM and all, we have GreaseMonkey to run scripts for us which can be attached to certain sites. These should be doing DOM manipulation things, and indeed they can do. Some of them aren’t, though: the list of GreaseMonkey User Scripts has an awful lot that say things like “remove sidebar from CNN” and “remove this offensive thing from that site” and so on. This is what CSS signatures were for…but no-one uses them. So, combine the two. Have a GreaseMonkey script that adds a CSS signature to every site you visit, and then adjust things in your user stylesheet. That oughta work.

Remember me

My comments pages now remember who you are, and when they remember they take away the author and URL boxes and just say “you are [whoever]“, with a “Forget me” button. I have completely ripped this idea off from Ronaldo because it’s fabulous. Nice one Ronaldo.

Nofollow

OK, now, I know you’ve all seen the rel=“nofollow” thing that Google and others are doing. I also know that you’re all unsure whether to use it or not because you haven’t heard the Word of Stuart on this new development. I’m sorry if you’ve been panickedly refreshing the front page waiting for me to pronounce the truth, but I’ve been ill. Anyway. There have been many comments on the feature, not least of which the amazing stream-of-consciousness thing from Phil which probably covers everything you need to know somewhere in its vast, unexplored, Stygian depths. Lots of people don’t like it, for all the same reasons that I don’t like it: it can only hurt the web. Spammers don’t give a shit about it, and everyne who blindly implements it removes a valuable source of linking information. People who don’t blindly implement it will be “approving” a comment to remove its nofollows, and if you’re going to do that then you might as well just leave it and “approve” a comment to put the links in at all. Pants, I say. Anyway, I shall not be implementing it; it’s nice to see that people can co-operate, but this is not something fo which there is any kind of magic bullet fix, even if everyone likes the bullet. Mark Pilgrim’s explained that in the past. The serpent is now in the Garden of Eden. All we can do is be diligent. If it’s hard for you to remove comment spam, get a better weblogging system…

Top 5 Web Applications of 2004

Been meaning to do this for a while, after Andy Budd did it.

  • Gmail. Like Andy, I think it’s cool. It’s just nice, and easy to set up accounts, and now that Google have opened up POP access and so on it’s much easier to get at your data. Plus: full-on web application with client-side scripting, although I don’t think that anyone would hold it up as an example of how we should be doing this sort of thing.
  • Gravatars. I can’t use them here, because I don’t want your email addresses. I’ve mailed the guy asking for the ability to pass an SHA of the email address, so I can mine addresses from your FOAF files, but no response. It’s just a cool idea, though. Lots of little bits, all fitting together.
  • Bloglines. Fantastic. Switched to it, never looked back. I’ve mailed them a suggestion or two over time and they’ve responded cleanly and well. The weight seems to be hanging a bit heavy on them sometimes, though: too many subscribers?
  • Flickr. I like the idea. I’m not using them myself, nor do I intend to, but they’re doing online photo management the )right way_ (modulo their use of Flash in a few places where I think that they could get away with DOM scripting). Good work, fellas!
  • del.icio.us. I bounce back and forth in my head between using them for my short-n-curly links and not doing so. I think I will, though; it’s just so clean. API, REST stuff, it’s just so obvous in retrospect, which is said about all the great inventions.
-----

normal service will be resumed as soon as possible


Not well. More when I manage to throw off this horrible illness that I was kindly given by my Typhoid Mary daughter.

A man who gets it

Andy, who is a friend and comrade and not incidentally the other half of the Men With Big Stones , has started a weblog where he intends to talk about things which interest him, which include football, Linux, geopolitics, and HR. The Linux stuff should be interesting; this is a bloke who wanted a computer to do all the standard computer things (surf the web, read email, write documents, rip CDs, plug in devices) and so I gave him Ubuntu, and he’s had nothing but success with it. He is a bright shining light shedding the illumination of truth on my fervent contention that ordinary people can use Linux just as successfully as they use Windows, and like it just as much. However, that’s not what I’m going to talk about today. Today I’m going to talk about HR.
Andy’s a pretty big wheel in HR for a large bank, which I’m not going to name. Over Christmas we talked about reward and recognition for people in IT, and since I go along with Joel Spolsky on this I said that recognition schemes were no good, give them new laptops and 19” flatscreens instead, all that sort of thing. And he was convinced. This is great. He’s an HR guy who gets it. Whether he’ll be able to implement this stuff remains to be seen, but he’s been writing about his attempts to tell people that IT reward is not about certificates with your name on. More! More!

-----

Python and XML

Lots of noise about Python’s vast plethora of XML libraries from Nelson and responses from Uche. I still think it’s too complicated. Way too complicated. What I want to do is this:

>>> import xmllib
>>> xmldoc = xmllib.open("filename.xml")
>>> print xmldoc.xpath("//node1/node2")
[<DOM Element: node2 at 0x3457>, <DOM Element: node2 at 0x090532>]
>>> print xmldoc.dom.getElementsByTagName("node2")
[<DOM Element: node2 at 0x3457>, <DOM Element: node2 at 0x090532>]
That’d do me. In fact, I think I might write it.

Satellite navigation using the internet

I had this thought. Do any of the “driving directions” places, like the AA or MSN MapPoint or Multimap allow you to input GPS waypoints? Alternatively, is there anything on the net which translates GPS waypoints into postcodes? If there is, then if you can pipe a net connection into your car somehow (GPRS is the obvious solution here) then you’ve got satellite navigation, because you just keep fishing your current location out of GPS and then query the site for how to get to where you’re going.
Of course, it’d cost a fortune in connectivity bills, and you’d be better off just buying a real satnav system for four hundred quid or so, but that’s not the point.

Some pleasant wordgame, perhaps

Here’s a little game for you to play. It’s simple, but heavy on the psychology: this is a game to play with somone you know very well, or you’ll be rubbish at it.
It’s for two people, Alice and Bob. Alice thinks of a category and an item, and tells Bob the category. Bob then, as fast as he can, names the first three things that come into his head in the category, in true word-association Mallett’s Mallet stylee. The game is for the item that Alice thinks of to be the third thing that Bob says. If it is, Alice gets a point; if it isn’t, she doesn’t. Then Bob thinks of a category and an item, etc. Alternate goes from then on; winner is first to ten, or stop when you get bored.

Strategy, rules, and tactics


You can’t pick things with an “inherent order“. “Integers” isn’t a good category, because pretty much everyone will say “1, 2, 3“.
The guesser needs to be on their honour to really say the first three things they think of; if they think hard about it and try and deliberately think of “different” things then it spoils the game.
It’s surprisingly difficult! If you really know the person well, then you can score points with categories like “Cars“, or “People we know“, or something like that. What you’re aiming for, in order for the game to be fun, is a category where you can guess the third item that the other person will say, but a category where other people would not say that thing third. If you pick something where pretty much everyone would say the same three things then you’re not really entering into the spirit of it (and you’d also probably lose on the “inherent order” rule).

Gnome 2.10

Davyd Madeley gives us a sneak peek at Gnome 2.10. I want all this stuff! Where’s Ubuntu Hoary?
those of you about to say “upgrade to hoary now!” can sod off until it’s ready…

LugRadio returns from the Christmas break

We’ve just recorded the latest LugRadio episode, due out on Monday, and one of the things we talked about was Apple’s new products. To that end, I cannot—cannot—do better than to point you at jwz’s Announcing the Apple iProduct.

SubscribeMe

Aquarion is getting on with stuff again, which is cool. Specifically, he talked this morning about how to solve the ‘subscribe to this feed in my choice of aggregator’ issue (which Dave Winer and Jeremy Zawodny have been discussing at length), and has this afternoon actually built his solution: SubscribeMe. It’s simple; just change your explicit RSS links on your page to point to SubscribeMe instead, and it works for everyone. (See the HOWTO for more detailed instructions, although not a lot more detailed, because SubscribeMe is specifically written to be “the simplest thing that could possibly work“).
Anyway, I’ve updated kryogenix.org (and even added a more obvious “subscribe to as days pass by” link on the front page) to use SubscribeMe, so now people who want to subscribe to my RSS feed will find it even easier. Nice one, Aquarion.

Browsing Subversion repositories with Gnome

I was just looking at Shtoom (the (brilliantly named) Python (yes, Python!) voice-over-IP client), and to get it, you need to check it out of Subversion. At work, I use TortoiseSVN in Windows Explorer to do Subversion stuff, but here all I needed was to get the files. So, off to Network in Nautilus: Connect to Server: pick WebDAV: add the server name (divmod.org) and the path (/svn/Shtoom/trunk/shtoom) and connect. That was it. How easy is that?

Trackback in Vellum

Neil Blakey-Milner, who has heroically continued with Vellum usage even after I was forced to abandon the project through time shortage, has just added Trackback to Vellum as a plugin. I’d love to hand Vellum off to someone for them to maintain it and give it a bit of TLC: a couple of people have asked about taking it over, and I’ve always replied that I’m happy for them to do so and will happily link to their new site, but then I never hear from them again. If you’re interested in taking over Vellum development, just drop me a line.

-----

Zoomed page designs

Over at A List Apart, Joe Clark has published Big, Stark, & Chunky , a new article which deals with delivering web designs to low-vision users. By contrast to the canonical “blind user with a screen reader” test case to whom we’ve become accustomed (and rather smug that are catered for without too much work by our all-CSS-no-tables designs with a “skip navigation” link), low-vision users need a radical change to a site design. And this is a design, too. Flatten multi-column sites into a single column. Allow text zooming, but ensure that your design is still great when the text is large, larger than you’d think of zooming it, but that it doesn’t require a 50” plasma screen to display the design properly at high text zoom levels. Make sure there are plenty of headings, and plenty of bold. This is no small challenge. Clark suggests making one of the styles your site offers (either through the built-in style switcher in Mozilla et al. or a JavaScript style switcher or similar) a “low vision” style. Actually doing the design is beyond me; for that, you want to talk to Jon Hicks or Andy Budd or Jeremy Keith or Dave Shea. But I was thinking about how we can offer this kind of thing automatically. Joe’s proposal is the most pure: offer a new “zoomed” media type, so that adding a new low-vision style to your website is as simple as adding to your stylesheet:
@media zoomed {
  ... add your low-vision declarations here
}
but the W3C’s CSS Working Group have rejected all such suggestions thus far. I suggest, then, that the best approach might be to use something like the Greasemonkey tool in Mozilla and add a simple user script that adds class=“lowvision” to all tags in your browser. Low-vision users can then install this simple user script (alternatively, it might be encapsulated in its own “lowvision” extension for Firefox), and all those designers out there can instead style their pages for low-vision users with declarations a la:
body.lowvision div.whatever {
  ...style declarations for this div...
}

... etc ...


This does rely somewhat on being able to get the word out to low-vision users that installing the extension is a good idea, and then we hit the typical chicken-and-egg problem: people won’t install the extension until sites use it, but sites won’t code for it until users have it. Nonetheless, making it easy for site designers to build in low-vision extensions or alternative styles which don’t affect the main style, and giving low-vision users the concept of browsing around a “low-vision optimised Web” without having to do anything sounds like a laudable goal.

-----

I got a 3270, got to make the caps alright

So, there I was in Carphone Warehouse. I’d decided to spend some money, and the thing I was spending the money on was the rather cool SonyEricsson HCB-300 Bluetooth car kit. It’s the mutt’s nuts, I tell you. Get into my car and it’s working; I can make calls and receive them without ever touching the phone. Coolness.
Well, it will be the case: it’s not being fitted until the 19th of February. Christ. However, over the course of the day, I went into Carphone Warehouse three times: once to see if they did BT carkits, once to see how much effort it would be to install it in my car, and once again to pay (or, more accurately, to have Sam put it on her credit card). So I spent a reasonable amount of time in there, and some of that time was spent waiting around, and when you wait around you look around. Well, I do, anyway. And they had eight computers in there. And each one of them was running some kind of text-based program to place orders and book stuff out: blue screen, text, cursor keys to move around. You know the sort of thing. None of this clickable GUI stuff here. Now, I have no problem with that: there is absolutely no need to throw away a perfectly working system, and all your years and invested effrt of user training, just to get something that looks more like other apps. No worries.
But every single one of these computers was actually running Windows, which was then running a full-screen 3270 terminal emulator.
Why? WHY? Why in fuck’s fucking name would you pay out for eight Windows licences and then use them as dumb terminals? Why? Why not put dumb terminals on the desks? Or install Linux on the machines and save yourself five hundred quid per Carphone Warehouse? Why would you not do that?
Some of you may be saying: I bet they do other stuff on those machines. I think the following: No they don’t. They might occasionally need to knock up a Word document or something; fine. So keep one of the machines as a Windows box and stick a very simple cut-down Linux distro on the rest, if you like. I’m not even going to say “use OpenOffice.org” here; if you want Windows, use it, on the machines you need it on. They didn’t ever switch away from the terminal emulator, not while I was in there.
I’ve been in small Carphone Warehouses with only two machines in. This one had eight. So let’s say that there are four, on average, in a CW. They’ve got 1300 stores, according to their operations information. At fifty-odd quid per Windows licence, that’s 1300*4*50 = quarter of a million quid. Now, a company that made 16 million pounds last year in retained profit should be thinking of £250,000 as a pretty substantial whack: that’s a 1.5% rise in profits. How do we convince these people?

Ads

After Andy Bugg’s BlogAid project was mooted, I thought: should I be running ads here? I don’t currently have any income from this site (and therefore donated nothing to BlogAid, although I did make personal donations to the tsunami appeal), but I suppose I could do. How would readers feel about Google text ads down the side? Apparently they’re all targeted and whatnot; I don’t know precisely how true that is, mind. Thoughts?

Adding servers to Network in Ubuntu

Go to Computer | Network. In the File menu, pick Connect to Server. Fill in the details and, pow! That server appears in Network. I had no idea this was possible. It persists over reboots and everything. Coolness.

-----

Very cold fridge

So, there I was in Maplins today, and they were advertising a fridge:
AC/DC Mobile Fridge and Warmer; Holds eighteen 440ml cans!; Cools to 258C below ambient room temperature!; Also warms food to approx. 508C; Dual mains/in-car power supply; Cool silver finish; £59.99
Cools to 258C below ambient room temperature, eh? Well, ambient room temperature is normally about 20°C. So that’s approximately -238°C. Absolute zero, the coldest temperature possible, is around -273°C. So that fridge makes stuff really, really cold. I am amazed that it hasn’t been rushed off the shelf by university science departments and other ultracold researchers: that’s way colder than liquid nitrogen. And it’s only £59.99! Better still, it’ll heat up to 500 degrees! Wow! Not only could you cook dinner in it, but you could loan it to the craft department (when you’re not making solid nitrogen blocks with it) and they could fire clay. What a device! Get yours today!

Editing files as root in Ubuntu

When I right-click a file in Ubuntu and say “Open in gedit” or “Open in bluefish” or whatever, if I don’t have rights to edit that file, I don’t want it to open it read-only. Instead, I want it to say “You don’t have rights to edit this file? Open it read-only or edit it as root?” and then, if I pick “edit it as root“, do “gksudo “, so that I can edit it and don’t have to drop to a command line to do it.
How can I do this? The only way I can think of doing it is to change all my “open this file with this application” things so that, instead of opening the file in the app, it opens them with a little zenity shell script that does what I want. That’s a massive pain in the arse to do. The problem is that you can’t hack Nautilus to do this for you,. because it doesn’t want to happen with applications that aren’t editors. Suggestions, anyone?

Mozilla DomRef editable by everyone

Simon Willison begs Mozilla to make their DOM support documentation a wiki. I thought: that’s a damned good idea. So I went off to the DomRef website and grabbed the code, and started poking around for the right wiki engine for people to use, when I noticed that it already is a wiki. There’s an “Edit this page” link at the bottom! Look!
See the 'Edit this Page' link in the footer.
I thought at first that I’d wasted an hour looking at suitable wiki engines: in fact, looking at the history of the domref pages at archive.org shows that the page has had editing enabled since June 2002.
However… you need commit access to the Mozilla CVS to save the changes. Not all that open, although you can see why they did it. I think, as SImon does, that we need a more publically editable copy of these things, to keep all this stuff up-to-date.

Site-specific Firefox extensions and the Year of the DOM

A while back, Adrian Holovaty wrote a Firefox extension to apply JavaScript to one specific site to make it better. SImon Willison compared the technique to per-site user stylesheets and we had an interesting discussion in the comments there about the idea of site-specific extensions and how to make it easier to do them. Now GreaseMonkey allows you to add custom site-specific JavaScript to any site (via Michael Moncur) and have it remember and apply that script always. Magnificent. (*Update:* and it’s written by Aaron Boodman. I wondered what he was up to.)
It still suffers with the problem that people experiencing a broken site won’t know that it’s fixable with JS: this isn’t really designed to be a tool that fixes the web so all broken sites work in Firefox. It’s more oriented at individual developers scratching their personal itches. I’d like to see some sort of central repository of SSEs that people could get at. Actually, I’d like to see a central repository that GreaseMonkey could get at and install new SSEs automatically, but I said that in the comments on Simon’s article above and was reminded of the security problems inherent with that approach. Nonetheless, this is a cool tool, and I’m now running it.
This is also the ideal way for people to get into writing DOM scripts; instead of applying things to your site, try applying things to other people’s. It’s the DOM equivalent of the Edit CSS thing in the Web Developer toolbar. Lots of people are pushing 2005 as being the Year Of DOM: SImon and Jeremy and Dave Shea have all expressed this opinion, and, unsurprisingly, I agree with them. (Jeremy even says, “Simon and Stuart, it looks like this is going to be your year“, and calls us pioneers. Blimey. Like, thanks, dude.) To that end, an update:
The book is bloody nearly finished!
Actually, I thought it was finished, but then my tech editor (Simon Willison :-)) flagged something else we needed to update on keypress handling in chapter 3. But it’s really nearly done! Not that this will stop people mailing me to say “is the book done yet?“, and frankly I don’t want it to (I rather like the attention, a confession which will surely amaze you). But the book itself will explain how to get to grips with the DOM, and then we can all be pioneers. I can’t wait.

The internet dispels myths

So, Sam and I were chatting away, and she told me about a guy who was on Richard and Judy a while back. Apparently this guy was skiing in the Alps or somwhere, and got caught in an avalanche, and his arm was trapped beneath a boulder. And he couldn’t get free. He was pinned there by his arm for three days, and the end was in sight. With the old guy with the scythe, as he thought, just around the corner, the pinned skier came to a drastic decision. He’d have to lose the arm in order to survive. But he had no tools.

So he bit through his own arm. Amputated his own living arm with his teeth.

That’s the worst and most horrible story I had ever heard. I couldn’t stop shuddering at the thought of biting through your own arm.

Then reality reasserted itself a bit. So I looked it up on the internet. And the story, while generically accurate, was actually wrong in almost all particulars. The guy wasn’t skiing, he was mountaineering. In Utah. And, most importantly, although he did come to the blood-chilling decision to remove his own arm, and then actually did it, he did it with a pocket knife. Not his teeth. Now, don’t get me wrong; cutting off your own arm takes nerves of steel, I admit it. But biting through it? Tasting your own living flesh and feeling all that pain? I’m bloody glad it didn’t happen, that’s all I can say.

ladyfingers…they taste just like ladyfingers…

Getting a net connection with OpenZaurus and a Sony Ericsson K700i on Orange in the UK

I wrote before about how to connect to the net from a Sharp Zaurus using IR and your K700i. Since then, I’ve upgraded to OpenZaurus, and the process under OpenZaurus is a bit more complex.

  • Set up the phone the same way as I describe in the previous link
  • On the Z, go into the Network applet in Settings
  • Say “Add”
  • Select “PPP” and say “Add”
  • In “Accounts“, say “New”
  • In “Connection name“, say “GPRS“. Then add the phone number, as described in the link above, and say OK
  • In “Devices“, say “New”
  • “Modem name”: “IR phone” (or whatever you choose). “Modem device”: /dev/ircomm0. “Flow control”: None. “Connection speed”: 115200. Say OK.
  • Say Ok again in the Configure Modem screen
  • Now make sure your new “gprs” connection is selected in the Network Settings screen and say “Start/Stop“.
  • Align the Z and phone and say “Start” to start the connection.

And there you have it.

Eating a bear

Drew McLellan thinks that 2005 will be the year of the beard and points out that Jon Hicks, Andy Budd, and himself all are hairier than your average bear. It’s nice to be in good company, although I haven’t had my own facial fungus as long as Andy B has, and it’s dwarfed on the International Scale Of Beard Floppiness by Jono’s chin fur. Actually, 75% of the LugRadio team are cheekly hirsute, the exception being On Call Bald. And he’s bald! Hence the name! Moreover, he thinks he has a beard, although it’s really a toothbrush moustache that has slipped below his mouth. So that means that all four of us are weirdy beardies. Clearly Drew was right. Let’s hear it for 2005, the Year of Beard.

Setting up a DVD recorder with a VCR and a cable STB

I got a DVD recorder for Christmas. It’s really outstandingly cool. Just being able to record stuff and then delete it afterwards with the press of a button is about the coolest thing ever. Yes, I am easily amused.
However, I’ve got something of a complex setup as regards telly stuff. You see, there’s not only the DVD recorder, but a VCR, the set-top-box for cable, the TV, and a magic retransmitter box. The magic retransmitter box broadcasts the TV signal it is fed so that it can be picked up by other TVs in the house, meaning that the STB can be in my living room and my daughter can watch cable channels like CBeebies in her playroom. Coolness incarnate.
Other requirements: record videos onto DVD (so I can take the last ten years of taped-off-the-telly films and put them on DVD, getting some space back—not for hiring videos from Blockbuster and taping them); record DVDs onto video (so that Sam can take stuff we’ve got on DVD/VCD/SVCD and play it at school—again, not for ripping off copyrighted stuff); record cable channels and ordinary telly onto video or DVD at my choice.
So, after some serious fiddling about and some help from andyfras over at the UK radio and telly forums I came up with the following:
Connect everything by RF; connect the DVD recorder SCART output to the video SCART; connect the STB to the TV with SCART
It’s all fun, this audio-visual stuff, I tell you. Even more fun than the last time I did this. Fortunately, since the last time I got new kit (a DVD player, two years ago) I’ve bought a new TV, which has modern inputs like SCART, so it wasn’t as bad this time.

Comment moderation: a plea

I think that, for some weblogs, comment moderation is a good idea. I think it’s a pretty heavy burden on the site maintainer, and it kills the flow of conversations if said maintainer isn’t completely on the ball and approving comments semi-instantly at all times (and that’s why kryogenix.org doesn’t do it), but I can see the reasons for it. But please, for the love of Pete, if your site takes newly entered comments and stashes them somewhere for moderation without making them visible, tell the comment poster! It is impossible to tell the difference between “I wrote a comment and clicked POST and the site ignored my comment” and “I wrote a comment and clicked POST and the comment has invisibly gone into the queue awaiting approval“, unless you tell people. Put a big thing up on comment submission saying “your comment is now awaiting approval“, and then people like me won’t try and post it three times or (alternatively) get really really annoyed…

-----

Sitting in the bath

So, I’m sitting in the bath. Fully clothed, and there’s no water in it.
Some people might wonder why this is.
Our bath is screwed. When you have a shower, water leaks through the kitchen ceiling downstairs. This is clearly not at all a good thing. Thus, we’ve been putting tons and tons of silicone sealant around the edge of it. This has been tried before and hasn’t worked; the latest theory as to why it doesn’t work is that when someone gets in the bath, their weight pulls the sealant away from the wall, meaning that it no longer seals. This time, therefore, we’ve got that weight in the bath before it’s sealed and while it dries. It apparently takes 24 hours to dry, but I’m not sitting in here for 24 hours. I’ve been here for 45 minutes and my arse is completely numb, so I’m getting out in a sec. Meanwhile, I’m sitting here surfing the net and working out how to do post tagging as part of the grand website redesign (which is fun). Praise the Lord for the gift of wireless networks.

BlogAid

Andy Budd has created BlogAid in an effort to help support the victims of the Asian earthquake and tsunami. The idea here is that if you have Google ads or affiliate program stuff on your website, you pledge the earnings from those for the month of January to your country’s effort to help those victims. I personally don’t run ads or affiliate stuff on kryogenix (mainly because I’ve never got around to it) but if you do then do please consider joining the BlogAid programme.

-----

This website belongs to Stuart Langridge. Contact details are available. Don't eat yellow snow. Valid HTML5, at least in theory, except for the bits that aren't because I'm that futuristic that I'm ahead of the spec, oh yes. HTML5 help from Bruce Lawson, among others. Fonts from the superb FontSquirrel. End.