Monday 27 June 2011

Another brilliant BBC article

I tend to think of the BBC as the Pravda of the British left: they tell us, not so much what is actually going on, as what the important issues of the day are, and what we should think about them to ensure that we are on the right side (which is of course, the left side). Although there have to be a few facts, naturally, much as a kind of stodgy bread on which to smear the marvellous bounty of their super-correct views.

All the more amusing then, when those naughty facts just won't do what they're told and support Aunty's version of what's what. Take for example, Bolivia moves to end dependence on foreign seed firms. The words, the style, the thoughts, all paint a background of local (good), actually indegenous (even better) farmers and foodstuffs battling against evil globalism (bad), actually Big Agro (shudder!), led on by heroic indigenous president Evo Morales (wild cheering!).

So what's the problem then? And what's his solution? Well the problem is encapsulated in one truly astonishing sentence, where we get the full force of the writer's desire to present one way some facts which all, unfortunately for him or her, point exactly the other way:
The recent rise in global food prices forced many Bolivians to abandon their indigenous staples, such as quinoa, in favour of cheaper, imported products.
Oh Noes! It's those rotten Big Agricompanies, cunningly producing rice and wheat and such cheaply, so that our poor people will be able to buy it when, erm, they can't afford the locally-produced foodstuffs. Erm...

So let's see. Cheap imports = BAD because it means Bolivians won't starve, check. Foreigners paying for locally produced grains = BAD because it means we have the money to buy what they are selling, check. Really, it's such a pity that people 5,000 years ago in the Fertile Crescent ever learned about that division of labour stuff. Ugh!

Hmm, you know, one way around this would be to let people make some money by exporting quinoa, which is a premium product for which there is increasing demand at high prices. Then, following the price signal, they could, oh let's think -- ah yes! -- grow more of it next year, making even more money and helping the price come down a little. Why, if you did that for long enough, you might even have a financially independent middle class. So is that Presient Morales' favoured solution then?

No, the favoured solution is state seed companies apparently. Because of course, that has worked so well every other time it's been tried [ask yourself: just why is the locally produced quinoa so expensive that local people can't afford it?]. Oh, and "generous" credits to indigenous farmers. Which, I am 100 percent sure, will mean that either the farmers will soon be bankrupt or the state credit-granting entities will be. Or both, of course, like Fannie and Freddy and a few million homeowners in the US when they tried something similar in their housing market recently.

There's one other gem of a sentence in the same article. In contrast with evil agribusinesses that might want to produce either Frankenplants or varieties that won't self-seed, we learn that:
The Morales government wants to improve genetic stock through natural selection.
Does the writer even know what natural selection is? Or is the BBC just cutting and pasting a press report written by someone in the Morales government who, themself, doesn't know what natural selection is? Because taken literally this sentence means that the Morales government is willing to wait several million years for quinoa to evolve to produce more seeds, if it ever does. Or for Bolivians to evolve not to need so much in the way of food (a rather more plausible scenario, given the likely state of their food supply in the near future).

Friday 17 June 2011

Annother NetBeans annoyance

NetBeans' search and replace dialog allows you to use regex capturing groups in the find string and regex back references in the replace string. But a naive user, who expected to be able to use something like "\1" and "\2" for his back references, would be sorely annoyed when they didn't work.

Instead, NetBeans uses $1, $2, etc. for its back references. As this person found out after perusing the source code for the search and replace dialog.

The reason, apparently, is because that's what Java regexes do (and Java regexes do what they do because that's what perl regexes do, and always have done). And because NetBeans is primarily a Java-oriented IDE, the Javaness wins out over the regexness, or something.

All of which would be but a minor annoyance, were it not for the information that you're offered when you click the help button in the search and replace dialog, which eventually leads you to a page in the official Java regex documentation that says this:

Back references
\n Whatever the nth capturing group matched

Sigh...

Thursday 16 June 2011

The new Wii

Reading about the new Wii U, I can't understand how they resisted calling it the Wii ii.