rwec.co.uk

Rowan's World, Et Cetera

Without delegation, OpenID is all wrong

by Rowan - August 15th, 2010

I really want to like OpenID, but the more I find out about it, the more I begin to hope it fails, so that something better can emerge.

The idea, as I originally came upon it, appealed: “you already have identities you can prove are yours, in the form of URLs – why not use them as a universal sign-on?” And obviously, the main URL I control is this one – http://rwec.co.uk – and OpenID allows me to use that identity without having to run my own identity server. This is called delegation, and lets you “delegate” your own URL to another identity (that is, another URL), on a server that’s set up to do the OpenID negotiation.

To me, delegation is the single most appealing feature of OpenID – if this is to be my “one identity to rule them all”, I don’t want it vulnerable to supplier lock-in, and the fact that http://rwec.co.uk is my property guarantees me continued control. But when I started looking into the details earlier, I was confused, then dismayed, at how much of a poor relation delegation has become in the OpenID world.

Continue reading »

Why object references are confusing, and what to do about it

by Rowan - August 15th, 2010

A recent blog post from my old friend Phil1 discussed some of the gotchas of parameter passing in object-oriented languages – or I suppose specifically in partially OO languages, since the problem in this case was a combination of objects and structs in C#.

It seems to me there is a genuine problem here, beyond programmer fallibility – the old distinction between “pass by value” and “pass by reference” is no longer a useful distinction in such languages, and someone needs to design something better.

Continue reading »

  1. well, vaguely recent: I really should get with this whole RSS thing! []

A letter to my MP regarding government policy on Internet Explorer 6

by Rowan - August 1st, 2010

The below is a letter I have just e-mailed to my MP, the Liberal Democrat Stephen Lloyd, as a response to the recent response from HM Government to a petition regarding the continued use of IE6. I think this is an important issue, and one to which the current response is insufficient.

Continue reading »

Having it Both Ways: the Two-House Solution to Electoral Reform

by Rowan - May 19th, 2010

Much has been made of the fact that Gordon Brown was never elected; but the fact is, under our current system, no Prime Minister is elected. In fact, our system makes no explicit provisions for individual voters wishing to express their preference of government, only an indirect message via their collective selections for parliament. Discussions of electoral reform tend to either ignore this dichotomy, or suggest messy compromises that no-one really supports, rather than confronting it head on and coming up with a truly creative solution.

Continue reading »

Daylight Savings Time: a White Lie, or a Waste of Time?

by Rowan - April 5th, 2010

Every six months, I get a little more passionate about the pointlessness of Summer Time – or, as it is ridiculously known in some parts of the world, “Daylight Savings Time” – the practice of telling everyone to change the time on their clocks twice a year, as a trick to make them get up at a different time. There’s even talk of changing the time zone for the whole of the UK, based on the same flawed reasoning. It seems like on every other issue, politicians are promoting choice, and informing the public, but when it comes to what time we have to get up in the morning, they’d rather hide behind an out-dated lie.

Continue reading »

The Golden Rules of Version Naming

by Rowan - February 28th, 2010

I’ve been pondering version numbers a lot recently – there’s a lot of new “libraries” and major upgrades going on at work, and I’ve seen a few examples “in the wild” lately of people having to choose version numbers – and not always getting it right. It may seem like it’s “just a label”, but give something the “wrong” version number, and you can cause a lot of unnecessary confusion, as people will make assumptions based on it.

By an interesting coincidence, just as I was thinking about this post, I came upon Tom Preston-Warner’s “Semantic Versioning Specification”, which covers some of the issues nicely. But while he is mainly considering the problems of “dependency hell” – very important to consider when writing a library or tool which is likely to become a dependency for some other project downstream – there are wider issues with what a version number means to people, even if you are making a desktop application for use by “ordinary folks”.

So, here are my “Golden Rules of Version Naming” – as with everything in life, they are often mutually contradictory, and full of exceptions; life is all about compromise, but that doesn’t mean you have to compromise everything.

Continue reading »

The Non-Semantic Web: A blog entry is not a database

by Rowan - January 31st, 2010

There has long been a hope – an expectation, even – that the Web will somehow develop into something “smart”; that it will move from being a mere store-house of information to something that will actually “know the answers”.

But the vision tends to overlook the nature of both computers and humans. On the one hand, humans have a limited memory, and a flawed ability to apply consistent logic; on the other hand, we have abilities at creatively interpreting knowledge and ideas that are far beyond the capacity of any computer so far designed.

Continue reading »

Atomic Translations – Part 2 – Translated Text as a Data Type in PostgreSQL

by Rowan - December 12th, 2009

[Part 1: Database i18n as a Data Type Problem | Prototype Postgres Library]

In my last post (longer ago than I intended), I discussed the approaches I’ve come across to adding i18n to a database schema, and outlined my theory that the whole problem could be recast as one of data types. In order to explore how this would work in practice, I’ve put together a prototype “library” using only a standard install of PostgreSQL that shows how simple it could be, and why it makes sense.

Continue reading »

Atomic Translations – Part 1 – Database i18n as a Data Type Problem

by Rowan - November 23rd, 2009

[Part 2: Translated Text as a Data Type in PostgreSQL | Prototype Postgres Library]

The most obvious task when making any application multi-lingual is to make the UI translatable; there are absolutely tons of options for this, libraries in all sorts of languages, recipes, discussions, etc. But for many applications there’s another task, just as important, which is taking a database, and allowing someone to translate the data inside that.

There are various approaches to “database i18n” too – generally involving re-designing your schema in such a way that the translations are to some extent part of the “normalised” data. But these tend to make the schema somewhat unwieldy, and writing ad hoc queries and reports becomes tricky. So it occurred to me that if you treat i18n not as a schema problem, but as a data type problem, you could save some of that pain.

Continue reading »

A script for rotating digital camera videos!

by Rowan - September 20th, 2009

A while ago, after flickr launched the ability to upload “long photos”, I shot a clip of waves crashing on the beach, and wanted to share it. But there was a catch: being taken on a compact camera, it felt perfectly natural to turn it upright, and shoot the video in a “portrait” orientation. So, like a lot of my photos, it needed turning 90° clockwise – but unlike a photo, there was no obvious way to do this.

I hunted around at the time, and found that while plenty of players can transform video during playback (my copy of VLC seems to have got stuck, and now rotates everything!), few video editing tools could save a rotated video. I finally managed it with a power-utility which required me to import the video, tweak a large number of output options I didn’t understand, and hope the result wasn’t too mangled. Hardly ideal.

But while reading up on it, I discovered that most digital cameras – including my Casio Ezilim EX-Z1050 – shoot videos in a format called “Motion JPEG” or “MJPEG”, which is basically a bunch of JPEG pictures stuck together. So if I could extract the images from the video, they should be easy to rotate, and all I’d need to do was stick them together again…

Well, yesterday I was playing with lossless image rotation using jpegtran, and then managed to find MJPEG tools – a bunch of commandline tools for manipulating MJPEG data, actually designed for video capture utilities. And guess what? It works! I can split the AVI file from my camera into a bunch of JPEGs, rotate them, and stitch them back together, with minimal loss of quality!

Oddly, the biggest sticking point was sound – the mjpegtools utilities can’t see the sound stream in my source files. In fact, the only utility I could was FFmpeg, which at over 10 times the size of all the other tools put together is like the proverbial sledgehammer to the sound streams nut.

So, with my meagre Windows batch-scripting skills, I’ve put together something which might, just about, be useful, and called it VidRotate. Go forth, download! But beware – I make absolutely no guarantee that it won’t blow your computer up at this stage…