Gaming competition at LugRadio Live this weekend

July 17th, 2008

Cool. We have confirmation that Matt Bloch and the gang at Bytemark have put together an uber-flashy gaming rig to bring to LugRadio Live this weekend.

They’ve written about this gaming server, and they’re going to be running a set of gaming competitions on it over the course of the weekend. Those of you who are gamers are going to enjoy this.

OpenID login and APIs

July 9th, 2008

Does anyone have an example of a site which:

  1. Offers OpenID login
  2. Has a remote API that allows you to log in using your OpenID rather than a username and password

How do you provide this, as a site owner? It’s not clear to me that OpenID works for machines to log into things (unless I go and set my OpenID to “always allow access” and then write a screen-scraper module for my OpenID provider).

This seems like something of a flaw in the OpenID concept. Hopefully I’m missing something.

Update: OAuth isn’t the answer here. My use-case for this is, say, a little script that allows me to post to Identi.ca. OAuth requires me (the “Consumer”) to request a “Consumer Secret” and a “Consumer Key” from Identi.ca. From my reading of the OAuth spec, that’s supposed to be specific to the script, not specific to the person running the script, which means that I can’t open-source the script (because then everyone will know my Consumer Secret). So in order for me to write an application that uses OAuth to authenticate to a site, either I can’t open source it, or everyone using the application has to apply for their own Consumer Secret and Consumer Key; at that point you might as well just set a password and not use OpenID! The OAuth spec says that “Service Providers should not use the Consumer Secret alone to verify the identity of the Consumer“, and goes on to “Where possible, other factors such as IP address should be used as well“, which as far as I can tell means “we like closed-source programs; if you want to open source something, then we don’t know how to solve that problem, so you lose”. Correct me if I’m wrong.

LugRadio Live UK 2008 schedule published!

July 7th, 2008

After weeks of blood, sweat and tears trying to get a talk title out of Rob McQueennail down the schedule for LugRadio Live UK 2008, it’s finally available!

Go see the LRL UK schedule to see who’s speaking and when

I’m pretty damned proud of the list of people we’ve put together. There’s a good mixture of the same old faces (who speak a lot at conferences precisely because they have a lot to say and they say it well!) and people who’ve never spoken at LRL before. I can’t wait. Only 12 days to go.

Breaking news: we’re putting together a LAN gaming tournament as well as part of the event! If you like that sort of thing, come along and frag people* to your heart’s content. There are prizes.

Oh, and a brief reminder that it’s the last ever recording ever of LugRadio ever. See you there. July 19th and 20th, Wolverhampton, UK. No ticket sales in advance: just turn up on the day clutching your five pounds. You can’t afford to miss out.*

blah blah new design blah

July 4th, 2008

New site design. Those of you who didn’t like the pink one (i.e., everyone) may not like this either. Once again my lack of design skill runs amok. On the other hand, now I can pretend that it’s minimalism rather than that I have the artistic ability of a rubber mallet.

Of course, as with all things, Mark was there first and with greater gusto, but if that was enough of a reason to stop people doing stuff then there’d be no internet.

Feel free to let me know if anything doesn’t work in Firefox or Opera or Safari. (It’s tested in FF3, Opera 9.5, and Midori, but only pretty briefly.) I can’t test in IE7 because IEs4Linux doesn’t properly run it yet* and it looked sort of OK in IE6, and that’ll do me, I think. This is graded browser support in the real world, meaning that my browser is Grade A and everything else is some letter in the Greek alphabet like omicron.

Actually, that should be “such as omicron”, there. Tom once told me that he didn’t like the TV programme “People Like Us” because it should have been called People Such As Us. Grammar is important, especially if you’re running an anti-child abuse campaign.

Speaking of such esoteric matters, it seems that Firefox supports the soft hyphen ­ these days. Which­is­really­great­if­it­actually­works­and­well­done­the­Mozilla­team­only­five­years­later.

Typography is important, too, but I don’t understand that, Richard Rutter notwithstanding. On the other hand, I have now used line-height for the first time ever. Eric Meyer, watch out.

It’s Friday night. Time for a pint.

Identi.ca, Twitter, and posting between the two

July 3rd, 2008

It’s now the trendy thing to write an essay about why Twitter is doomed, or why it’s not doomed and all its competitors are doomed instead. And god knows I wouldn’t want to break the back of that trend.

I’ve been playing with Identi.ca, a Twitter clone written in PHP. Lots of Twitter people are becoming frustrated with seeing the famous Fail Whale on Twitter’s “we are currently down” page, and people are starting to look elsewhere. There are lots (and lots and lots) of alterni-Twitters (which is a problem I’ll come back to in a moment), but identi.ca is attracting one of the communities I operate in, open source people. This is because identi.ca is entirely open source: the codebase is called Laconica. This is a nice idea.

First things first, though: I don’t want to update two places at once. Identica* doesn’t have an API (yet), but I wanted to post things to Twitter and have them appear on Identica too. So, I present the Twitter Identi.ca Reflector. Download as a tarball or check it out from Subversion or browse the source. The README tells you how to set it up. It uses Jabber to post to Identica, which isn’t ideal, but (as mentioned) there’s no API. So now you can send Twitter posts to Identi.ca, which is helpful.

Now, why Twitter is good, why Identi.ca is good, and why everything else isn’t. If you just wanted to post Twitter comments to Identi.ca then you can stop reading now.

Twitter looks like it ought to be easy to clone, and it isn’t. This is why there are lots of Twitter clones, and why none of them have taken off. The basic principle of microblogging is indeed an easy one, I agree. But all the other Twitter-alikes are missing something. They don’t have SMS sending, or SMS following, or they don’t have an API, or they don’t have lots of desktop clients, or they have one desktop client that doesn’t run on everyone’s machine, or they don’t do IM. What makes Twitter good is two things: the first is that you can get at it in so many ways. And because there are so many ways, people can build lots of things on top of it. For example, if you want to do the reverse of what the above reflector does (post your messages to Identi.ca and have them show up on Twitter) then you don’t need an extra program, because it already exists: Twitterfeed. Simply sign up at Twitterfeed, and use it to send posts from your Identica feed to Twitter, and it’s all done. That’s the power of having an expressive and complete set of APIs. It can’t be underestimated.

The second reason Twitter is good is that everyone’s already there. They got first-mover advantage. There’s no point going to an alternative because none of your friends are there. This is also the reason that Twitter has fifty desktop clients and that things like Twitterfeed exist; it’s worth the investment. It does mean that if people leave Twitter they’ll all leave together and the bottom drops out of their market, but that’s the way the internet cookie crumbles. Photo sharing sites have the same issue — it’s difficult to build a Flickr competitor because everyone’s already at Flickr, so none of the “social” stuff happens elsewhere because you never hit a critical mass of people.

So, what’s good about Identi.ca then? Well, for me, the big things are open-sourceness and federation. The underlying codebase being open source is a huge win, from my perspective. It means people other than the Identi.ca team can work on adding new features, it means that we can see what’s going on, and it means that there are more open source programs in the world. I like this. Other people may not, but what the hell.

The other advantage is federation. This is all about the OpenMicroBlogging specification; it basically blows away the “all my friends are at Twitter so I must be too” point. It means that you can subscribe on one microblogging service to people on other microblogging services. I could be at Identi.ca, you could be at Twitter, someone else could be at Jaiku or Pownce or wherever else, and we all read one another’s messages, happy as Larry. It levels the playing field. I can subscribe Identi.ca to Twitter without problems. This is a great idea which is rather hampered by the fact that basically no-one has implemented it yet. It’s in Laconica, though, so Identica has it. It helps get around the scaling problems that Twitter are having, too: you don’t need one centralised Twitter service any more. There can be lots of little islands, all of which talk to one another. No more scaling problems. No more Fail Whale. People who need the extras that Twitter provides can use Twitter quite happily (as I’m doing; I like SMS!), people who don’t need that but do need other services can use something else that provides those other services.

The basic concept of microblogging has been commoditised thanks to OpenMicroBlogging — it’s become a simple thing to implement anywhere. Microblogging services can now compete on which extras they offer.

That’s why I like Identi.ca. Oh, and they let you create your account with OpenID, which I did. It’s a win all round. Development’s going on at a fast pace on the Laconica codebase, so expect to see more and more appear over there. Blizzard’s already added identi.ca support to Whoisi, so things are moving quickly. I don’t know whether the trickle of Twitterites in Identi.ca’s direction will continue, but thanks to the reflector code above, I’m now on Identi.ca without putting in any extra effort. That’s identi.ca/sil for those of you who want to track it.

Controlling Banshee over D-Bus

July 2nd, 2008

I needed to be able to control Banshee from another application, and it turns out it has a lovely D-Bus API.

Skip to the next song*:

import dbus
bus = dbus.SessionBus()
banshee = bus.get_object("org.bansheeproject.Banshee",
  "/org/bansheeproject/Banshee/PlaybackController")
banshee.Next(False) # use banshee.Previous(False) to skip back one song

Start Banshee playing (this works even if Banshee isn’t running; D-Bus starts it up!):

import dbus
bus = dbus.SessionBus()
banshee = bus.get_object("org.bansheeproject.Banshee",
  "/org/bansheeproject/Banshee/PlayerEngine") # note PlayerEngine, not PlaybackController
banshee.Play() # use banshee.Pause() to pause playback

I found these commands using D-Feet*, J5’s D-Bus browser thing, which is great. The program I’m using to call this stuff is open source Enso from the Humanized team, which is also pretty darn useful.

The end of LugRadio

June 30th, 2008

LugRadio is ending.

Yep. After 106 shows, two million downloads, five thousand emails, 134 hours of recorded material, five conferences, and fourteen presenters*, LugRadio is coming to an end. I’ve just released “More on that later”, episode 21 of season 5, which is the antepenultimate (!) episode. We’ve got one more “ordinary” episode after this, and then the live show at LugRadio Live UK on the 19th and 20th July in Wolverhampton, and that’s it.

There’ll be a certain amount of reminiscence at LRL in a couple of weeks, but this might be a good place for me to talk a bit about everything that’s gone on. It’s been a pretty cool ride, I have to say. We talked to loads of people, shone a spotlight on loads of projects, won an award for marketing and been elected best podcast in a magazine, done LRL in America and four times in the UK, and basically had a great laugh doing it. I’m really proud of what we’ve done. And now it’s ending. A sad moment.

I probably ought to say: it isn’t because we’ve had a row or anything. We want the show to go out on a high — always leave ‘em wanting more, isn’t that the showbiz mantra? — and everyone can name programmes that have outstayed their welcome by stringing it out for just one more season. I would like to keep those people who don’t think that we jumped the shark 104 shows ago to be still thinking that the show was good even after it’s over.

So, this is it, kids. This show, one more show, and then the live show at LugRadio Live. That’s our chance to say thankyou to all the people who’ve made the show what it is, and your chance to see the last ever LugRadio recording live on stage. Drop us an email or post to the forums to tell us what you’ve liked and disliked about the last four years and what you want to see us talk about at LRL, and come and celebrate the end of an era with us. There’s going to be rather a few drinks that weekend: make sure some of them are yours. I’ll see you there.

Other comments around the place: Jono’s writeup, Adam’s writeup, digg the end of the show

labelify: a jQuery plugin to add labels to your textboxes

June 25th, 2008

A fairly common design pattern in web forms is to have some explanatory help text for a textfield appear inside the text field, and then remove it when the user clicks into that field. It has the benefit of putting the help precisely where the user’s looking.

Labelify is a jQuery plugin that does this for you, as simply as possible. It handles a number of corner cases, and it’s quite customisable if you need it to be, while still working as simply as possible out of the box.

Enjoy.

Browser version icons

June 21st, 2008

Ian Lloyd’s released browserversionicons.com, a set of icons for popular web browsers branded with the version number. This is useful for those of us who have fifteen web browsers installed at different versions for web testing.

It’s a resource for Mac people — the icons are in .icns format, which is some Mac-specific thing — but I thought it’d be useful for Linux people too. So, I converted all the icns icons to PNG, using icns2png* and Ian kindly added those icons to the download pages. I’ve also done a brief screencast of how to change your browser icons to use different ones — be gentle with me, it’s my first screencast.

Good work, Ian. Let’s see more of that. (Oh, and if you get a chance to produce icons for versions of IE greater than 5.2, that’d be handy too.)

(oh, strangely, there is an open bug for Gtk support for .icns format, and apparently Bastien committed the fix to trunk last November (so it should be there in my Gnome 2.22.2, right?), but you can’t set a .icns file as an icon for a .desktop file/launcher. Not sure whether that’s because I don’t have the patch or because the patch doesn’t do that; if someone can tell me, I’ll file another bug.)

YeahConsole: a dropdown Linux terminal that’s better than Tilda

June 18th, 2008

I’ve been a big fan of Tilda, the dropdown terminal window for Linux, for a long while; pressing F2 to grab a terminal is hardwired into my fingers now, and I’m crippled without it. However, Tilda’s been getting steadily shitter as time’s gone on; more crashy, more unresponsive. Recently, it stopped taking keyboard focus when you brought it up, which has led more than once to me pressing F2 and then typing half the shell command I wanted into my (still focused) Firefox window. Not only is this incredibly annoying, but at some point I’m going to type my password into an IRC channel. It’s gotta stop.

The obvious replacement is yakuake, the KDE dropdown terminal. However, I hate it. I don’t even know why, to be honest; it just feels weird to me in a way that Tilda doesn’t. So I looked around for alternatives, and found two: Guake, which is supposedly a better Tilda and Yakuake for the Gnome desktop, and yeahconsole. Sadly for the Guake team, I found yeahconsole first, so that’s what I’m using. Actually, I rather like the out-and-out simplicity and bare-bones nature of yeahconsole, which is why I’m sticking with it; when I need to do shell things, I don’t want flashy features, I want a shell. I don’t use tabbed terminal windows, for example. Just simplicity, that’s what I want.

Yeahconsole is available in the Ubuntu repositories (click to install on Ubuntu). Here’s how I set it up.

First, it needs to run every time I log in. So, go to System > Preferences > Session, select Startup Programs, click Add, and add a new command, name “YeahConsole”, command “yeahconsole”.

Next, it looks a bit rubbish when you start it up. Here’s how bare-bones yeahconsole is: you configure it with X resources. Party like it’s 1989! I had to go look up how to do this; for the more tender in years among us, X resources were a sort of central configuration for all your apps, round about the same time that humanity was fighting off sabre-toothed tigers and wondering whether that hot flamey thing in the corner could actually be useful. On Ubuntu, you need to edit (actually, you probably need to create) a file called .Xresources in your home folder*. In that file, you put the configuration for yeahconsole, like this:

yeahconsole*toggleKey: None+F2
yeahconsole*consoleHeight: 20
yeahconsole*aniDelay: 0
yeahconsole*stepSize: 10
yeahconsole*faceName: ProFontWindows:style=Regular
yeahconsole*faceSize: 9

The toggleKey one is the important one: it sets which key you use to summon the terminal. I like F2, myself, but pick whatever. What all this stuff means is documented in the man page (man yeahconsole), apart from which font to use. This is the faceName and faceSize options above, and here you have to delve a bit (I told you this was old-fashioned; I started writing a yeahconsole-properties configuration utility that did all this for you, but couldn’t be bothered). In a terminal, run fc-list. This lists all the TrueType fonts that you can use in an xterm. Choose one, and put it in faceName above.

Now, simply start yeahconsole for the first time (press Alt+F2, type yeahconsole), and then press F2 (or your key of choice). Pow, a dropdown terminal, like Tilda, but one that won’t keep crashing and make you cry.

One other thing: if you hit Ctrl-D to log out by mistake, it’ll close yeahconsole (tilda did this too), and that’s really irritating. To fix this, put the following in a file called bashloop in your home folder:

#!/bin/bash
while true; do bash; done

and change your Startup Programs command above to be yeahconsole -e /home/username/bashloop. Now Ctrl-D won’t close yeahconsole. Win.

LugRadio Live UK 2008 is coming

June 17th, 2008

I’ve just released episode 20 of season 5 of LugRadio, which is always a fun process (remind me to write about the actual release process for these things at some point; after over a hundred shows I’m starting to nail down precisely how to publish a show in four formats and to ten mirrors with the minimum of effort!). It was a pretty fun show to record, and recording it reminded me that I haven’t written much about this year’s LugRadio Live UK. Now, there are going to be some of you reading this who already listen to LugRadio and who therefore know about it: this post is for the rest of you (well, mainly those of you in the UK or in close-ish parts of Europe). If you do know about LugRadio Live UK already, then you should go and digg it and post one of the LRL UK buttons to your blog. If not…read on!

Basically, it’s gonna be brilliant. This is the fourth year of LugRadio Live in the UK — we did the live event in the US as well for the first time in April this year, and it was pretty damned cool — and we’re really looking forward to it. It’s always a jolly good laugh putting together LRL; looking through people’s speaker submissions (if you submitted a paper, I’ll be sending you details of when you’re speaking or whether you weren’t accepted in the next few days, I promise), thinking up cool stuff to do, and planning the live show.

This year, I’m really looking forward to seeing the speaker lineup — we’ve got some ultra-cool people talking about technology and culture and open source, and we’ve got some ultra-cool people exhibiting their projects and their products and their companies as well. The thing that really gets me about LRL every year is the vibe — we got described as a “rock conference” a couple of years ago, and it really summed up the feel of the whole event for me. It’s about having a laugh. We originally set up LugRadio Live because the fun bit at all the other conferences was the evening when you hung out with a bunch of cool people and had a beer and chatted about everything — our thought was, why can’t we just take that feeling, that experience, and make a whole weekend out of it? And lo and behold, that’s what we’ve done for four years now, which I’m really quite proud of!

Enough of why you should come and of back-slapping. How can you be part of LRL? It’s in Wolverhampton on Saturday the 19th and Sunday 20th July (see the travel info for how to get to the venue). We’ve got deals with local hotels, too — LRL is a true grassroots event (that’s why it’s five quid for a two day conference), so we don’t want to make it expensive, because people pay themselves. Your company probably won’t send you to LugRadio Live…but they should. You’ll find out more there than in a month of listening to people in suits. :)

Anyway, come to LRL and be part of it. You can digg it, but more importantly tell your friends that you’re coming and get them to come too! You can pick one of the I’m coming to LugRadio Live buttons to put on your site, or design your own custom button if you don’t like ours! So…get involved! See you in July!

Non-capturing groups in a regexp

June 17th, 2008

Bridge to engine room, geek factor nine. Those of you who read this for musings about the world, stop reading now.

Alex at work has just alerted me to the existence of non-capturing groups in regular expressions. I had no idea these existed, and they’re pretty useful if you’re doing RE matching. If you’re trying to match a string which might be “fish, chips and ketchup”, might be “fish, chips and peas”, and might not contain the “and chips” at all, and what you care about is what’s last on the list (the “peas” or “ketchup”) then I’d have used a regexp like /fish(, chips)? and (.*)$/. Matching that against “fish, chips and peas” will give you back a three-item tuple, ("fish, chips and peas", ", chips", "peas"). (Test with JavaScript) You need the brackets around “, chips” in the regexp because you want to treat it as a group. However, it ends up in the results, and that’s really irritating.

Now I know about non-capturing groups, I’d do this: /fish(?:, chips)? and (.*)$/. The ?: after the opening bracket of the group means “don’t capture this group”. So now the results you get back are ("fish, chips and peas", "peas") — the chips, which we don’t care about, are not mentioned! (Test with JavaScript)

Another useful little trick to add to my toolbox. Cheers, Alex. Everyone who is reading this and thinking “I knew about this ages ago”, why didn’t you tell me?

Immaturity

June 8th, 2008

I probably shouldn’t be laughing as much as I am about having just created this, because it’s not the most mature thing I’ve ever done. Hey, what can I tell you; it’s been a long week.

<a href="http://adactio.com" rel="enemy">Jeremy Keith</a>

Not going to Guadec

June 5th, 2008

This year, for the first time in a few years, I’m not going to be able to make it to Guadec. I’m pretty sad about this — it’s always a fantastic time — but I’m not going to be there. It looks like it’s going to be insanely great, though, as ever, so have a laugh, all. I shall try and write up the things I was going to talk about into a guide to cool things that you can do in gedit (which I was planning to do anyway, before deciding to turn it into a Guadec talk!)

Beyond 404 @media/barcamp talk

June 1st, 2008

Beyond 404, the talk I did at @media 2008 and BarCamp London. On the horribly ponderous subject of HTTP response codes, but I suspect that if you think you already know this stuff, you may be surprised at what you don’t know.

Twitter

June 1st, 2008

Alright, I give in. Everyone’s using the bloody thing.

http://twitter.com/sil

LugRadio Live USA videos

May 8th, 2008

For those of you who missed the greatness that was LugRadio Live USA, or those lucky lucky people who were there and couldn’t see all the talks, we’re now starting to make videos of the talks available for download! Tony Whitmore, our hyper-competent video guy, is busily processing the videos, and as they’re made available we’re adding them to the LugRadio Live USA schedule. Currently there’s video of the LugRadio live show recording, Ted Haeger talking about “Freedom and the Cloud”, and Emma Jane Hogbin talking about women in open source. More will be appearing over the next few weeks! Keep an eye on that page to find video that you can stream or download in a load of formats.

(Those of you who are hyper-keen can actually get the videos quicker by watching the official video thread in the LugRadio forums, too.)

Auditions

April 26th, 2008

Lots of posts stacked up over Heathrow at the moment, like one about LugRadio Live USA, but for now I just have one bit of news. This morning, Niamh, my daughter, went to an audition to join the Stagecoach Talent Agency, and she was hugely successful. So successful, in fact, that they’re already putting her forward for an audition for a part on CBeebies, the children’s TV channel in the UK.

It is possible that I may burst with pride.

Fifteen years from now when she wins the Best Actress Oscar, I can look back and say “this is where it started”. CeCe Bloom, eat your heart out.

So proud. They said she was excellent.

Coming to America

April 5th, 2008

I’ve been noodling about in Inkscape, and reading The Order Of The Stick, a webcomic. It’s got a unique visual style, which always makes me laugh, and I thought (despite my lack of artistic ability): I wonder if I could do that?

LugRadio Coming to America

(there’s the SVG too to look at, which is a better size, although it’s 1MB because of the embedded images)

I’m not brilliantly happy with Chris or Adam, but I think Jono and I came out OK :)

Maybe I should do a LugRadio webcomic.

Inkscape’s a really good tool, by the way. The people who do it should feel very proud. I am distinctly short of artistic ability, and I’ve barely used Inkscape before, and I managed to put that together in relatively short order. Good work, Inkscape team.

Oh, yes, and LugRadio Live USA is this Saturday. We’re coming to America. Get ready.

gDay

April 1st, 2008

Q: Wait a second. I live in the US. Does this mean I’m now 2 days behind Australia?
A: Yes. Yes it does.

the gDay MATE future-search-engine announcement

I don’t normally like April Fools’ stuff on the web, but I’ll make an exception for this one :)

Editing a PDF (sorta) on Ubuntu

March 31st, 2008

I have more than once had to fill in a paper form for people in America. Obviously, doing such things is a huge pain, because actual paper mail — with stamps — isn’t just so last century, it’s the century before that. You know, the one with robber barons and Lord Kelvin and workhouses. Put a stop to it. Email. Email, I tell you. It’s gonna catch on, just you wait.

Anyway, a fair few American corporations (and, wouldjabelieveit, the American government too) provide PDF versions of their forms so you can download them and print them out at your leisure. They’re still designed to be printed and written on, though — they’re not officially PDF “forms” in the sense that the PDF reader can give you textboxes and an FDF file to fill them in, they’re just PDF documents. Nonetheless, I find myself wanting to be able to open them up in OpenOffice.org and edit them.

Now, you can’t do that. (Well, you might be able to, but it’s hard.) All I actually need to do is overtype them. So what I do is:

  1. Convert the PDF to an EPS file with pdftops: pdftops -eps AmericanGovernmentForm.pdf (the pdftops program is in the poppler-utils package)
  2. Create a new empty document in OpenOffice.org and drag the new .eps file onto it, which will embed it as an image
  3. Use Insert | Frame to draw a text frame on top of the new image (set it to have no border; set the background colour to anything other than No Fill and transparency to 100%)
  4. Overtype onto the form in the text frame
  5. Export as PDF to get a PDF version with your text in
  6. Email it to the government

No stamps. Their evil must be stopped.

Hackergotchi

March 31st, 2008

Would someone better with the Gimp than me like to do me a hackergotchi for Planet Gnome? I’ve been meaning to do it for ages and not got around to it. This snap at Flickr seems like a good candidate, but go wild if you can think of a better one (CC-derivs-licenced Flickr pics of me as a starting point :))

Overriding a single field in the Django admin, using newforms-admin

March 28th, 2008

Django has been gradually changing the way their automatically-created admin system works to use the newforms-admin code, which makes lots of cool new things possible. However, because newforms-admin is rather new (ha!), it’s not brilliantly documented. One of the things I wanted to do today was to make one field use a custom field-editing widget that I’d created, rather than Django’s default textbox, in the Django admin system. You do that like this.

In newforms-admin, you specify admin options for a model by creating an extra ModelAdmin class for it:

class Vehicle(models.Model):
  colour = models.CharField()
  name = models.CharField()

class VehicleAdmin(admin.ModelAdmin):
  search_fields = ["name", "colour"]

admin.site.register(Vehicle, VehicleAdmin)

Imagine that we wanted to build a custom widget to allow people to choose a colour by clicking on a colour swatch. To do this, you need to actually create your custom widget. So, in a file custom_widgets.py, you create your widget. The easiest way to do this is to subclass one of the existing widgets (TextInput is a good one here, because that’s a normal textbox, which is what gets used by default for CharFields) and then change its render method:

import django.newforms as forms
from string import Template
from django.utils.safestring import mark_safe

class ColourChooserWidget(forms.TextInput):
  def render(self, name, value, attrs=None):
    tpl = Template(u"""<h1>There would be a colour widget here, for value $colour</h1>""")
    return mark_safe(tpl.substitute(colour=value))

There are a few interesting wrinkles in there.

First, overriding render() changes the HTML that your widget prints when asked to display itself by the admin system. (I haven’t actually implemented the widget there; left as an exercise for the reader, that bit.)

Second, you need to call mark_safe() on the HTML you return, otherwise the admin will escape it.

Third, all input to mark_safe() must be Unicode, hence the u""" at the beginning of the string. The parameter value already is Unicode, but any strings you provide must also be explicitly Unicode strings; otherwise, mark_safe() fails silently — the string will be escaped.

Fourth, you don’t have to use string.Template, but it’s pretty convenient.

Once you’ve created your custom widget, you have to hook it up to your model. In our example, we need to change VehicleAdmin:

from custom_widgets import ColourChooserWidget

...

class VehicleAdmin(admin.ModelAdmin):
  search_fields = ["name", "colour"]
  def formfield_for_dbfield(self, db_field, **kwargs):
    if db_field.name == 'colour':
      kwargs['widget'] = ColourChooserWidget
    return super(ArticleOptions,self).formfield_for_dbfield(db_field,**kwargs)

The formfield_for_dbfield() function gets called for each of the fields in your model; for the one we care about (colour in this example), override widget in the kwargs and then carry on with the rest of the function, and that hooks it up.

That should be it; now, in the Django admin system, your colour field will use your ColourChooserWidget for editing.

Aaron Bockover’s Gong-a-Thong Lightbulb Talk Extravaganza

March 28th, 2008

The one, the only, Aaron Bockover points out how great LugRadio Live USA will be when it happens in just over two weeks. Modestly, though, he refrains from mentioning possibly the greatest part of it.

Yes, this year, Aaron himself will be taking the prestigious role of orchestrating the Gong-a-Thong, a blizzard of incredibly short four-minute talks. Last year at LRL UK this went down really well — it’s a perfect opportunity for people who don’t normally get the chance to speak to stand up and talk for a few minutes about what they’ve been doing. (Incidentally, if you’re coming to LRL USA and you want to spend a few minutes wowing people with stuff, or mentioning your latest project, or ranting and waving your fists in the air about software patents or the bash shell or something, we want you to come and do it — contact us and let us know.

Those of you who were at LRL UK, or have seen pictures, will now be grinning at the thought. You see, it’s called the Gong-a-Thong for a reason, and the reason is that the signal for the end of your talk is someone banging a big gong when time is up. And the person doing it, much like the guy at the beginning of the old Rank films, is all oiled up with a thong on. Jono’s got a bit more history on how he and I thought up the gong-a-thong, and he’s right about the sense of pride we felt last year. This year, Aaron has stepped forward to be the man with the beater and the shiny gold underwear. It’s gonna rock like Alcatraz.

Bockonegger

LugRadio Live USA schedule now available

March 6th, 2008

And now we have the schedule for LugRadio Live USA. Go and see and plan which talks you intend to watch!

LugRadio Live USA 2008 schedule

Internet Explorer 8 standards-compliant by default

March 4th, 2008

Dean Hachamovitch on the IEBlog:

We’ve decided that IE8 will, by default, interpret web content in the most standards compliant way it can. This decision is a change from what we’ve posted previously.

This is really good news. The previous decision that IE8 would be IE7 unless you specifically told it to be IE8 was one that I was really quite unhappy with; it ignited discussion all over the web developer world. The reason that this is really good news isn’t because IE8 will be IE8 by default (although that’s exactly what was wanted): it’s really good news because this is an example (the first example?) of Microsoft being prepared to break backwards compatibility in order to do it right. It’s an example of trying to take people who are doing things wrong and help them to move into a world of doing it right, rather than bending over backwards to help those doing it wrong and punishing those doing it right. That’s been Microsoft policy up to now, and I’ve always felt it to be penny-wise and pound-foolish; it keeps everyone working, but inhibits progress. This is a fundamental change in policy, based on the new Microsoft interoperability promise. And that’s a brave move by Microsoft.

The IE team are to be congratulated, because making IE8 default to being as standards-compliant as possible is going to make the web better; it’ll be easier to build web sites and web applications that work across browsers, and those applications will be able to do more things. That’s bad for lock-in, but it’s good for the web as a whole, and that’s important.

Dean Hachamovitch again:

Shorter term, leading up not just to IE8’s release but broader IE8 adoption, this choice creates a clear call to action to site developers to make sure their web content works well in IE.

What we need to do that is beta releases of IE8 that can be installed alongside previous IE releases. Nobody who’s an IE user wants to replace their system browser with a beta, because betas break — that’s the point of betas — but we do all want to test with them. Allow IE8 to be installed in some form of “standalone” mode in an official, supported, way. The IE team have said in the past that the existing standalone mode is not supported, but if we could have a supported standalone mode then testing is much more likely to happen, and testing is what we need here. (Note: “create a whole new Windows installation in a virtual machine and test IE8 there” is not really what I’m talking about here.) Working with the WINE team to allow IE8 to run under Wine would be pretty helpful, too, especially given that this change in IE’s direction is being driven by a promise of interoperability.

This bodes well for IE passing the newly-released Acid 3 test, too. Hixie describes how the WebKit team are flying ahead on Acid3 support, just as they did with Acid 2; since Opera are pretty good at supporting recent standards, and the IE team are not only prepared to make serious standards-based decisions but have already committed to passing Acid 3, the Mozilla team might end up being last to pass, which would be a headline they don’t want.

In short: well done IE team. Now let’s see IE8 kick some arse.

NetworkManager and phones and data plans

March 2nd, 2008

Dan Williams:

NetworkManager mobile broadband support…can most likely use your GSM mobile phone…if you add the appropriate stuff to the HAL .fdi file.

Blimey, that’s excellent. What would be required to get .fdi files for loads of phones into HAL by default, so it Just Works out of the box? For a given mobile phone model, will the serial port always have the same settings, or does it depend on who your phone company is and so on as well? It’d be brilliant to have this all working with no configuration required.

(PS. Dan, I couldn’t use OpenID to log in to leave this as a comment on your site; it didn’t recognise http://www.kryogenix.org/ as an OpenID for some reason.)

Better than Lego?

March 2nd, 2008

When I was a kid I played with Lego: specifically, Technic Lego, which is the one with the rods and cogs and whatnot. It occurred to me that it’d be pretty cool to have the Lego people be at LugRadio Live USA with a huge table covered in bits that people could go up and play with and use and look at. They can’t make it, though (it’s a long way from Scandinavia to San Francisco!). So, what are the cool kids using for building things now other than Lego itself? There was Fischer Technik when I was at school, but I’ve got no idea whether anyone still uses it; if this was LugRadio Live 1978 rather than 2008 then Meccano would have been good; what else is there? Nominate your favourite building stuff…

Four more beers

February 26th, 2008

Four years ago, four guys got together in a room in Wolverhampton and recorded the first episode of LugRadio. Since then, we’ve started running a yearly “rock conference” event in the UK, LugRadio Live, we’ve taken LugRadio Live international with the first US event, we’ve won an award for marketing, we’ve changed two of the presenters and then changed one of the replacements, we’ve gone to Guadec and PyCon and Guadec again, we’ve done nearly a hundred episodes, we were crowned “best open source podcast” by Linux Format, and we’ve built up a really cool community.

Four years, eh? I’m pretty proud of what we’ve done with the show. Thanks, all of you who listen and send in emails and come to LugRadio Live and post on the forums and hang around in #lugradio and make your own podcast about us and help us out with sysadmin stuff and run a mirror and talk about the show and enter competitions and laugh at the show on the bus. Here’s to four more.

Creative Commons coming to LRL

February 24th, 2008

Cool. Mike Linksvayer of Creative Commons writes about how he’s speaking at LugRadio Live USA and as a free bonus of making me feel proud, links to my writeup of the process of relicensing LugRadio episodes. Cheers, Mike! Naturally, if you want to see Mike and 40 other people speak, go and buy a LugRadio Live ticket now!

LugRadio Live USA registration is now open

February 21st, 2008

If you’re coming to LugRadio Live in the USA this year, you can now go and buy your LRL ticket! I can’t imagine that there are people reading this who don’t already know what LugRadio Live is, but you can read all about LRL to find out that we’ve got the cream of the open source community talking about their projects and their work and their thoughts for two days in San Francisco, on the 12th and 13th of April. If you pre-register there are, like, extra bonuses and prizes and stuff, and you can be sure of getting in (we’re a bit worried that we might hit the fire limit on the venue, so you want to buy a ticket!). Tickets for two days of glory are a practically-free $10 for the whole thing, too. Go thou and buy a ticket and buy a ticket for your friends. Do that now.

The other thing we’re concentrating on right now is exhibitors. We have a full schedule of speakers (and I’ll be publishing the schedule in due course so you can plan who you’re going to watch!), but we do still have space in the exhibition area. If you want to show off your project, or demonstrate the stuff your company makes, or just let people know about your cool technology, contact us and let us know what you want to do and how much space you’ll need.

Manchester free software group talk, Feb 19th 2008

February 18th, 2008

Tomorrow evening I’m speaking at the Manchester Free Software Group meeting: see their event page for details. I shall wave my hands a bit and chat about various things, including LugRadio and what I think about the way the free software community is, and start a discussion or two. See you there.

DRM-free downloads in the UK, redux: hooray for Play.com

February 17th, 2008

My ceaseless quest for DRM-free mp3 download files in the UK appears to be over!

A while back I tested Amazon’s mp3 store, which was fine except that you have to be in America. Fail. However, Play.com have just opened a similar store in the UK. As usual, my canonical test song for these things is Feelin’ Good by Nina Simone, and…I’ve just bought it from Play. As before, I have a list of requirements for these services:

  • I can download one track, instead of a whole album; I don’t want ten Nina Simone songs, I just want the one I’m looking for - PASS
  • No DRM. None. I don’t mind what the format is, if there’s no DRM, as long as it can be played on Linux (which is pretty much everything). Bonus points for oggs. Half a bonus point for just plain mp3. - PASS
  • A track costs a pound or less. I’m not paying more than a quid for one song. - PASS (99c is about 50p)
  • I feel comfortable putting my credit card number into the site. This means, in practice, that if it’s called something like mp3downloads.haxx0r.ru, I am not interested. - PASS
  • I can just buy a song by putting my credit card number in and getting it for download. I don’t need to sign up for an account, give them all my details, none of that. - FAIL
  • My music tastes aren’t very eclectic, so I’d expect the service to carry most of what I’d want to listen to. This means that a service for one label alone isn’t really what I want. I don’t want to discover new music with this; I want to get the stuff I already know about and want to listen to. - PASS
  • I’ll get, probably, about five songs a year. So a subscription service is out, especially since with most of them your music stops working when you unsubscribe. - PASS

As with Amazon, Play fail on the “don’t need an account” idea. However, there are two extra thoughts concerning that:

  1. They let you re-download the track later (an indeterminate number of times, depending on the record company) if you lose it or delete it. This is a good feature, and I can’t think of a decent way of doing it without some sort of authorisation process.
  2. I have mailed them with a suggestion. If someone’s just buying downloads, why not have a “buy this without signing up” button, which just asks you for all the information that’s required on the “buy it” screen? (You can’t just enter a CC number; they need billing address and so on for the credit card companies, more’s the pity.) Then, quietly sign them up for an account under the covers, and when you send the “you have bought a download, go here to download it” email, say “oh, and we signed you up for an account, with password GF78F$0.Fsf;” and they can use it or not care. No idea whether the Play people will take this suggestion or not, though.

Anyway, it works. I can get songs and listen to them. Well done, Play. That will do nicely.

Fix embedded YouTube videos for Gnash users

February 15th, 2008

I use Gnash instead of Adobe Flash, because it’s open source, and because I largely don’t miss Flash. The one thing I would miss, though, is YouTube. However, Gnash (in Ubuntu gutsy), while it works fine at displaying videos on YouTube itself, doesn’t work on embedded videos (where someone puts the YouTube video on their own site). GreaseMonkey to the rescue; this very short GreaseMonkey user script simply replaces embedded YouTube videos with a big link to the appropriate YouTube page, so I can click through and watch the video. Only useful for people who are as lunatic as me about freedom but still like YouTube, which might be an audience of one.

Clicking it should allow you to install it, if you’ve got GreaseMonkey installed already in Firefox; Epiphany users with GM enabled should right-click the link and say Install User Script.

youtubepopout.user.js

generated-toc: Generate a Table of Contents with the DOM

February 12th, 2008

More excitement from the Stuart House Of JavaScript Stuff: generated-toc: Generate a Table of Contents with the DOM. A very easy way to get a table of contents onto your documents: generate a table of contents using JavaScript.

A big thanks goes out to the organisation who funded this work, who I can’t name. Getting stuff like this out into the world is a good thing, and them allowing me to open-source it is better still. Good work.

Video thumbnails for MythTV

February 11th, 2008

My MythTV box has lots of TV episodes on it, as well as films. The MythTV people have got films all sorted nicely; there’s a thing which looks up the film on IMDB, grabs the plot and the cover art, and makes your list of films look all pretty. However, you can’t do that for episodes of TV shows, or random bits of video; they don’t have DVD cover art, unsurprisingly. Lots of people have come up with the idea of using a thumbnail taken from the video as artwork, which is fine, but most people using MythTV are using mplayer to do the thumbnailing (and play videos). Mplayer doesn’t work on my MythTV box (it crashes X), so I use VLC. VLC can theoretically create thumbnails, but I can’t get it to work properly, so I’ve written a script which does it with totem-video-thumbnailer.

(myth-thumbnailer.py — download)

#!/usr/bin/python
import MySQLdb, os, re

if not os.path.exists("/usr/bin/totem-video-thumbnailer"):
  raise "This script requires totem-video-thumbnailer"

# read DB connection parameters
fp = open("/etc/mythtv/mysql.txt")
DB = {}
for line in fp:
  if line.find("=") != -1:
    k,v = line.strip().split("=",1)
    DB[k] = v

required_keys = ["DBHostName", "DBUserName", "DBName", "DBPassword"]
for k in required_keys:
  if not DB.has_key(k):
    raise "Missing MySQL connection detail: %s" % k

# connect to database
con = MySQLdb.connect(DB["DBHostName"], DB["DBUserName"], DB["DBPassword"], DB["DBName"])
crs = con.cursor()

# get location where thumbnails are stored
sql = "select data from settings where value = 'VideoArtworkDir';"
crs.execute(sql)
VIDEO_DIR = crs.fetchone()[0]
# get all files without covers
cmd = 'totem-video-thumbnailer -j -s 600 "%s" "%s" >/dev/null 2>&1'
sql = "select intid, filename from videometadata where coverfile = 'No Cover';"
crs.execute(sql)
VIDEOS = []
while 1:
  data = crs.fetchone()
  if not data: break
  intid, filename = data
  parts = filename.split(os.sep)
  output = re.sub("[^a-z0-9_]","_","_".join(parts[-2:]).lower()) + ".jpg"
  full_output = os.path.join(VIDEO_DIR, output)
  if os.path.exists(full_output):
    pass
  else:
    cmd_exec = cmd % (filename, full_output)
    print "Thumbnailing", os.path.split(filename)[1]
    os.system(cmd_exec)
    VIDEOS.append((intid,full_output))

sql = "update videometadata set coverfile = %s where intid = %s limit 1;"
for intid, thumbnail in VIDEOS:
  crs.execute(sql, (thumbnail, intid))
  print "Added %s to database" % thumbnail

Touchscreen on both sides

February 8th, 2008

Someone should make a mobile phone which has a touchscreen on both sides (front and back), with one being the phone stuff and web browsing and the other side being music. If you get a move on you’ll be able to have it out by August when I need a new phone. Touchscreens make sense as an interface to me, despite what Nokia say and despite lack of tactile feedback. I don’t like my Nokia E50; it keeps running out of memory when I try and do things like play music and browse the web at the same time. Six months of research ahead, hooray; don’t want an OpenMoko Neo because the device itself is clumsy, don’t want an iPhone because I don’t like the restrictions, don’t want the LG Viewty because the OS is horrific, don’t want the Samsung Armani because I can’t read books on it or browse the web properly, blah blah blah. If I wasn’t so picky about this stuff then I’d be a lot better off. Android is coming, though, and the OpenMoko OS is coming too; might be possible to have an open source phone by August, if I’m lucky. Something to look forward to, there.

There can be no FUD

February 8th, 2008

Ben Darlow accuses Bruce Schneier of spreading FUD about the iPhone.

This isn’t lock-in, it’s called choosing a product that meets your needs. If you don’t want to be tied to a particular phone network, don’t buy an iPhone. If installing third-party applications (between now and the end of February, when officially-sanctioned ones will start to appear) is critically important to you, don’t buy an iPhone. It’s one thing to grumble about an otherwise tempting device not supporting some feature you would find useful; it’s another entirely to imply that this represents anti-libertarian lock-in. The fact remains, you are free to buy one of the many other devices on the market that existed before there ever was an iPhone.

Ben, I’m not sure how it’s possible for “lock-in” to exist, if that’s your necessary condition for it. That’s got nothing to do with iPhones. Don’t like how Microsoft lock you in with Exchange and Outlook? You should have chosen different mail programs. Don’t like how you’ve been locked into the iTunes Music Store because you’ve got an iPod? You should have bought a different music player. Don’t like how you’ve been locked in to anything? Shoulda bought something else, dude. Lock-in doesn’t exist. We are never forced to do anything. We have always been at war with Eurasia.

Your iPhone comes with a complicated list of rules about what you can and can’t do with it. (Schneier)

Now I’ve been looking through the exquisitely arranged packaging that mine came in and I’m still struggling to find that list! Perhaps it’s written in black smallprint on the underside of the lid? You know, the lid that’s black?

Nope, it’s better than that. It comes with a complicated list of rules about what you can and can’t do with it and you’re not allowed to see the list. For one example: you can use your Bluetooth headset to make calls but not listen to music. That’s a rule: I’d actually prefer it if it said that on the box, but it doesn’t. You get to buy it and then find out that it doesn’t work, or you get to research all the things you might want to do online first. Don’t get me wrong, the iPhone’s a lovely device; it’s pleasurable to hold and enjoyable to use, which is not something you can say about very many bits of electronic equipment at all. For 90% of the people who want it and don’t want anything more, it’s perfect; it’ll read their email, browse the web, and make phone calls. The complaints that people who complain about it have pretty much boil down to how arbitrary-seeming the restrictions are. What was all that crap about how iPhone-native apps might overwhelm the cell network, eh? Since the iPod touch also needs jailbreaking, that was clearly bullshit. Still, apps are coming, so perhaps that’ll make it all better. There are plenty of people who hate the iPhone, and Apple, way more than they deserve, but there are equally plenty of people who flat-out refuse to hear a word against the device or anything else that comes out of Cupertino. If you’re somewhere in the middle ground on this, like most people are, and you’re prepared to put up with the restrictions that Apple put on you to get the good experience they provide, you go for it. If you get fucked, then that’s the way it is, but hey: sometimes being fucked is nice. That’s why the human race still exists, after all.

Five things you don’t know about me

February 7th, 2008

That git Steve pokes me with the latest trendy meme (which is not actually latest as I think it got started some time in the Middle Ages), and I do believe I got similarly poked by Matt Revell on the same subject a while back. So, five things you don’t know about me. I ought to note that I don’t think that there are five things that no-one knows about me, so you may know some or all of these.

  1. I have ankylosing spondylitis, a “chronic, painful, degenerative inflammatory arthritis primarily affecting spine and sacroiliac joints, causing eventual fusion of the spine”. The painful bit is certainly right; the medical stuff I take on trust. So, y’know, thanks a lot for that, Dad. It’s an autoimmune disease, which is a term you never hear except on House where they say it all the time, although on that programme they all have some kind of horrible serious thing that’s going to kill them in two hours.
  2. I’m moving jobs. In mid-March I leave Mills & Reeve, the law firm where I’ve worked for eight years, and I go to GCap Media, who own loads and loads of commercial radio stations. I’m pretty excited about this.
  3. I was interviewed on BBC Radio Norfolk once, along with Kam, Natalie, and Urgit, about alt.fan.eddings.
  4. I can roll my tongue. Apparently it’s genetic; only some percentage of the population can do it. No idea why this is a useful genetic talent, although Richard Dawkins probably has a theory that it’s all to do with making me more sexually attractive to women to increase my chances of passing on my genes or something.
  5. I haven’t seen any of the first three Star Wars films (that is, the last three in creation date but the first three of the nine, if you see what I mean). Just never got around to it. People keep telling me that I should do, and I just can’t be arsed with it.

Is anyone else tempted to just make shit up in these things? “I am really Harlan Ellison.” “I can suspend myself from a ledge by one finger.” “I have a third eye in the back of my head.” “I can haz cheezburger.” It’s pretty tempting.

I’m supposed to tag other people. Don’t break the chain, etc, etc. To be honest I think this stuff gets made up by demons who are determined to make the human race endure the psychic pain of trying to think of things which are simultaneously (a) interesting (b) secret (c) not too secret. I mean, if I was really a Russian spy or had a third bollock or something, am I likely to talk about this on the internet? Nonetheless, it is now my solemn duty to make five people suffer as I have suffered. I think we’ll have Aquarion, Christian Heilmann, Mr Ben, Sam Rowe to see if he’s still alive, and Davyd Madeley.

LugRadio Live UK dates announced

February 7th, 2008

What with all the excitement over here in LugRadio Towers about the upcoming LugRadio Live USA (April 12th-13th in San Francisco! Cool speakers! An exhibition of greatness! You can’t afford to miss it!), some people might be thinking: have we forgotten about the UK? And the answer is, hell no. LugRadio may be going international this year for the first time, but we’re still here in the UK as well. I am pleased to be able to say that

LugRadio Live 2008 UK will be happening on the 19th and 20th July, in the Wolverhampton University Student Union, Wolverhampton, UK!

We’re pretty heads-down sorting out the US event at the moment, but if you’re interested in speaking or exhibiting at LRL UK this year, let us know — the big push for this will start when we get back from America. European and UK people: Get ready.

Another year passes

January 30th, 2008

I get up each morning, dust off my wits,
Pick up my paper, and read the “Obits,”
If my name is missing, I know I’m not dead.
So I eat a good breakfast, and go back to bedgo to work, depressingly enough.

Actually, I am not that old. I am today, however, another year older! Traditionally you all get to guess my age, and this year is no exception. In the past I’ve been complained at for always making the quizzes mathematical (Well, duh. You are guessing a number. What were you expecting?) and so this year we have two separate tests. Also, there are points. I have a high opinion of my readers* and thus I feel confident that you’ll do well here.

As of today, and for the next 365 of your Earth days, my age is, in decreasing order of difficulty to work out:

Quiz for maths people, people who wear glasses, or people who consider themselves clever*

  • the Saros number of the solar eclipse series which began on September 24, 1957 BC and ended on March 10, 460 BC
  • the smallest number n with exactly 7 solutions to the equation φ(x) = n
  • the atomic number of germanium
  • 273.15K in Farenheit
  • the fifth power of two
  • my age in 2004 plus four

Quiz for thick people, liberal arts majors from the US, people who work in MacDonalds, and Jono

  • the number of variations in Bach’s Goldberg variations
  • my age in 2006 plus two
  • 32

If you got down to the bottom of the quiz most appropriate to you and still don’t know the answer, try the other quiz. If you’ve done both and still don’t know the answer, then your shipment of fail has arrived in style and you should give your computer back since I’m surprised you’re able to operate it. I’ll take it off your hands tomorrow; today I’m too busy enjoying my birthday. It started rather well, but now I’m at work. Still, we all have our crosses to bear, especially those who still don’t know how old I am.

Same age as Christ was when he was crucified, allegedly, although I thought that was next year. If the stigmata* show up I’ll be sure and report it.

Firefox usage at 28%

January 29th, 2008

Blimey. According to Wired’s report on a “well-regarded as being accurate” XiTi survey, IE usage in Europe is at 66%, with Firefox second at 28%. Safari and Opera are both under a twentieth of the browsing population. Interesting stats, although all browser statistics are unreliable. I occasionally forget to stick my head out of the overheated greenhouse that is the web hacker community; looks like in the real world, Firefox is doing pretty well! Good work the FF team.

LugRadio Live USA: call for papers

January 28th, 2008

We are now 74 days away from LugRadio Live USA at the Metreon in San Francisco, and the Call For Papers is open! We’ve already confirmed some great speakers — Jeremy Allison, Aza Raskin, Val Henson, Ben Collins, Ian Murdock, John “Magnatune” Buckman, Robert Love, Dan Kegel — but we want more. If you want to speak at LugRadio Live, and you can be in California on the 12th-13th April this year, we want to hear from you. Drop us a line before Friday 15th February and tell us what you want to talk about!

We’re collecting names of exhibitors, too. This year we’re really keen to get some cool stuff into the exhibition. If you’re part of a project and want to demonstrate it, or you’ve got some cool technology you want to show off, or you think people would love to see what your company does, get hold of us and let us know. Exhibition space is free, too!

To find out more about LugRadio Live, take a look at the website and what is LRL?.

Media players and the TV

January 26th, 2008

I’ve spent a while trying to get Elisa to work on the computer attached to my TV (a PPC Mac Mini running Ubuntu). Video was slow and jerky, and there was a strange white bar graphical glitch. Anyway, after fighting all day with it, compiling the latest version of Elisa and so forth, I eventually gave up and installed MythTV. And it works perfectly.

I don’t really want MythTV. I prefer GStreamer-based applications, because I think GStreamer is the way forward, and Myth does a mountain of stuff that I don’t want, like watching live television; all I want to do, for the moment, is watch recorded video files. I like Elisa’s interface more than Myth’s. I’m more able to write Elisa plugins than I am for Myth.

Still, Myth (using VLC as the playback program) works fine, and Elisa doesn’t, and I don’t think Elisa will get better; it seems that the problem might be the open source ATI drivers, which aren’t (apparently) as good as the closed source ones. I can’t run the closed source drivers, though, because they don’t exist for powerpc, which is what the Mac Mini is (even ignoring that I don’t want to run them because they’re closed source). So MythTV it is. There is probably a lesson here.

Making the arrow keys work in VLC

January 26th, 2008

One of my big flaws with the VLC media player is that you can’t use the arrow keys to skip backwards and forwards in a video. It turns out that this is because the left and right arrow keys are already configured to mean “navigate around a DVD menu” and you can’t configure a key twice. So, if you need to use VLC for something, and you want the arrow keys to work, go into the settings and set the DVD navigate options to something other than Left and Right. Then configure “jump forwards” and “jump backwards” to Right and Left, and then it’ll work. God knows why it has to be this way, but at least if you do that it works.

DVD slideshows under Linux

January 16th, 2008

Philip Newborough notes that in the last LugRadio episode I said that I planned to release more odd bits of software. (He also illustrated this with a snippet of audio from the show; since we’re trying to relax our licence to allow this sort of thing, it’s great that people are taking advantage of that!) The problem I outlined on the show itself is that I write lots of little bits of software for me, but I don’t release them. They’re not generally applicable or easy to install: they’re not designed to be polished, public-friendly software in any way. Now, I’m a huge opponent of this. There’s a pervasive myth among non-Linux users that all the software on the free desktop is complicated and thorny and command-line driven, and it requires you to edit configuration files and compile it yourself. It’s not like that, not at all, if you don’t want it to be. However, these little bits of software I write purely for myself are like that; they’re not for general distribution. So, I don’t release them, because I don’t want to add more fuel to the fire for the sneering hordes who say that Linux is hard to use. Over pizza earlier this year, it was brought home to me that that might not be the best idea; even though these little hacks aren’t useful to the general population, they might be useful to someone. So, my resolution, if I have one for this year, is to get more of this stuff out there.

Update: Greg Grossmeier is doing the same thing after I talked about releasing scripts on LugRadio. That’s really cool; it’s lovely to hear when people go with a suggestion!

The first one is a thing to create DVD slideshows under Linux. My dad said to me over Christmas that a friend of his would, on return from holiday, give out DVDs with all the photos from the holiday on in a nice little slideshow that you could watch in your DVD player. Was it possible, he asked, for him to do the same thing on his (Ubuntu) desktop? Of course, said I, and then started looking into how to do it.

The base way that everyone does this on Linux is with the dvd-slideshow shell script, which uses tools like mplayer and so forth to do the work. There are GUI clients for it but they’re all really complicated; what you want ideally is something where you just drag photos into it, select transitions if you want to, and click the “go” button. There’s also an extension for F-Spot, but it’s not actually distributed with F-Spot yet and my dad doesn’t use F-Spot anyway. (There isn’t an extension that does this in a sane way for digikam, as far as I can tell.) I at first sat down to my keyboard thinking that I’d write a nice PyGTK + GStreamer application that would do this right, before discovering that you can’t really take a load of photos and make a nice slideshow out of them with GStreamer. (You sort of can, with multifilesrc, but not really; you can’t feed it arbitrary files, it doesn’t do transitions, etc.) Then I thought: I’ll do a nice application that wraps dvd-slideshow, and then I couldn’t be arsed.

So instead, I wrote a script for my dad: make-dvd-slideshow.

The way this script works is that you hardcode the name of a folder into it. It looks in that folder, makes all the images in that folder into a slideshow, adds an mp3 as a soundtrack if it finds one in the folder, and then drops the resulting .iso file onto your desktop ready for burning. You’ll need to change at least FOL="/home/aquarius/Desktop/Olivia Party 2" to be the location of the magic folder (I put one on my dad’s desktop, called “DVD Slideshow”, and hardcoded it into the script) and then run the script (I put a launcher on his desktop, in that folder, which launches the script in an xterm). Enjoy this: if you think it sucks then I’d love to see someone write something better, and tell me about it when you do; if you want to write something better but aren’t sure how to do it then I’ll happily write you a spec of how I think it should work :-)

Odds and sods again

January 16th, 2008

A random collection of things that I don’t have enough time to properly write about but which ought to be noted for future reference:

  • All sorts of news in the world of Humanized. Enso is now free to download, although disappointingly not Free Software. However, Jono di Carlo has left a comment suggesting that that might happen; my fingers are crossed. I’d love to see Humanized and the free desktop in partnership, because I think their work is excellent, and we have a dearth of good usability engineers. Another potentially great move in this direction is that Mozilla Labs have hired some of the Humanized engineers.
  • We’ve announced dates for LugRadio Live USA: come to the greatest show on earth on April 12th and 13th 2008 in the Metreon, San Francisco. I’ll shortly be allowing people to register for the event; at the moment I’m trying to decide precisely how to do it. Paypal’s a pain (because they hassle you to create an account if you don’t have one), Google Checkout requires you to have a Google account as far as I can tell: any other suggestions for how to do online registration are welcomed.
  • Adam Jackson writes that the phrase “Linux is about choice” is holding everything back: “It strangles the mind and ensures you can never change anything ever because someone somewhere has OCD’d their environment exactly how they like it and how dare you change it on them you’re so mean and next time I have friends over for Buffy night you’re not invited mom he’s sitting on my side
    again.” I couldn’t agree more, I really couldn’t. Well said, that man.
  • Stuart Colville (currently fourth in a a Google search for “stuart”, one place behind me, ahaha, take that, Colville!) writes about the new Macbook Air and compares it unfavourably to the Eee PC. I’m a big fan of the Eee, because Asus have the right idea; there are lots of similar sub-notebooks coming out which all have the idea “we need to make a small notebook” but don’t have the idea “and we need to not charge a thousand pounds for it”. I know lots of people who have bought an Eee, precisely because it’s two hundred pounds, and it’s actually a really nice machine. We were keen on it on LugRadio, too (and don’t forget that we’re giving an Eee away; go enter the competition. Good work Asus, I say.

Is it my fault?

January 9th, 2008

Jeremy Keith writes about where the fault lies:

If I’m on the tube listening to my iPod—because, y’know, that’s exactly the kind of situation for which the iPod was invented—and somebody steals said iPod, which is illegal, is that my fault? If I publish my email address online—because, y’know, I actually want people to be able to get in touch with me quickly and conveniently—and it gets harvested by scum-sucking spammers who send unsolicted commercial email, which is illegal, is that my fault? If I utter my date of birth or my mother’s maiden name—because, y’know, I don’t believe that information should be a state secret—and somebody uses that information to “steal my identity”, which is illegal, is that my fault?

Nope. None of those things are your fault. In a similar way, another Jeremy, Top Gear presenter Jeremy Clarkson, published his bank details in a newspaper in an attempt to prove that the furore over the UK government losing the personal data of 25 million people was a storm in a teacup. Of course, someone used those details to set up a £500 direct debit to a diabetes charity, so he’s now a monkey out of pocket. That act is basically theft; theft is illegal. Was that Clarkson’s fault? No, not really. He wasn’t at fault. What he was was imprudent, deeply so. (And deservedly so, I feel. Clarkson is one of my favourite presenters, and I have boundless respect for his knowledge of cars and engineering and his personal style; he knows a round brown fuck-all about technology, though.)

Look, it works like this. If you believe that the world should be open (which I do), then you can’t insist that if someone takes advantage of that openness, it’s Someone Else’s Problem. It’s your problem if they take advantage of your data. If you want to be open, to publish, to break down barriers that stop us properly communicating, then that’s a great idea… but each person then becomes individually responsible for their own security. On the other hand, if you want someone else to make the hard decisions for you, to accept liability and take responsibility for problems, to protect you so you can go about your life unscathed, then that someone else gets to make the decisions about what you do with your data, and you don’t.

If you ask your bank “should I publish all my bank details online?”, they’ll say: no, don’t do that. If you ask the police “should I leave my iPod visible on the tube?”, they’ll say: no, don’t do that (and that’s what the “byepod” posters are all about). If it’s the police’s responsibility to keep your iPod safe (by tracking down criminals who steal it) then they get to have some measure of control over what you do with it.

If you demand the ability to do what you like with your stuff, then you have to take on some of the responsibility for protecting it. It can’t work both ways; you can’t have all the benefits of openness (I can publish my email address where I like!) and none of the deficits (someone else must solve my spam problem!). With great power comes great responsibility, as Uncle Ben tells us. It’s not about blame, it’s about prudence. It’s not about taking decisions out of fear, it’s about taking responsibility for life. We’re all grown-ups now. No more hiding under the bedclothes and letting Daddy protect you from the big bad world.

Epiphany download icon

January 8th, 2008

Did you know that Epiphany puts a little icon in the notification area while it’s downloading stuff?

epiphany download icon

Well, you might have mentioned it to me, because I didn’t know. Anyway, that’s really cool. A couple of minor issues with it; firstly, the icon has a right-click menu with only one option, “Show downloads”. Since left-clicking the icon shows and hides the download window, I can’t think what the point of the right-click context menu is; surely right-click should just do the same thing as left-click? (Bug #508151 submitted.)

Secondly, and not really an Epiphany problem; I’d love to see the “downloads” window go away, to be replaced by a “Downloads”