Lewisham East Candidate Expenses

July 20th, 2010

You've probably seen Channel 4's report on campaigning expenses, and Zac Goldsmith's rather bizarre attempt to ignore every rule of media training in addressing the allegations made against his campaign. In any case, once he did finally turn to the matter at hand, one of Mr Goldsmith's key arguments seems to be that the methods he used in his campaign – apportioning a percentage of costs for signs bearing his name and face to council elections, for example – are standard and have been used across the country. At the very end of the interview he even notes, of the Electoral Commission:

"Or they'll look at it and find something wrong. In which case, we'll need a repeat general election, because the rules that I adhered to are the same as the rules for other MPs".

This doesn't entirely make sense – as if he has adhered to the rules there'll be nothing for the commission to rule against – but the point's clear. Apparently every MP out there has been apportioning some costs off to local elections, leaving their short campaign expenses within the limits.

Only one way to find out, then.

As Mr Goldsmith claimed to have taken advice from Conservative Central Office, I figured it was worth checking the Short Campaign expenses of our local Conservative candidate, Jonathan Clamp. And, just to see if the other parties might be up doing the same sort of thing, I also checked the records for his opponent – Labour candidate, and now MP, Heidi Alexander.

The Short Campaign expenses limit in Lewisham East for the General Election 2010 was £7,150 plus 5p per elector. I took the electorate figure of 64,880 from the Lewisham council website, making this £10,394.40. Interestingly both candidates had worked to different figures, based on different numbers of voters, but not by much – we all believed the limit to be around £10,400 to £10,600. So, what did they spend?

Jonathan Clamp

In Mr Clamp's case, it's all rather simple. His expenses were neatly tallied up with receipts, and having spent around £400 on advertising and £7225 on direct mail his total was barely above £8,000. Should anyone wish to check I've created a PDF of his short campaign expenses here – note that I've redacted his home address from the one document where it appears. There are a few costs on the print receipts not included in the Short Campaign tally, but those were all accounted for in his Long Campaign expenses (examined, but not reproduced here). So far, so good.

Heidi Alexander

It might be argued that, as a third candidate in what is largely a two-horse race between Labour and the Lib Dems, Mr Clamp had little incentive to really push his campaign as hard as possible. So, I checked Heidi Alexander's expenses also. Again, I've created a PDF of the short-run receipts, which you can download here. I've redacted Ms Alexander's home address, her website username and a few bank account details from some receipts, and skipped the inside pages of BT phone bills.

These are rather more tricky to check, with hand-written documents and more receipts. The summary page lists a total spend of just under £6,000 – even less than Mr Clamp – although looking at the Spending Breakdown you can see that many items are marked with an "amount paid" significantly greater than the "value of item" that was included in this total.

In some cases this disparity makes sense, as for example it appears that £200 of a £400 sum paid for balloon gas was a deposit, but it's not always as clear. Nonetheless, assuming the worst case scenario – that the entire Amount Paid should have been accounted for in every case – the total expended works out at £9190.03, which is still some way below the maximum.

And that's it – a lot of ink and a few badly photocopied receipts, but not much else. I look forward to seeing what the people checking other constituencies come up with, not to mention what the Electoral Commission decides with regard to Mr Goldsmith's signs.

Ralph Cat is a Genius

July 15th, 2010

Ralph

Photo: Ralph, with coursework. But not his coursework, obviously.

A University Degree is a funny thing – a bit of paper that can, under some circumstances, make a difference to both one's credibility and one's bank account. But then all degrees – not to mention doctorates – are not created equal. Specifically, some are granted by accredited institutions.

In the UK, the Education Reform Act of 1988 (section 214, here) dictates which institutions can legally grant a degree, and makes it an offence for an unaccredited institution to do so. In the United States and many other territories there is no such law. This means that you can, for a fee, acquire all manner of interesting qualifications that might be said to overstate one's professional or academic achievements.

And so to Ralph.

Ralph H Cat, Esq, is a clever cat. He can, for example, open doors by hanging from the handle. Some might think this qualifies him for a degree, and as it turns out there are institutions that agree. Armed with his very own Gmail address, a fake address in Central London, a phone number (Ofcom handily provides dummy numbers for dramatic use) and a date of birth (his real age converted to human years with this chart) he set about obtaining his High School  Diploma – after all, you have to start somewhere.

The institution in question – carefully chosen by clicking a Google advert that appears when you search for "buy degree" – issues "life experience" degrees so applicants can "Receive a College Degree for What You Already Know". This makes the application process rather less strenuous than the one I had to go through via UCAS. The applicant is asked to "Briefly type the work or life experience that qualifies you for this degree."

Here's Ralph's life experience, as submitted for consideration:

"Since leaving home I have spent the last three years looking after my brother, Hunter, who has limited mental capabilities and requires regular assistance with everyday tasks. We share an apartment together. Besides looking after him, I have a keen interest in food and sports – particularly soccer. I am also a keen hunter, although with limited opportunities to get out of the apartment (it's hard to leave Hunter) this hobby is tricky to pursue."

Naturally, as Ralph is a Good Cat, it is all true. He did leave home (in a cat carrier) and lives with Hunter, who isn't terribly bright (he tries to hunt snowflakes) and does indeed need help with many cat-like tasks. They do share (our) apartment. Ralph loves watching football, or pretty much anything on TV, and hunts wasps, flies and other insects. In short, Ralph has lived a fairly average life as a London housecat. He has not, however, learned anything to merit a High School Diploma.

Nonetheless, within 24 hours – success! Ralph not only qualified, but was also offered a place on a scholarship programme, giving him a discount on the, er, "programme" fees. Here's the confirmation, as presented by the website (click for full size):

Which is lovely, and makes me terribly proud. But although it was tempting to pay $203 and get this qualification, as a pushy parent I couldn't help but hold greater aspirations for my furball. So I applied again, but this time for something a little trickier: a Bachelor's Degree in Social and Behavioural Sciences, Cum Laude. The application form had conveniently saved Ralph's CV, so it took a matter of seconds. And lo, just a few minutes later (again, click for full size):

I have to admit to being slightly sceptical – after all, surely no degree can be granted in less than five minutes based on a one paragraph life story. Perhaps this was an unfortunate system glitch? Fortunately the online chat tool was there to set my mind at ease:

All Ralph now has to do is pay $499, either by credit card or by cheque via what appears to be a mail forwarding address in Santa Monica, and he'll have a BSc. What a clever kitty!

As tempting as it is to get Ralph's name up in lights on the Wikipedia page "List of animals with fraudulent diplomas", though, I don't think I'll be writing off the best part of £350 for a worthless qualification. After all, Ralph is unlikely to ever apply for a job other than as my housecat and moth-slayer extraordinaire, and I know he's a smart cookie. And in any case, he's decided to take a Gap Year to go travelling first – he's even found a rucksac.

Please note that I haven't named or linked the institution in question here, either – partly because I don't have the time to fend off lawyers should it become litigate-y, and partly because even the most cursory glance at its website is enough to tell anyone that it's nonsense. One US Government website names it as a diploma mill that is suspected to operate from the UAE.

I really write like..

July 14th, 2010

If you've ventured into Twitter lately the chances are you've seen messages about I Write Like -  an amusing little website that analyses your writing and tells you which notable author comes closest in style.

Well, I've fixed it. Here's my more accurate version.

Mousebot, Part Three: Motors

July 9th, 2010

Armed with some plans and a bunch of miscellaneous parts, the first big challenge is to get Mousebot moving.

The obvious answer would be to hook up two small DC motors to the Arduino's digital output pins, then simply set those to HIGH to move it forward and LOW to stop. This has a couple of problems, though: there would be no way to reverse the motors, and so no way to steer the Mousebot, and the Arduino can't supply much current, so attempting this would probably destroy it.

So there are two problems to solve: how to run the motors from a separate power supply, merely switching it from the Arduino, and how to rig the motors so that current can be supplied in both directions.

Isolating the motor power

In principle, isolating the motor's power supply and switching it from the Arduino should be pretty easy. A transistor can be used as a kind of switch, and I had a few of those to hand, so after checking out which pin is which (thanks, internet) I connected one up like this (excuse the dodgy diagram):

So far so good – when the Arduino digital pin goes high the LED lights, and nothing catches fire. Stick a motor in there instead of the LED and resistor and it should go and stop on command. But how on earth to control the motor in both directions? This turned out to be a bit fiddlier.

Two way control

A look on the web tells me that, in order to control a motor in both directions, you need something called an H Bridge. It's a simple concept – something like this:

Close switches 1 and 4 and the motor runs one way, or chose 3 and 2 and it runs the other way. Substitute four transistors for the four switches, rig them to Arduino outputs and I'd have two way control from the 3V supply. But then I need to control two motors independently, so that'd take eight transistors, eight outputs. That's going to take quite a bit of breadboard.

Buying it in

One way around the effort of making two H-bridges is to buy them: you can get several bridge-on-a-chip components that include the entire thing, ready to solder. The problem is that most are designed to handle motors that take at least five volts – mine only require 1.5 to 3v. Eventually, however, I came across this: the Pololu Micro Dual Serial Motor Controller.

Everything you need to know about this little chip is in the name. It's tiny, it controls two motors and it connects via Serial. Sold. I grabbed one, picked up a second identical motor (Maplin WC68) and started to connect the whole lot up. To connect to an Arduino Duemilanove, I used (pins numbered left to right when the component-side of the board is facing you):

1) Motor +ve (3v, for me)

2) Ground (common: connect Arduino ground and 3v battery -ve)

3) Arduino +5v

4) Serial – I used Arduino pin 3

5) Reset – Arduino pin 2

6 and 7) Motor one. I also connected a .1F capacitor across these

8 and 9) Motor two – again, with capacitor

Note that I used pin 3 for the serial transmission, which is not the Arduino's serial out pin (that's 1) – I had difficulty getting it to work with the standard Arduino serial.write command, so used the SoftwareSerial command to send serial over pin 3, but you could use any digital pin. The resulting mess looks a bit like this:

Once it's all connected, you need to program the Arduino.

Coding it up

Programing the Pololu isn't tricky, but does require a little preparation. The key is to reset it (pin 3 low, wait, high, wait while it initialises) then send four-byte commands. I found it far easier to use softSerial.print() rather than serial.write(), which seemed to generate surprisingly erratic results, hence using pin 3. Here's my test code: each motor is run for two seconds, in turn:

#include <SoftwareSerial.h>
#define rxPin 4
#define txPin 3
SoftwareSerial softSerial =  SoftwareSerial(rxPin, txPin);
int resetPin =  2;

void setup() {
pinMode(rxPin, INPUT);
digitalWrite(txPin, HIGH);
pinMode(txPin, OUTPUT);
softSerial.begin(9600);
pinMode(resetPin, OUTPUT);
digitalWrite(resetPin, LOW);
delay(1000);
digitalWrite(resetPin, HIGH);
delay(1000);
}

void loop() {
// motor 1
softSerial.print(0×80,BYTE); //start command
softSerial.print(0×00,BYTE); //sets device type
softSerial.print(0×03,BYTE); //set motor and direction (0,1,2,3)
softSerial.print(0x7F,BYTE); //full speed
//  stop
delay(2000);
softSerial.print(0×80,BYTE); //start command
softSerial.print(0×00,BYTE); //sets device type
softSerial.print(0×03,BYTE); //
softSerial.print(0×00,BYTE); //stop
delay(2000);
// motor 2
softSerial.print(0×80,BYTE); //start command
softSerial.print(0×00,BYTE); //sets device type
softSerial.print(0×00,BYTE); //set motor and direction (0,1,2,3)
softSerial.print(0x7F,BYTE); //full speed
//  stop
delay(2000);
softSerial.print(0×80,BYTE); //start command
softSerial.print(0×00,BYTE); //sets device type
softSerial.print(0×00,BYTE); //
softSerial.print(0×00,BYTE); //stop
delay(2000);
}

Next steps will be to tidy this up into a more usable set of commands, work out how to sense from the microswitches and actually fit the motors onto some sort of chassis.

Hunter vs Water

July 5th, 2010

Following the limited success of his winter campaign against snow (video here), Hunter today opened a new front in the war on H2O.

Mousebot, Part Two: Parts

July 4th, 2010

I now have a plan to build a robot for my cats to chase. So what next for Mousebot? A bit of shopping. Here's what I've picked up to get started.

First, the Arduino board:

It's an Arduino Duemilanove, so unlike older versions it can connect directly via USB. I bought mine from here, where they cost around £20 plus VAT. I got the "Starter Kit", which includes a load of bits and bobs for a tenner or so more. Speaking of bits and bobs:

Here's the stuff I've got for testing. Breadboard, jumpers, a few LEDs and switches, plus a few transistors, diodes and things – all from this kit. I also picked up some 1,000 ohm resistors (Maplin part M1K or in a big box of mixed resistors for a fiver) for use when testing with LEDs.

Also from Maplin, a 9V battery box (part L90AN) and 2.5/5mm DC plug (part L49AY):

Solder the red (positive) wire to the tip and black to the surrounding connector, as shown here, and this will power the Arduino when away from the PC. The box has a small on/off switch built in.

Buying motors turns out to be rather more difficult – there are loads. I figured I'd pick up just one and see if it does the job before buying a second for the other wheel, and settled on Maplin part WC68:

It takes 1.5 to 3v, and has a 100/1 gearbox built in. Hopefully it'll work. And to power the motor:

That's Maplin parts  YR60 (box) and HF28 (the clip and wires). Plus two batteries, obviously. Next step: to get the Arduino working, and the motor under control. Tricky.

Mousebot, Part One: Plans

July 4th, 2010

Over the years I've come to know a lot about computers and how to put them together – give me the parts to make a PC and a screwdriver to short the motherboard power header pins and I could get it up and running – or installing Windows, at least – in about five minutes. And, thanks to hours mucking about with website programming and, before that, the Atari ST, I can program a bit – give me a language that works vaguely like either C or Basic and I can bodge together a working program. But there's one thing I know absolutely nothing about at all: how on earth all this stuff actually, you know, works.

When it comes to the electronics that makes all this stuff tick, I know nothing. I could make a simple circuit to light a bulb, and I remember that V = IR. That's about it. So, I think it's probably time to do something about this.

And here's my plan: I'm going to build a robot. Nothing fancy, but a simple thing that can run around the floor of the flat giving our two cats something amusing to chase and pounce on. Here's my (very scientific and carefully designed) schematic for the proposed Mousebot Mk 1:

The whole thing needs to fit into a smallish plastic box, and I think it's best if the drive wheels are largely contained inside (just poking out to touch the floor). With two motors driving two wheels I should be able to manouver the robot like a tank, although I'm not sure what to do with the back – it'll need either a pivoting wheel, or perhaps just to drag the back on the floor. Two switches on the front will tell the robot if it's hit something, and two on the top will activate when the cats manage to pounce on it.

In terms of controlling the whole thing, I'm planning to use an Arduino board. These can be programmed from a PC via USB (the language is really, really simple, and a bit like C), and then run independently when powered by a 9v battery. When I was over in San Francisco I picked up a copy of Make magazine that showed how to remote control a lawnmower using an Arduino chip, so I figure it should be easily up to a simple job like this.

The tricky thing is going to be controlling the motors from the Arduino. As I understand it the board can't handle powering motors directly, so I'll need to work out some way of controlling power from a separate battery pack to the motors from an Arduino output. I think this might require a transistor or two – figuring out how is, I suppose, the next step.

There's loads of Arduino information online, but not so much relevant to UK buyers, so my plan is to document the whole thing here (complete with Maplin part codes) in case it's useful to anyone else. All further instructions, part lists, photos etc can be found here.

I am not a photojournalist

June 28th, 2010

So on Saturday I went and photographed some flowers and petals and stuff.

rose petals

orange rose

Which was all very nice, and nobody got manhandled by bunch of police officers.

Jules Mattsson, on the other hand, is a photojournalist, so on Saturday he went to take some photos of the Armed Forces Day parade. Here's how it went:

Note the veritable  smörgåsbord of pseudo-legal bullshit offered up as cause for his detention. There's coverage of the incident on the British Journal of Photography, here, and also advice for photographers here.

Daily Mail iPhone Fail (whale)

June 27th, 2010

10.30am or so this morning, on the internets:

Which would be, if true, something of a scoop for the Daily Mail. So let's take a look at the article – here's the first few paras:

Which is great – the source is Mr Jobs himself. On Twitter. Except that, as anyone working in tech journalism should know, Steve Jobs doesn't have a verified Twitter account. It took all of 10 seconds to find the source -  this update:

There are many clues that @ceostevejobs is a parody account – not least the phrase "of course this is a parody account" in his biography. Apparently, though, nobody at the Mail bothered to check. I published a link on Twitter. People laughed and mocked. Sarcastic comments appeared on the article. Still it sat unchanged. A few hours later a colleague pointed out that it also contained a howling typo – that, too, sat uncorrected.

All in all, then, an astronomical fuckup that lead to an incorrect article being published. So where's the correction? There isn't one. Instead it took around four hours for the Mail's web team to notice – or perhaps to decide that the traffic they were getting no longer outweighed the potential embarrassment – and the page disappeared offline at around 2pm.

So there you have it: shoddy reporting, no fact checking, an incorrect news story sitting online for hours and no apology. At least, for once, it doesn't really matter that much.

The Cat: a creature of rare wonderfulnessosity

June 24th, 2010

The domestic housecat: it offers fluff, hugs and a wonderful array of meowling noises between the hours of six AM and breakfast. Photograph: me.

Just as the frenzy over some kind of rather expensive but shiny smartphone threatens to overbalance the collective sanity of our national press, it seems like a good time to finally review what must count as one of the world's finest achievements: the domestic housecat.

Since the first cats were identified roaming various sandy parts of the world humanity has upped its game and risen to the challenge of creating similarly wonderful things. Cheese, for example, has been a big hit, as has democracy and Ikea furniture. So what can feline evolution do to wrench back the crown?

The modern domesticat housecat is a creature of rare beauty. Slimmer than a Ford Transit van yet a trifle heavier than a trifle (mmm, trifle) its moderate heft makes it ideal for holding over one shoulder so that it gets a better view of the pigeons in the tree across the street. Fluffy around the edges, it remains relatively comfortable when – and it will do so often – it falls asleep on your lap, stomach, feet or legs (other favourite spots: your laptop, your bag, the sofa, the sink, under the boiler). Jonathan Ive has not, to my knowledge, compared cats to any model of camera, but I'd suggest a Zenit E SLR, mostly because I own of those also and they too tend to be a little temperamental. The proof of concept model – the kitten – is similar but smaller, with brainfuckingly cute mannerisms and a head that appears, like an SD anime character, to be two sizes too large.

Photo: Ralph Cat, in "kitten" beta version.

Domestic cats are widely available in the UK, often for little or no up-front cost. I share ownership of two versions – one in "grey tornado of fluff" finish and another in "basement cat black" – both of which we adopted*. On the front can be discerned a giant array of whiskers, used largely to see whether it is possible to crawl behind the fridge again or whether the latest human attempt to block this space has proven successful, while on the back is a port through which the manufacturers of Catsan are kept in business. Cats cannot take photographs, and have no need to as their owners are guaranteed to spend hours photographing them instead and sharing the results with anyone and everyone online.

Although a standard for speech and video communication is supported – the cat will honk, meowl and burble, while the human end automatically steps-down to a kind of childish babbling interspersed with terms of adoration -  it seems limited to discussions revolving around food, cat hair on the sofa and who's the most adowable fuzzywuzziest wickle fuwbawl oh-yes-you-are. The cat's eyeball – using a technology that I shall call the retina, because that is what a fucking retina is, thank you very much, Steve – delivers astoundingly crisp images of toy mice, pigeons, food and sunny spots on the carpet. Or so it seems.

Various companies have produced cases for the domestic cat. Some even look like bees. They provide no real protection, however, and clearly anyone who attempts to throw a cat across a room,  bee-costumed or not, should be hurled into a vat of angry scorpions.

With fluffy coats, adorable big glassy eyes, fwuffy paws, a battery that lasts most of the day before the low power alarm is sounded at great length, a surprising amount of pep when toys are produced and a frankly adorable habit of following you around the flat while purring with sheer delight, the cat has once more pounced over the competition, stolen its mouse and hurried off to hide it behind the toilet. Dogs might be man's best friend, but the domestic cat is – apologies – purrfect.

www.tomroyal.com

* Buying details: please do not buy a cat – many hundreds are waiting to be adopted. If you own one, insurance is absolutely fucking vital and not very expensive. Monthly food tariffs vary from £20 (Rahph cat, Whiskas) to far more (Hunter cat, special medical food). Vet checkup costs (at least £100/year) apply. Meow.