Answering an important question: Why I'm saying “Yes” to Alternative Vote on Thursday


“Do you want the United Kingdom to adopt the ‘alternative vote’ system instead of the current ‘first past the post’ system for electing Members of Parliament to the House of Commons?”

If you’ve spoken to me recently (or know me on Twitter or Facebook), you’ll know that I’ve been campaigning for a “Yes” vote in the referendum tomorrow on whether Britain should adopt the Alternative Vote. This is the first time I’ve been ‘politically involved’ in anything beyond voting, and it’s an interesting experience - equal parts uplifting and depressing, I’d say. I thought it would be a good idea to detail my thoughts here, partly as a cathartic exercise, but also so that I could better explain to my friends and family what I’m thinking. I hope that even if you’re intending to vote “No” you can spare the time to read this, because I think it’s important. I’ll try to be impartial with the arguments.

If you’re voting “No” because you fully understand both systems, and think that First Past The Post is fairer, you might want to jump to The moral argument for “No”, below. I encourage you to read the rest too though.

Campaigning on the street, I’ve found that a lot of otherwise sensible, fair-minded people are voting “No” because they’ve been scared into believing some weird things about AV, a system that’s new to them, so they’re sticking to the status quo. The “No” campaign has somehow been great at getting ideas that are at best very ropey, and at worst actually provably false, into the public mindset. To be fair, the “Yes” campaign has some questionable elements too, but I’d argue none that are false, they just chose to emphasise some points I consider unimportant. Personally, I’d argue that the fact that the people behind the “No” campaign feel that they have to promote falsehoods to win - and that it’s morally right to do so - says something about them and the ideas they’re supporting, but I’m trying to keep this positive, so I’ll stop that line of thought now, and get into the arguments…

How AV works:

Lots of people still don’t know how AV works, or, worse, have been dissuaded from even finding out because the “No” campaign has somehow convinced them that it’s far too complicated. To be fair, it is a little more complicated than First Past The Post - it’s really not all that complicated though.

The voting part is easy (I find it hard to believe that anyone could argue this bit is complicated): rank the candidates in order, giving a number to any you don’t actively disapprove of (leave those blank, just as you do now).

When it comes to counting, things do get a little more complicated, but it’s still fairly simple: Tally up the “1” votes; If someone has over half the votes, they win; if not, knock out the least popular candidate, and use the preferences to work out how the count would have come out if the election had been run without them standing; keep doing this until someone gets over half of the votes. This process might be tedious (I’m not sure I’d apply for the counting job…), but it’s not exactly hard.

By the way, another name for AV is “Instant Runoff Voting”, and reading the above you can see why. It’s intended to simulate a runoff election, where the least popular candidates are eliminated after each round of voting, and then everyone goes back to vote again, until a single candidate receives over half of the votes. AV eliminates the time (and expense) of making everyone go back to the polls multiple times.

If you still think it’s complicated, ask yourself: Do you not understand it, or are you just afraid that other people won’t? When speaking to people on the street I find that most people are afraid that other people won’t understand it, and this is just not the case. I haven’t spoken to a single person who didn’t ‘get it’ after a short explanation.

Arguments for the “No” side that seem valid, but are in the end not the important ones:

“AV will mean my party is less likely to win in the future.”

This, although most don’t talk about it much, is, I think, the real reason that many are or campaigning for a “No” vote, or voting “No”. I find it a depressing reason. This vote should be taken on its merits - “does AV produce a fairer democracy?” should be the question, not “who will win?”.

“AV will make me more likely to lose in the future.”

Many MPs in the “No” camp are in this position. The argument is a close cousin to the argument above. It doesn’t seem like many of these people are considering the system on its merits - does it produce fairer results? - they are instead railing against what they see as a personal attack. Remember, MPs who this is genuinely true for are by definition those with less than majority support in their own constiuencies.

“I don’t like Nick Clegg / The Lib Dems, so I’m voting against AV to register my protest.”

A bit like the first two, but this one doesn’t even have an ideology to back it up. Isn’t it a little ludicrous to be deciding how to answer any question just to spite one person or party? To make things stranger, in this particular case, a “No” vote is really a “Yes” to the system that produced the current result, that one that you so dislike.

This really is a once-in-a-generation question, don’t throw away the chance to answer it well! Consider the real choice, vote for the system you think is the fairer, more representative one, and use it to express your opinion properly, at the ballot box in the next election.

With all the arguments above, it’s particularly depressing to see people who have analysed them well, concluded that AV is indeed fairer or more representative, and are still voting “No”. It surely indicates a disturbing lack of faith in representative democracy. Pragmatically, it’s also surely a little worrying to be relying on an unfair election system to deliver power to your chosen party - who’s to say its unfairness will always be in your favour?

As important a choice as this should be about which system is the more representative, not how your party will perform at the next election if it’s used.

The real case against AV:

There are some arguments that tackle AV on its merits. Some hold more water than others. I don’t think that any are a reason to choose First Past The Post over it - and this is the choice, remember! - you may disagree.

Arguments that are believable, but in the end not actually true:

“AV is expensive.”

This is mostly untrue - the numbers put out by the No campaign, in particluar, include massive costs ascribed to voting machines there are no plans to buy (it’s perfectly possible to mark AV ballots with pencils and count them by hand - Australia has been doing it for over one hundred years), and include the costs of holding the referendum itself.

Anyway - isn’t is a little ludicrous to be throwing out a fairer democracy for a few pounds? The UK population is 61 million people - even the No campaign’s most ludicrous figures put the election bill at about £4.20 per person, surely not a crazy amount to spend every few years on a better democracy?

“AV gives more votes to people with unpopular views” (or, to put it in hyperbolic terms, “AV will be the end of one person, one vote”).

It sure looks like some people are getting their votes counted again when candidates are eliminated, and then the next round of counting involves moving their ballot papers to their next choice, right? In reality, everyone is having their vote counted again - the ones already in piles just aren’t being physically moved. Think about the “Instant Runoff” idea (mentioned above); it’s clear that in runoff elections that everyone has the same number of votes. AV is the same.

If you’re still not convinced, look at this in a more pragmatic way: It’s like the people who like unpopular candidates are, after the first count, being forced to vote in ballots where their preferred candidate isn’t even running. Remember, in our current system, someone can (and people do) win with 30% approval. Under AV this simply isn’t plausible.

“All the places that use it don’t like it and are trying to get rid of it.”

This is just false (and as such, I find it one of the more infuriating ideas that the “No” campaign has managed to spread).

AV is used in lots of places, including many elections in the UK, and in many non-governmental elections - such as the leadership elections of Labour and the Lib Dems, with a close cousin of it (basically a runoff election) used in the Conservatives’ leadership elections (if they used First Past The Post, David Davies would be Prime Minister - or perhaps leader of the opposition - right now).

This idea likely stemmed from a single 2010 opinion poll of Australians that the “No” campaign talked about early this year. They claimed that the poll showed that Austrailians preferred First Past The Post to AV. When they presented it, it did indeed seem pretty clear, but it you look deeper, this single poll didn’t even ask the question “AV vs. First Past The Post”, but asked “Our current system vs. First Past The Post”, emphasising the fact that their current system requires all voters to rank all candidates (the AV system in the UK would not - you only need vote for the candidates you affirmatively approve of). Even then, the poll is an anomaly - the polls just don’t usually fall this way in Australia. There’s some detailed analysis of this (and some incredulity at the fact that this is becoming a campaign issue in the UK) from Australia’s ABC broadcaster here and here. In the end, the posts conclude “But when the same voters were offered the Alternative Vote as the other choice compared to compulsory preferential voting, it gained two-thirds support, more popular than first past the post.”

“AV lets losers win!”

Well, if you define “winner” and “loser” as who would win or lose under First Past The Post, this is obviously going to be the case, because AV isn’t always going to produce the same answer as First Past The Post would. What you really think would, I hope, be better expressed in the next section:

The moral argument for “No”:

“It’s fairest for the party with the most first preferences to win, no matter if that’s a minority of all the voters, because their stronger positive opinions should count more.”

At last, a genuine moral argument for First Past The Post! If you are voting “No” because you genuinely believe this to be true, I salute you. I think you’re wrong, but I respect that you’re basing your choice on what you genuinely think is fairer.

To try to show why I disagree, imagine yourself voting at a future election. Pretend there are three parties with a chance of winning in your constituency. Maybe it’s not true now, but it could well be true in the future. Imagine that one party proposes things you very much disagree with - if you’re a right-wing voter, let’s say it’s “high deficit spending to spend through a recession” - if you’re opinions are more left-wing, let’s say “privatising the healthcare system”. The two other parties have positions you agree with more. Now, imagine that the election comes out like this:

Party 1 that you disagree with
(high spending, or NHS privitisation)
35%
Party 2 that you agree with
(austerity, or a public NHS)
30%
Party 3 that you agree with
(austerity, or a public NHS)
28%
Some fringe party
picking up protest votes
7%

Now, to be fair here, parties 2 and 3 probably have other differences between them that I haven’t mentioned, but, still, is it really fair that your constituency is now represented by an MP from Party 1, even though they hold views that are the opposite of most of the ones held by most of their constituents? Will you still think the system is fair if this happens to you?

First Past The Post only works well if there are two parties. It breaks down with three. It’s even worse if there are multiple parties on one side of an issue, and only one on the other side - the “only one on the other side” party is almost guaranteed to win, even if they’re actually actively unpopular.

You might not like that Britain is turning into a multi-party system (Conservative, Labour, and Lib Dem in many places, with the SNP and Plaid Cymru also major forces in some parts, and even the Greens starting to pick up support in some places), but it is happening, and unless we update our voting system to take account of it, it’s likely that you will find yourself on a popular, but somehow still losing, side of an issue in the future simply because of the way First Past The Post works.

“AV doesn’t go far enough, I want genuine proportional representation.”

I have a little sympathy for this (although I do think the constiuency link - a link AV preserves - is a very valuable thing). In any case though, we have to vote on the question on the ballot, and it’s AV vs. First Past The Post on there. I find it hard to understand why someone wanting PR wouldn’t vote for a good incremental change.

There’s also the likelihood that a “No” vote will be lauded as a victory for First Past The Post (indeed, David Cameron is already saying in interviews that that’s how it should be interpreted), setting back any other reform.

If you want PR, “Yes” is still the better, and the more pragmatic, answer to the referendum question.

In the end:

I think AV is a better system. It has lots of effects that I think are good: it makes it more plausible that unpopular MPs with get voted out; it will end the need for tactical voting as we know it; it allows people to express opinions for smaller parties even if they’re unlikely to actually win, without feeling that they’re throwing away their vote. In the end though, I just think it’s a more representative system. I’d rather live in a Britain where I can feel my MP reflects the views of the majority of the voters in my constituency (even if those turn out not to be my views).

I’d like to think that, perhaps after a few elections, the fact that people can vote how they feel will mean that we get politicians who say what they believe, so that we can believe what they say. I do think there’s a chance that, with a more representative system, that will happen. Even if that doesn’t happen though, I want to be able to tell my children[1] that they can vote for what they believe in, rather than who they believe can win.

AV is not a perfect system, but it is fairer than what we have now. I’m voting “Yes” on Thursday because I believe a fairer, more representative democracy can create a better Britain. If you also believe that, you should vote “Yes” too.

AV Badge

[1] Mum and Dad, this is not code for saying that any are likely in the near future! ↩

Read more…

No review copies of 17+ rated App Store apps


I am wary that this blog is in danger of turning into “Gripes With Apple”, especially after last week’s article, so I thought twice about posting this. It’s certainly not of the same order of magnitude as last week’s news, but it is something I’d usually blog about if I hadn’t seen it covered anywhere else - and I haven’t seen it covered anywhere else, so here goes…

Recently I noticed that I can no longer generate “promo codes” for Eucalyptus. These codes are basically akin to iTunes gift cards, and they allow free copies of apps to be given to people - reviewers, for example. They’re quite important if you want your app to be reviewed anywhere - in web or print (in case you were unaware, review sites and magazines generally don’t buy the apps they’re reviewing, they’re sent ‘promo’ copies by the publishers).

I asked Apple about what I at the time thought was an issue with the web site that usually allows me to generate them, and today received a response by email:

Thank you for contacting Apple Developer Support with regard to iTunes Connect Promo Codes. Please know that applications which are rated 17+ will not be provided Promotional Codes for distribution. As such, the usual button to request Promo Codes in iTunes Connect will not be visible for these applications on the Version Details page.

Despite their wording implying that this is just “how things are”, this is a recent change - and in fact it’s a reversal of a policy decision they made in 2009.

This affects a larger number of apps than it might be naively thought, because Apple’s policy is that it’s not only apps that contain explicit content themselves, but any app that can access content from the Internet that’s not under the developer’s direct control that needs to be rated 17+.

Read more…

Thoughts on iOS content purchase


I’d like to take a moment to talk about Apple’s new policy on paid ‘content’ in iOS applications. If you don’t live in the Apple bubble I live in, let me explain: Esentially, all apps that allow users to comsume pay-for content (magazines, music, books etc.) must allow the user to buy access to that content in-app, using their iTunes account. For this, Apple will take 30% of the retail price of the content. Content can also be sold outside of the app, via whatever means you can think of (books on your web site, an newspaper subscription bought via a newsagent etc), but the in-app price - which includes Apple’s 30%, remember - must be identical to or less than the out-of-app price. An app also cannot promote that content can be bought outside of it, even if it is possible to do so (e.g. no linking to your web site to get the users to buy subscriptions there rather than using in-app purchase). The Apple press release I linked to earlier talks about subscriptions, but Apple has confirmed that the rules apply to all content, not just subscriptions - books too, for example.

You may argue that my opinion is clouded. I make book reading software, and license technology to other companies that make book reading software. Software like this, presuming Apple’s rules don’t change, is now essentially not economically viable for iOS devices (if you’re a iOS device owner, I hope you like iBooks). For the book publishing model that humanity seems to have settled on[1] there simply isn’t a 30% margin left to give Apple. I agree that I’m at the sharp end of this policy change, but I don’t think that’s what’s causing my disquiet over it.

Magnitude

First, the specifics of the new policy. Taking 30% of the sales of all content a device can consume is simply unreasonable. It’s superficially similar to the situation with apps sold through the App Store, where Apple takes 30% of the purchase price of every app sold, but with the App Store Apple is providing things: the software that people use to discover and browse apps; hosting of the apps; a fast, worldwide download service. It’s much more than just processing payment. With the new content rules though, Apple essentially wants the same 30% for doing much less. They provide payment processing, and they track purchases. Even the ‘tracking purchases’ part is of arguable utility because, since the app producer has to serve the content themselves, they will need to duplicate much of this functionality on their own systems too. For in-app content, nowhere near 30% of the cost of producing and selling the content is borne by Apple.

Secondly, regardless of how ‘fair’ the cut provided to Apple is, mandating a payment system is quite draconian. With content purchases, they’re not doing much more than an app developer can do by themselves - they’re simply not permitting them to.

Incidentally, I don’t even think that Apple is making the right business decision here. If people can’t listen to Spotify or Pandora, can’t read their Kindle or B&N books, will Apple’s hardware entice them? I genuinely believe that it’s in Apple’s long term interests to allow these services on iOS devices (and don’t belive the argument that they are ‘allowed’ now - Apple knows that services like this can’t survive 30% of their revenue being taken).

Integrity

Disregarding the unreasonable magnitude of the 30% cut, there’s another reason I find this change troubling.

The intent behind Apple’s policies always seemed consistent to me in the past. The policies themselves may have been opaque and sometimes confusing, and were often inconsistently and capriciously applied, but the intent behind them didn’t seem to change. I certaninly didn’t agree with all the policies, but they at least seemed reasonable. I could respect them. Apple seemed to have integrity. With this change though, that’s no longer true. Apple has simply changed the policy for what apps are allowed to do to one that’s not only different, it has a different intent behind it.

There are lots of companies - and lots of people - who have expended great effort in creating wonderful software over the past couple of years, software that Apple actively encouraged and helped them to create. Now, suddenly and unexpectedly, that software cannot be released because, as I’ve previously touched on, even if Apple’s payment system were adopted, to release the software would now be to choose to lose money.

Sentiment

Despite all this, I still love my Apple devices. I can’t help it. Apple produces the best things. I don’t think it would be exaggerating to say that current Apple hardware, in every major category - laptops, phones, and tablets - is the best in the world. The things Apple produces today are the most complex, yet, almost confoundingly, among the most elegant technology mankind has ever produced. The best pieces of technology mankind has ever produced. Not only are the devices better, they make me, as a developer, better. I make better things when I make them for Apple devices.

Using the tools Apple provides, I could make a great new book reading app. There are lots of people out there who could make great book reading apps. Except now they can’t. Great music apps. Except now they can’t. Apps that do wonderful, crazy things that we can’t imagine. Except now they can’t. This decision by Apple will set back the progress of technology.

“Just make these apps for other platforms,” you say! I wish that there were alternatives that were as good as iOS, but there just aren’t. Eveything else available - basically meaning Android at this point - is clunkier, less easy to use, less beautiful. Maybe HP’s (nee Palm’s) WebOS or Microsoft’s Windows Phone 7 will change that, but I’m skeptical. There’s too little ambition, too little vision, and too little attention to detail and consistency in the offerings other companies are producing. There might be technologically more advanced phones out there than the first 2007 iPhone now, but there’s still nothing that’s as consistent, easy, and pleasurable to use. For reasons that you could write a book about (and many have tried to), other companies can’t seem to produce things like today’s Apple can.

Doublethink

For years, I’ve helped to build ‘Apple things’. I’ve evangelised Apple things to my family and friends. I love my iPad. My MacBook Air is the best computer I’ve ever used. More than that though, I want to make the best things I can make, and that means making them for Apple platforms. At the same time, I don’t want to be responsible any more for what I fear the Apple ecosystem might turn into, and what that might turn the world of our future into. To employ a little hyperbole, I don’t want to wake up in 1984 knowing that, with however good intentions, I helped to build it.

So I’m torn. Should I make the best things I can, on devices I enjoy using, or turn to another platform, giving up the benefits of Apple’s platforms that I enjoy so much for a perhaps misplaced feeling of freedom? Should I continue to enthuse to friends and family about the best technology our species has ever come up with, or dourly make their lives worse, at least in the short term, by advising against it?

Maybe in a week or two these things will shake themselves out and things will look more reasonable. I’m sure I’ll be able to rationalise away some of my current angst. That worries me too though. Perhaps some day I’ll wake up in 1984, not even realising I helped to build it.


[1] You might argue that it’s not the best one we could have come up with, that it has too many middle-men, and I might actually agree with you, but that’s arguing against reality at the moment. ↩

Read more…

Support the gorillas on World Usability Day


Silverback GorillaToday, November 11th, is World Usability Day. To celebrate, the good folks at Clearleft wil be donating all revenue from sales of Silverback, their Mac ‘guerilla usability testing’ app, to the Dian Fossey Gorilla Fund.

Silverback’s a great app [full disclosure: I did some work on the latest version, but I’m pretty sure I would think this regardless] for performing quick, simple usability testing of your Mac app, web app or web site (or even Windows app with VMWare or Parallels!). It records what’s happening on screen, along with the user’s reactions using the iSight camera, and you can play back and export these recordings later. It’s simple to use, and can scale from simple in-the-coffee-shop or pub tests (“Hey, would you like to test out my new app? I’ll buy you a coffee!”) to use in full-scale usability labs. It’s well worth the asking price on any day, and today there’s an even greater incentive.

There’s a time-limited demo version you can download, but remember to purchase today for the entire sale to be donated (although if you’re late, at all times 10% of the profits is donated).

Read more…

My inquiry on Global Sources


Spam is getting more and more targeted. With contact details blurred to protect the, erm, guilty…

Mail window showing spam

I love how they insinuate that this in response to some enquiry I made, somehow hoping I’m so busy I’ll presume I forgot about it or something.

I’m tempted to try to get an SDK and some hardware samples out of them…

Read more…

Webmoco Go!


A couple of the guys I worked with via Missing Ink Studios on the first apps to use the Eucalyptus reading engine (including the Hitchhikers’s Guide To The Galaxy and Peter James apps) have started up their own web and mobile development company, “Webmoco”.

I found them great to work with, so if you’re looking for a development team, check out their site, which includes a showcase of the great apps they’ve been involved with in the past.

Read more…

Using the Mac or iPhone's built in regex routines


In which a convenient method of using POSIX regular expressions from Objective-C is presented.

It’s a common complaint that the Mac and iPhone platforms don’t have native support for regular expressions, but that’s not entirely true. If you drop down to the UNIX core, there’s an implementation of the old (and only partially busted) POSIX regular expression interfaces. Here, I’ll show a simple Objective-C wrapper class for them that lets you use them conveniently in Mac or iPhone apps.

Before I start, some preemptive remarks: There’s a lot wrong with POSIX regexes to modern eyes. Firstly, and most glaringly, the work on byte streams, and know nothing of characters beyond ASCII. That means that if you’re not careful about your string encoding, and what your regexes specify, you might end up mangling your strings pretty badly. If you don’t understand what UTF-8 is beyond that it’s a “text encoding” go and read up on how it works, and how characters in it relate to bytes before you use these routines. If you’re aware, these are safe to use - just bear in mind that , for example, .{1,4} will match 1-4 bytes, not characters. Secondly, they’re slow. Like, really slow. Even using precompiled regexes, they were around 500 times slower than PERL’s regex routines the last time I benchmarked. Some of this can be said to be the ‘fault’ of the POSIX standard, which specifies a more expressive regex concept than PERL’s, but a lot of it is just that the implementation Apple uses is crufty and old. There are better implementations out there. Anyway, suffice to say, you don’t want to be doing tons of text processing with these routines in performance sensitive code. Thirdly, the syntax of them is not the familiar PERL-compatible syntax we’re all mostly familiar with - you’ll need to think a bit differently to use them. In day-to-day use, this mostly just means that the character classes are specified differently (e.g. [[:digit:]] instead of \d). See man re_format for more details.

Having said all that, why would you want to use these? Well, if you’re aware of the issues above, and all you want to do is use a couple of convenient regexes in your code - parse a couple of HTTP headers, or match a few strings now and again, say - these routines work just fine. Including the couple of ObjC files I present here is a lot lighter weight in code-size and complexity terms than including a whole regex library. I use it all over the place in Eucalyptus, and it does a sterling job.

So, here’s the interface:

@interface THRegex : NSObject {
- (id)initWithPOSIXRegex:(NSString *)regexString;
- (id)initWithPOSIXRegex:(NSString *)regexString flags:(int)flags;
+ (id)regexWithPOSIXRegex:(NSString *)regexString;
+ (id)regexWithPOSIXRegex:(NSString *)regexString flags:(int)flags;
- (BOOL)matchString:(NSString *)string;
- (NSString *)match:(NSInteger)index;
@end

@interface NSString (THRegex)
- (THRegex *)matchPOSIXRegex:(NSString *)regexString;
- (THRegex *)matchPOSIXRegex:(NSString *)regexString flags:(int)flags;
- (NSString *)stringByEscapingPOSIXRegexCharacters;
@end

It’s pretty easy to use. At its simplest, you can just do things like:

if([@"myString" matchPOSIXRegex:@"^.*Str.*$"]) {
    NSLog(@"Match!");
}

You can also pull out parenthesized matches (watch out - they start at 1, match 0 is the entire regex match):

NSString *contentRange = [myHTTPHeaders objectForKey:@"content-range"];
THRegex *contentStartRegex = [contentRange matchPOSIXRegex:@"^[[:space:]]*bytes[[:space:]]+([[:digit:]]+)" flags:REG_EXTENDED|REG_ICASE];
if(contentStartRegex) {
    NSString *contentsStartString = [contentStartRegex match:1];
    NSLog(@"Received Content-Range: %@", contentsStartString);
}

If you’re going to be doing a few matches at once against the same regex, you can also construct a THRegex object and use it directly, instead of the NSString category (contrived example follows - this is not the best way to get a list of filenames matching a pattern):

NSMutableArray *mySpreadsheetFiles = [NSMutableArray array];
THRegex *matchSpreadsheets = [[THRegex alloc] initWithPOSIXRegex:@".*\\.xls"];
for(NSString filename in [[NSFileManager defaultManager] directoryContentsAtPath:myDocumentsPath]) {
    if([matchSpreadsheets matchString:filename]) {
        [mySpreadsheetFiles addObject:filename];
    }
}
[matchSpreadsheets release];
NSLog(@".xls files: %@", mySpreadsheetFiles);

And that’s about it. One final implementation detail: because the POSIX routines are so slow at compiling regular expressions, in my routines, the first time you use a regex, it’s compiled and cached so that it’ll be available with no delay the next time you use it. This makes sense if all the regexes you use are hard-coded - it’s only going to increase your memory usage by a small, constant factor. If you don’t want this behaviour - say, because you’re generating regexes on the fly, or because users can enter regexes in your UI (I really don’t recommend this by the way - it’s a certainty that your users will not know all the POSIX regex caveats I mentioned at the top of this post, and it’s unlikely they even know POSIX regex syntax), you can turn the cache off with a THREGEX_DONT_CACHE compile-time define (e.g. by specifying THREGEX_DONT_CACHE in the “Preprocessor Macros” setting for your target in Xcode).

To find out more about POSIX regular expression syntax, see man re_format. man regex covers the flags (REG_EXTENDED, REG_ICASE etc.) that are also used here when constructing regex objects.

Here’s the code - it’s released under a simple BSD-style licence:

downloadZip.png

Read more…

On “Abolishing the proposed law” on copyright infringement


I usually shy away from discussing politics online, and but it looks like I opened a can of worms on myself on Twitter this morning after I said “A worthy petition, but I wish it were better worded” in response to this petition. Here, I set out my thoughts in more than 140 characters.

For those not familiar with the background, Charles Arthur of The Guardian has a good article about the current proposed changes to British copyright law.

The petition I’m talking about is about the concrete changes themselves, not the idea that the business secretary be allowed to change the Copyright Act at will. I’m not going to talk about that here, I think the flaws behind that proposal are pretty self-evident.

First, here’s the full petition text:

We the undersigned petition the Prime Minister to abolish the proposed law that will see alleged illegal filesharers disconnected from their broadband connections, without a fair trial.

More details from petition creator:

This petition has been set up in response to the Government’s proposal to cut off internet access to those who are caught illegally downloading copyrighted files. We think this has one fundamental flaw, as illegal filesharers will simply hack into other peoples WiFi networks to do their dirty work. This will result in innocent people being disconnected from the internet. What’s more, such a punishment should be dealt with in the proper way, in a court of law. This guilty until proven innocent approach violates basic human rights.

I think the petition is constructed in such a way as to make it easy for proponents of the proposed changes to dismiss.

The wording of the main text is incoherent. It says that the Prime Minister should “abolish the proposed law” - you can’t abolish a proposed law. Something needs to actually be in in effect before it can be abolished. And in any case, the Prime Minister can’t abolish laws (though, yes, he could probably get members of his party to drop the proposals this petition is actually about). The premise of the rest of the petition is flawed too. It’s easy to refute the “without a fair trial” argument - no-one is given a trial before being disconnected from other services. Now, you can of course argue that being disconnected from the Internet is different from being disconnected from, say, the electrical grid, or that alleged copyright infringement is not a fair reason for disconnection, but that’s not what the this petition argues if you take the text literally.

On to the “more details” section. It contains a fair point - basically arguing that fairly implementing the proposed changes is implausible. It don’t believe that it’s the point that most signers of the petition actually want to make though. The argument here is rights.

There’s a basic question here. Should someone be disconnected from the Internet upon being accused of illegal file sharing?

I want to make it clear here that I’m not a proponent of copyright infringement. As someone who makes a living writing software, I know that people copying my work annoy me, and I’m appreciative of a society that sees the fruits of my labour as something worthy of protection, and recompense. I don’t think that people who copy software I’ve written should be ‘barred’ from the Internet though, even if it were a technically feasible thing to do.

At the risk of opening another can of worms, an analogy: Let’s say I start trading group for music CDs. People in the group buy CDs them mail them to other members. The other members rip or copy the CDs, and mail them on. Just to eliminate the ‘scale’ argument, let’s say that this goes on for years. I amass a collection of thousands of copied CDs. I think that this is ethically wrong. I’d side with the argument that it deserves punishment (perhaps you disagree with me that this is ethically wrong behaviour; it doesn’t matter for the sake of this argument). Would a fair punishment be that I am no longer allowed to send mail, or have it delivered to me? I don’t think that many people, no matter what side of the copyright debate they’re on, would ever consider that to be a serious proposal.

That proposal is on a much smaller scale than the proposal to remove Internet access from alleged infringers.

In short, the argument should be about rights. In more detail, I see two issues. First, in the modern world, the Internet is used by many of us for all sorts of legitimate purposes, and it’s only going to be used more in the future. It’s simply a ludicrous suggestion so say that anyone should be ‘cut off’. What happens, for example, when the day comes that their bank will only deliver statements by email, or when they can only pay their electricity bill on the electricity company’s web site? Second, whatever the punishment, we shouldn’t be meeting it out upon allegations. Our society is based on courts of law determining guilt, not on corporations alleging it.

Here’s what my petition would read:

We the undersigned petition the Prime Minister to have his Government abandon proposed legislation that would see alleged copyright infringers denied internet access in their homes.

More details from petition creator:

Proposed changes to copyright laws would remove Internet access from people accused of sharing copyrighted files on filesharing networks. We see the idea as fundamentally flawed. Removing the ability to use a medium of communication is not an appropriate punishment for a crime. For example, our society does not remove the ability to use the postal service from people who use it to plan or commit criminal acts - the right to communicate is seen as too important - practically and morally - to remove. Furthermore, even if the punishment were proportionate, the matter should be fairly dealt with in a court of law. Punishment upon allegation should not be something our society permits.
Read more…

The Hitchhiker’s Guide to the Galaxy


Just a quick pointer to this post by my alter-ego on the Other Things blog. The first apps using the reader from Eucalyptus are out now, they’re, insanely greatly, the full Hitchhiker’s Guide To The Galaxy trilogy (yes, all five books!), and I’m delighted with them. It’s also been a pleasure working with everyone involved.

You really should buy them - I’m heartily enjoying rereading the books. And I swear I’d say that even if I wasn’t involved in their release :-). “More enhanced” editions with additional “extras,” - which will be free upgrades - are also coming soon.

More details from me (and links to more official sources) here.

Read more…

Getting married!


Em and I are getting married! With our somewhat unusual circumstances, it’s hard to say when and where yet (although we do plan to do it within the next couple of years!), but we’ve set up http://wedding.montgomerie.net/ for people to follow along.

We’re both very excited!

Read more…