Category: Uncategorized (Page 3 of 4)

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

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?

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.

[Update: Put your name towards something more reasonable: the Campaign for Real Time!]

Continue reading

The Golden Rules of Version Naming

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

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

[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

[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!

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…

Channel Zero

A couple of years ago, when IMP (“what later turned out to be the BBC iPlayer”) was still in closed previews, and I started building my over-complicated watch-PC-on-TV setup, I formed the opinion that the future of TV was not “Digital”, it was “Internet-based”. An article in Saturday’s Grauniad suggests that things are still heading in that direction, and reminded me of my prediction that the “channel” as we know it will not be with us much longer.

Continue reading

Cadbury goes Fair Trade!

I’ve always felt that the real mark of success for Fairtrade, and particularly Fairtrade chocolate, would be if an existing and successful brand was “converted” to Fairtrade – mainly so that the product would be a great chocolate bar first, and Fairtrade as it happens. But I wasn’t going to hold my breath in this age of Capitalism Supreme.

So I was pleasantly surprised when I walked into my local Co-op on Saturday, and saw a bar of Cadbury’s Dairy Milk bearing the Fairtrade logo! Continue reading

« Older posts Newer posts »