Posted on 11-03-2009
Filed Under (diary) by Pete

I got a package from Dabs today:

bigbox

You'd think I must have ordered something pretty big, right? Think again:

emptybox

That's a desktop microphone and a USB sound card. If they'd packaged them correctly they could have just posted them through the letterbox!

Thankfully this isn't as bad as Dez's package from Scan which filled a box about that size with mostly bubble wrap, the payload being a 2GB SD card. But it still defies common sense.

(0) Comments    Read More   
Posted on 25-02-2009
Filed Under (computing, diary, meta, thinking aloud) by Pete

Discounting the last week, my last blog post was on 24 October, then 3 July, then 18 April. Prior to that I was posting a couple of times a month. So what happened to my blog in 2008?

I started using Twitter.

Twitter has been getting some mainstream press lately, mostly though celebrities using it — especially Stephen Fry and Jonathan Ross. As with any new communication medium people are asking: what exactly is it good for? On the Twitter website the synopsis is: "What are you doing?" Well, that doesn't quite describe how I use it. Here's what I use it for.

I use Twitter for semi-realtime conversations.

It may have started out as "What are you doing?" but really, that's just the starting point. Sometimes you really do say what you're doing and if your friends find it interesting, they can comment on it. And not only what you're doing — what you're reading and thinking too. I made only two "QOTD" blog posts last year because I was using Twitter to point these out instead.

Using TwitterFox, which makes my followings instantly available, it's more immediate than a blog and its comments which you have to dive into a feed reader to follow. It's also more uniform than blogs-with-comments, in the sense that the original message and its replies have the same status — they are both just tweets, whereas a blog post is somehow more important than the comments attached to it.

But at the same time it's less immediate than, say, Milliways, or IM. There was a gaping hole between realtime chat and blogging in terms of immediacy and Twitter fills that gap, which I think is why it's so popular. Nobody really wants to know what you are doing every minute of the day and of course letting them know can be dangerous. But it's for sparking discussion and carrying it on, in a way that's in the present yet not demanding that you pay constant attention.

(2) Comments    Read More   
Posted on 21-02-2009
Filed Under (Uncategorized) by Pete

On 19 January I sent the following letter to my MP via WriteToThem:

Dear Alan Williams,

It has come to my attention that a Bill is being pushed through Parliament, namely the Coroners and Justice Bill, containing a clause, namely clause 152, amending the Data Protection Act (DPA). This clause would create a new type of order, Information Sharing Orders, which is explicitly a loophole in the data-sharing restrictions in the DPA that essentially render it meaningless.

Specifically, the extra clause 50B(1) enables department heads to relax or tighten any restriction on information sharing at its convenience. Given the Government's inexcusable losses of individuals' private records, for example its loss of CDs in the post containing the unencrypted details of millions of Child Benefit claimants, I no longer trust the government to keep my data private. I certainly cannot accept any law which would allow my data to be shared with anyone the Government chooses, which is what this amendment amounts to.

The added clause 50B(1)(d) also allows an Information Sharing Order that amounts to a gagging order, apparently without restriction. This makes moot the Prime Minister's decision the other day not to hold a vote on the Bill which would have enabled MPs to conceal their expenses, an issue on which I have already written to you in protest.

Of even more concern is clause 50B(2), which would allow the head of any Government department to create new summary offences by order. This makes a mockery of the rule of law and demonstrates the Government's contempt of it. If this bill passes intact, I shall have to emigrate as the UK will no longer be somewhere I can feel safe. In a liberal democracy the government should live in fear of its citizens, not the other way around.

The Coroners and Justice Bill simply cannot pass as it is now. It must be amended to remove clause 152, or it will no longer be possible to call the United Kingdom a liberal democracy which values the rule of law.

Yours sincerely,

Peter Berry

He forwarded the letter to Jack Straw, Lord Chancellor and Secretary of State for Justice, and got the following reply (written on 17 Feb), which he forwarded to me by post (on the 19th; it arrived today).

Dear Alan, [handwritten]

MR PETER BERRY, [address redacted]

Thank you for your letter of 23 January on behalf of your constituent, Mr Peter Berry, who is concerned about the Coroners and Justice Bill, and in particular the Government's proposals to introduce new data sharing powers.

The proposal to introduce a power to create a new data sharing gateway stems from the recommendations of the Data Sharing Review, conducted independently by the Information Commissioner, Richard Thomas and Dr Mark Walport of the Wellcome Trust. The Review was commissioned by the Prime Minister in October 2007 to consider, amongst other things, how data sharing policy should be developed to ensure proper transparency, scrutiny and accountability. The Government believes it is vitally important that public trust in the handling of personal data must be maintained and the privacy of citizens protected. At the same time, data sharing between Government departments is essential in providing (and improving) customer-focussed public service delivery and also ensures individuals get the services they require. It is a matter of balance: whilst there are occasions where data sharing may not be appropriate (in order to protect individuals' privacy, for example), there are occasions where not sharing data may cause considerable harm.

The Data Sharing Review report was published on 11 July 2008 and included several recommendations for changes to the legal framework surrounding data sharing. The Review noted that while legal uncertainty and confusion are significant barriers to sharing, there have also been instances when legitimate data sharing schemes have been prevented due to legal obstacles.

In its response to the Review, published in November 2008, the Government broadly welcomed the report and agreed with the Review's recommendation to introduce a new statutory fast-track procedure for instances where there is a genuine case for removing or modifying an existing legal barrier to data sharing. The Government proposes to amend the DPA so that a statutory instrument procedure is created that will permit the sharing of personal information between persons or bodies, so long as a robust case can be made for the sharing to take place.

The sharing of personal data between Government departments in a secure and appropriate manner is essential to protect the public and to deliver public services. In recent years, data sharing has helped the most vulnerable in society, for example by identifying elderly people needing support with fuel payments, children who qualify for free school meals, and those eligible for assistance in switching over to digital television. The proposed data sharing gateway would assist with the continued delivery of the protection and services expected of Government, with the ability to respond more effectively to quickly changing situations. These could involve the detection of fraud and other forms of organised crime, or respond to health epidemics and natural disasters.

I understand Mr Berry's concerns and I assure him that the Government takes the protection of personal information seriously. Data sharing must be justifiable, proportionate and only undertaken when proper safeguards are in place.

Mr Berry may be reassured to know that the proposed new data sharing powers are combined with important safeguards. The Government plans to make any order wishing to use this new data sharing gateway subject to debate in both Houses of Parliament (through the affirmative resolution procedure), so that Parliament will have to apprive [sic] every proposal. In addition, every proposal to share personal information using this new gateway will be subject to scrutiny by the Information Commissioner. The Commissioner may report on whether he is satisfied that the sharing of information enabled by the order is necessary to secure a relevant policy objective, that the effect of the provision made by the order strikes a fair balance between the public interest and the interests of any person affected by it. Proposals must further be accompanied by a Privacy Impact Assessment (PIA). A PIA will describe the initiative and analyse the proposal's implications for privacy and data protection, as well as benefits for individuals and the general public. The Government believes these measures will ensure individuals' rights are fully maintained and protected.

The power to permit data sharing would be an exercise of a minister's functions and, as with all other such matters, remain judicially reviewable. Consequently the power must be exercised within the terms of Articles 6 and 8 of the European Convention on Human Rights. While the power is capable of providing a legal basis for sharing where common law confidentiality and public law would otherwise prohibit it, the proposed power is to be structured in such a way that exemptions from common law and public law prohibitions will only be possible where it is necessary, proportionate and an effective balance between the public interest and the private interest of those affected has been achieved. I appreciate concerns that protections afforded by other laws may be set aside, however these safeguards ensure that this will not occur. Protection of the private personal information of individuals is paramount and the proposed power will only be capable of being put into effect where this principle is fully respected.

I trust that this information is helpful and I enclose a copy of this letter for you to forward to Mr Berry, should you wish to do so.

Yours, [signature]
JACK STRAW

(2) Comments    Read More   
Posted on 15-02-2009
Filed Under (Haskell, category theory, code) by Pete

This post assumes some knowledge of Haskell, in particular what monads and monad transformers are. It's literate Haskell, which means you can load it into ghci directly (well, you'll probably have to convert HTML entities to plain text first, particularly > and <.)

> {-# LANGUAGE NoImplicitPrelude, MultiParamTypeClasses, FunctionalDependencies #-}
> {-# LANGUAGE FlexibleInstances, FlexibleContexts, UndecidableInstances #-}
> 
> import Prelude hiding (Monad (..))
> import qualified Prelude as P
> import Control.Monad.Trans

On the Haskell blog circuit recently the notion of "parameterised monad" has been floating about, provoked by a new paper "Parameterized Notions of Computation". I'll refrain from explaining it myself, instead linking to Dan Piponi's post on the topic. If you don't already know what parameterised monads are, go and read that.

It seems that a module has already been written to encode parameterised modules and uploaded to Hackage: Control.Monad.Parameterized (package monad-param). It dates from before the current excitement (2007 and it's at version 0.0.2) so the concept is apparently not new. It does however take a somewhat different approach, one that's seemingly more general but also more cumbersome. The change in approach is explained in a blog post by its author, Edward Kmett. Here's what the "parameterized monad" class would look like if translated from the paper:

Read the rest of this entry »
(0) Comments    Read More   
Posted on 23-10-2008
Filed Under (diary) by Pete

At home (Cowplain, Hampshire) my family has been getting milk delivered to the doorstep in 1-pint glass bottles basically forever. I don't remember a time when we usually bought milk from a shop/supermarket along with the rest of our food, though we have done it on occasion (usually on a Sunday, when Friday's milk wasn't quite enough for the whole weekend and Monday morning before the milkman comes). Despite that, in the 4 or so years I've been living in Swansea (actually 5 years, but I was in Germany for the 3rd) I've bought my milk in plastic bottles of 2 or 4 litres from a shop.

This year, for a change, I'm living in what might be considered a household of more than one person, so we buy milk for 4 or 5 people at once. That needs to happen a couple of times a week, but it's a bit inconvenient to go shopping for 5 that frequently (we've only actually had two communal shopping trips since I moved in at the start of the month). Moreover, I really hate throwing away a 6 litre plastic bottle every week; glass bottles from the milkman, which get collected and reused, don't consume (much) oil in their manufacture and don't go into landfill, so are far more environmentally friendly. So I decided to set up milk deliveries. Observing our milk consumption before that point I decided we'd need about 3 pints on Monday and Wednesday and 5 on Friday (to cover the weekend). And the consensus was to get semi-skimmed. So on Friday morning a couple of weeks ago five pints of milk appeared on the doorstep.

Five pints of skimmed milk.

Well, sometimes that happens. The milkman might not have had 5 pints of semi-skimmed available when he got to my house. (Usually though you manage to get a pint or two of the right kind and the rest of something else.) So I put up with it, and we used the milk over the weekend.

On Monday, there appeared on the doorstep three pints of skimmed milk. And again on Wednesday, and another five pints on Friday. There was still a pint or two left over from Friday when we got Monday's milk, partly because skimmed isn't as nice as semi-skimmed so we didn't use as much, but also because it was starting to go off, despite being kept in the fridge and its best before date being Wednesday. (I've always thought skimmed milk tastes like it's started to go off even before you get it.) I checked the order on two occasions to make sure the order was actually for semi-skimmed (annoyingly you can't actually view your existing order on the Dairy Crest website) but still we kept getting skimmed, and it went off before it was supposed to.

This Monday I got the bill. Pricing on the Dairy Crest website for ordinary milk is "at current prices". Now I found out that it costs 58p per pint, about twice as much as getting it from Tesco. I expected it would be more expensive since they have to deliver it, but for stuff that doesn't taste nice and goes off prematurely so we end up throwing half of it away, that's just not acceptable. So today I cancelled the order.

So this little experiment lasted about two and a half weeks, and was thoroughly unsatisfactory. A crying shame. Surely the milkmen in Uplands can't be that much less competent than the ones in Cowplain?

(1) Comment    Read More   
Posted on 03-07-2008
Filed Under (legal, news, rant) by Pete
We all know the USA badly needs some sane data protection legislation, and this is a good illustration of why:
Yesterday, in the Viacom v. Google litigation, the federal court for the Southern District of New York ordered Google to produce to Viacom (over Google's objections):
all data from the Logging database concerning each time a YouTube video has been viewed on the YouTube website or through embedding on a third-party website
The court’s order grants Viacom's request and erroneously ignores the protections of the federal Video Privacy Protection Act (VPPA), and threatens to expose deeply private information about what videos are watched by YouTube users. The VPPA passed after a newspaper disclosed Supreme Court nominee Robert Bork's video rental records. As Congress recognized, your selection of videos to watch is deeply personal and deserves the strongest protection.
(Fortunately this ruling appears to be illegal, but you can easily imagine that less-rich companies couldn't afford to appeal.) Time to log out of YouTube and start using Tor.
(2) Comments    Read More   
Posted on 18-04-2008
Filed Under (QOTD, language, politics) by Pete

I have always been of the mind that when you visit a foreign country you're the one that should make the effort to communicate with the locals. Speaking your birth tongue slower and louder doesn't make yourself any more understandable, it just makes you look like a jackass. The onus to learn the local language is even heavier if you're an immigrant. After all, you're the one asking for the privilege of becoming a part of someone else's community. That means you can bloody well learn the language; you don't even have to succeed, you just have to show that you're willing to try.

--- Illiad (author of the webcomic UserFriendly). The subtitle is "Not multiculturalism, but covert colonialism", the idea being that (for example) a Chinatown in Vancouver where nobody speaks English is a colony, in the worst sense of the word. Perhaps not everyone is interested in learning a language for its own sake like I would be (the only reason I don't learn more languages is lack of time), but when the language is entrenched, not making the effort to learn it is simply rude.
(0) Comments    Read More   
Posted on 21-03-2008
Filed Under (news) by Pete

Arthur C. Clarke died yesterday (OK, the day before yesterday) at the grand old age of 90.

One of the last of the Golden Age writers, one of the best and most foresighted, and probably the most optimistic. He will be missed.

(0) Comments    Read More   
Posted on 19-03-2008
Filed Under (code, computing, thinking aloud) by Pete

I've been pointed to a post by Joel Spolsky advocating Hungarian notation so that code that fails to properly sanitise strings "looks wrong".

Here's Joel's example. The idea is that you prefix the names of all string variables and functions returning strings with either "s" or "us" depending on whether they're safe or unsafe respectively. Then assignments that have "s" on one side and "us" on the other just look wrong.

us = UsRequest("name") // ok, both sides start with US
s = UsRequest("name") // bug
usName = us // ok
sName = us // certainly wrong.
sName = SEncode(us) // certainly correct.

Well I can think of one pitfall already. How do you mark whether a function expects safe or unsafe data in a way that makes wrong code look wrong?

us = UsRequest("name") // okay
RandomMangler(s) // okay
RandomMangler(us) // errm... wrong?

If you're using a language that supports it, there is a far better way. Read the rest of this entry »

(0) Comments    Read More   
Posted on 26-02-2008
Filed Under (language) by Pete

If you thought it was hard to remember the gender of French nouns, take heart: apparently French people don’t always get it “right” either.

Depending on your perspective, this says something about either the silliness of French grammar or the factual authority of dictionaries. (Personally I think written French is silly for still inflecting adjectives for number when the spoken language did away with that centuries ago, but calling gender silly would be going too far.)

(0) Comments    Read More