Tuesday 31 January 2006


Discovered an anomaly with radio buttons and JavaScript yesterday. Should you create a form that contains just a single radio button rather than a set (as might happen is the form is built dynamically using PHP), a JavaScript array of the radio button will be of undefined length, even though it contains 1 element. You can avoid generating a JavaScript error by first testing to see if the length is 'undefined', thus:

The JavaScript:

function checkForm(form) {
if (typeof form.radioButton.length!="undefined") {
// there must be more than one button
var flag=0;
for (i=0; i< form.radioButton.length; i++) {
if (form.radioButton[i].checked) flag=1;
}
if (flag) return true;
} else {
// there's only one button - so can test directly
if (form.radioButton.checked) {
return true;
}
}
alert ('You must check a radio button');
return false
}


The HTML:
<FORM ACTION='somewhere.php' METHOD='post'>
<INPUT TYPE='radio' NAME='radioButton' VALUE='1'>
<!-- if there were to be more buttons, they would appear here -->
<INPUT TYPE='submit' ONCLICK='return checkForm(this.form);'>
</FORM>
Technorati tags:

Monday 30 January 2006

You have received a new message


Photo from flickrCF sleeve for iPAQ
Photo uploaded to flickr 30 Jan '06, 10.41am PST by hockeyshooter

For Lorenzo's next mission to Everest, I've finally gotten hold of an expansion sleeve for my HP h5550 iPAQ to enable reading from a CF card - has an extra battery too. Came from BMSoftware here in the UK. From the scratches on the back, it looks second hand - I guess they're no longer made. No idea what the life of its second battery is going to be like; Lorenzo will have a 12v solar panel with him anyway for charging the satellite phone.

Sunday 29 January 2006


"ID cards are of 'limited value'
ID cards would be of 'limited value' against terror and would not have prevented the London attacks in July, says the reviewer of anti-terror laws, Liberal Democrat peer Lord Carlile. He said he had changed his mind on identity cards, which he had previously backed: 'I can't think of many terrorist incidents, in fact I can think of very few... that ID cards would have brought to an earlier end,' he told GMTV.
"

Time to bury this daft idea, Home Secretary.

BBC NEWS | Politics | ID cards are of 'limited value'

Saturday 28 January 2006


Today's FA Cup game of Reading vs Birmingham was nearly a disaster. Got stuck in traffic on the M1, then on the M4 at the Reading exit. All official parking by then full. Got to the ground about 5 minutes into the game. Fortunately didn't miss anything. Goals were both down the far end and I couldn't see the ball through traffic, but got one celebration shot at least. Laptop was a little flakey again - doesn't seem to like Reading's wireless network, even though I don't use it.

The teams seemed pretty evenly matched, so the 1-1 final score was no susprise. Birmingham chose to make three substitutions in one go, taking Heskey off which seemed a little odd. Reading were missing Kitson with a hamstring problem and I think with him, they'd have won.

Monday 23 January 2006

WRT54G


Photo from flickrWRT54G
Photo uploaded to flickr 23 Jan '06, 11.39am PST by hockeyshooter

If you ever wanted to know how much current a Linksys WRT54G uses, for example if you want to run one in the middle of nowhere off a battery and/or a solar panel, it appears to be around 280mA.

Technorati tags:

"Time to return the Arctic favour
These days the Arctic, and to a large extent the Antarctic, has become a playground for the wealthy holidaymaker. They play out a heroic charade which bears little or no resemblance to the real explorers of yesteryear.

It is all meaningless nonsense and is still viewed by the real heroes of the Arctic, the Inuit, with bemused and bewildered amusement. So often travellers to the Arctic rely on the Arctic peoples to help, guide or share their expertise with them. Yet, when they return to their after dinner talks and ego-fanning book launches, the very people that allowed them their indulgence are hardly mentioned or even acknowledged.

The Inuit voice is almost inaudible on the world stage and one cannot help but wonder if anyone even knows they exist.

Glenn Morris (author) is a fellow of the Royal Geographical Society and has travelled extensively in the Arctic. His most recent expedition, Greenland by the Polar Sea, looked at the impact of climate change on the Inuit people.
"

The amount of ice lost in just the last 25 years is frightening.

BBC NEWS | Science/Nature | Time to return the Arctic favour

"TV's 'sleep' button stands accused
Britons waste the equivalent of around two power stations' worth of electricity each year by leaving TV sets and other gadgets on standby. Last June Environment Minister Elliot Morley, responding to an MP's question, revealed that electrical equipment in sleep mode used roughly 7TWh of energy and emitted around 800,000 tonnes of carbon. The government is currently reviewing the options of how to keep the UK's lights on in the future, at the same time as reducing the amount of greenhouse gases being released into the atmosphere.

Norman Baker favours a 'polluter pays' approach to the standby problem: 'In the end, there has to be costs in the form of manufacturers paying something to recognize the damage they are causing. Some of these standby modes for televisions use two-thirds of the electricity that it would if it were on. I think some people think that standby is a tiny red dot that has no impact at all.'

The Energy Saving Trust's survey found that one-in-seven people questioned thought putting devices on standby was actually more energy-efficient than switching them on and off. The MTP's Matthew Armishaw clears up any confusion: 'That is largely a myth. There may have been some issues with very old electronic components, but it is certainly not the case with today's consumer electronic goods.'
"

BBC NEWS | Science/Nature | TV's 'sleep' button stands accused
Technorati tags:

Sunday 22 January 2006


Looks like my descision to dump Minolta for Canon has now been fully vindicated:

"Konica Minolta Announces Withdrawal Plan for Camera Business and Photo Business
In camera business, we have expanded picture-taking opportunities by developing innovative technologies such as the world's first autofocus cameras. In 1962, our camera, well-accepted for its high reliability, boarded on the US's first manned spaceship 'Friendship 7.' Also, ever since introduction of the world’s first body-integral autofocus SLR camera, Maxxum/Dynax series, in 1985, SLR cameras have become more popular among picture-takers, and we have succeeded in selling 16 million units of interchangeable lenses since then.

However, in today’s era of digital cameras, where image sensor technologies such as CCD is indispensable, it became difficult to timely provide competitive products even with our top optical, mechanical and electronics technologies.
"

No kidding - it took years for Minolta to get around to launching a digital SLR, by which time most of their (high-end) lens range had become hopeless out-of-date.

Konica Minolta withdraw from camera business: Digital Photography Review

Saturday 21 January 2006

Northampton vs Macclesfield


5-0 is not the sort of result you expect to see from a Northampton home game. And again, results from games of the teams above us helped us - only Leyton Orient won.

Even scarier and more invasive than ID cards:

"Britain will be first country to monitor every car journey
From 2006 Britain, is to become the first country in the world where the movements of all vehicles on the roads are recorded. A new national surveillance system will hold the records for at least two years. Using a network of cameras that can automatically read every passing number plate, the plan is to build a huge database of vehicle movements so that the police and security services can analyse any journey a driver has made over several years.
"

Unfortunately you need an account on the Independant website to read any more of the article.

Independent Online Edition > Transport

"ID cards 'should be compulsory'
The Lord Chancellor has said ID cards should be made compulsory if introduced in the UK. Lord Falconer told the BBC that the only way to get full benefit from the scheme was for people without a passport to carry one.
"

My Mum is 86. She has no valid passport. She hardly ever leaves the house. Is she going to be made to fork out for one of these things? Same with the thousands around the country who live in care homes.

There's no proof that these cards will be any safer than existing cards that use the same technologies - like credit cards. Millions of pounds are still lost to credit card fraud each year - I doubt it will take more than a couple of months for someone to either forge a card or hack into the database.

Blair and co: You can stuff your ID cards where the sun don't shine.

BBC NEWS | UK | ID cards 'should be compulsory'

Friday 20 January 2006


"Tax plan for greener light bulbs
The government is considering an extra tax on energy inefficient light bulbs.
Costlier compact fluorescent bulbs use a fifth of the energy of Victorian- style incandescent ones, those with a filament, and last much longer.
"

At last, some positive action from the Government. Don't stop there - plastic bag tax next.

BBC NEWS | Politics | Tax plan for greener light bulbs
Technorati tags:

Thursday 19 January 2006


"Apple addresses iTunes concerns
Apple has made changes to its iTunes music software in response to complaints that it abused user privacy. The row blew up over a new iTunes feature that recommended other tracks users might like to buy. An investigation by bloggers found that the recommendation system used unique identifiers for each user in a way that could compromise privacy.
"

Well done, Apple, for listening - but make sure you've leaned a lesson from this mistake.

BBC NEWS | Technology | Apple addresses iTunes concerns

Tuesday 17 January 2006


CD-R lifetimes not what you thought
"...expert physicist Kurt Gerecke that works for IBM Deutschland has warned users not to use CD-R's for long term backups. His advice is that if you don’t want to keep backing up the same discs every few years use magnetic tape backup instead. Kurt went on to say that unlike pressed CD’s, burnt CD-R’s lifetime is much shorter with lifetime ranging from just 2 to 5 years depending on the quality of the disc."

I've got tens of thousands of photos on CD-R, some from film (for which I still have the negs and could therefore re-scan them) and some from digital SLR (for which there are not originals).

CD-R's lifetime not as long as you think - CD Freaks.com

Monday 16 January 2006


Having spent a good portion of Saturday afternoon getting soaked shooting photos of Reading vs Coventry, I thought it would be a good idea to look into getting a proper rain cape. I noticed that very few of the other photographers were using the 'real thing', but I now realise why.

Ewa-Marine C-500 rain capeCameras Underwater list the Ewa-Marine C-500 at just shy of £80 each - which by anyone's reckoning is a lot of money for a bit of clear plastic and some velco.


DIY rain cape

Using this as a basic design, I thought about making my own. I took two A4-sized clear ring binder sleeves, cut off most of the edges and joined them together with ordinary clear sticky tape. It just happens that they are just big enough to go over the hood for my 300/2.8 so I don't even need to use Velco to attach it. Its not exactly robust, but given how cheap it was (pennies) if it gets torn or too creased, I just bin it and make another.

Technorati tags:

Saturday 14 January 2006

Reading vs Coventry, Championship


Was at Reading's rather spiffy Madejski stadium today. Wasn't much fun covering this game in the rain: must get myself a proper rain hood - which even many of the other pros didn't appear to have.

Friday 13 January 2006


Following on from my iTunes post below, to those who ask "what's all the fuss about", what should we expect next? An email saying "we notice you have just listened to 'Angels' by Robbie Williams, but from our records we find that you have not bought that track from the iTunes Music Store. To save you time and effort, we have charged the cost of the track to your registered credit card account. Thank you for using this service".
"Snooping fears plague new iTunes
Apple has been criticised over a new version of its iTunes program that can keep track of a user's listening habits. The latest update includes a feature that recommends tracks similar to the music being played via iTunes.

Soon after the update was released, blogger Marc Garrett wrote a journal entry about MiniStore and the data it passes back to Apple. Further work by other bloggers such as Kirk McElhearn found that the data being sent back to Apple to make the recommendations included artist, title, genre as well as unique identifiers for a computer and iTunes account.
"

I'm not happy about this at all. I don't mind sending data about what I'm listening too - I use Audioscrobbler, now lastFM, but I effectively do so anonymously. iTunes ties this data directly to me via the account that I use to buy tunes via the built-in shop. I've paid for this music - I don't expect to be targeted by more advertising.

BBC NEWS | Technology | Snooping fears plague new iTunes

Technorati tags:

Wednesday 11 January 2006

Robin Cousings at BETT 2006


Photo from flickrBETT 2006, Olympia, London
Photo uploaded to flickr 11 Jan '06, 8.44pm PST by hockeyshooter

I was in London today to take photos at the first Making The News competition at London's Olympic exhibition hall. Robin Cousins, MBE, was doing a great job of presenting the prizes - makes a change to have a celeb that's so cooperative.

NowPublic logoBlogging takes another step with this "post your own news site" which is interestingly hosted in Canada.

NowPublic is a site where you can publish news about events you care about. It's easy and let's face it, you are more interesting than your television. You can use NowPublic to share your photos and videos, get coverage of news you care about, and read news that you won't see anywhere else.

The owners of the site emailed me in response to a photo I'd posted on Flickr suggesting I upload it to illustrate a story on Tony Blair.

Developing New Stories | The News is NowPublic.com

Tuesday 10 January 2006


BT Relate SMS phoneReceived my new home phone today - another item bought on eBay (its very addictive, you know). Its a BT Relate SMS, which means not only does it use Caller Display to show who's calling you (provided you have entered their number into its phone book) but you can also use it to send and receive text messages. And it doesn't require a SIM card to do this either - messages are billed straight to your normal BT home account (receiving messages is free). Neat. One thing about the phone that did come as a surprise however was its requirement for 4 AA batteries: I guess if you're going to spend the time filling up a 100-number memory, you don't want to loose it all by unplugging it.

Photo © BBCWatched the first episode of time-travelling cop show Life On Mars last night and was extremely impressed. It is very well cast (John Simm, from the equally superb State of Play) and acted, and they have gone to enormous effort recreating 1970s London. What a contrast to the vacuous offering from Channel 4 at the same time: Celebrity Big Brother.

Saturday 7 January 2006


Went haring down town today to catch a train to London, only to find that it now costs £5 to park your car on a Saturday. Five pounds. In change. Exact change. Who carries five quid in change in their pocket these days? And why are they charging for parking in the first place? That's a whole quarter of my train fare again. Doesn't exactly encourage you to use the train, does it? In fact unless you're going at least fifty miles or so, its probably cheaper to drive. And what exactly do you get for your five pounds? I guess it must go to pay the dozens of armed guards that will be keeping an eye on your motor in your absence - not, coz there aren't any guards at all.

Crystal Palace vs Northamton Town, FA Cup 3rd Round


My first go at shooting professional football, at Selhurt Park about an hour before kickoff - I got there early! Palace won 4-1, including two rather dubious penalties, so the Cobblers are now out of the FA Cup and free to concentrate on their promotion drive (well, you've got to find a positive in everything, haven't you?).

Friday 6 January 2006

Spotted what I at first thought was a song thrush on a fence post in our garden this morning, only to realise it was actually a kestrel. I raced to get my camera out but I couldn't get it to focus fast enough - it was very dark and I was trying to shoot through double glazing. As soon as I had it in the frame it suddenly swooped down after a bluetit on our peanut feeder, and they both flew some incredible aerobatics as the poor wee thing tried to escape - which I think it did. A few weeks back I'd seen a lot of blackbird feathers on the lawn so I'm guessing the kestrel had visited before and managed to make a kill. Whilst I'm thrilled to see a kestrel in the garden, I'd rather he not eat our song birds, which are rare enough as it is!

Thursday 5 January 2006


"Trial bid to stop belching cattle
Aberdeen scientists are carrying out commercial trials on a feed additive which they hope will stop cows from producing large amounts of methane.

Cattle are capable of producing 500 litres of the potent greenhouse gas every day, mostly through belching. Researchers at the Rowett Research Institute have found a way of cutting back on the methane produced by ruminants like sheep and cows.
"

How about a Rennie, about a foot square?

BBC NEWS | Scotland | Trial bid to stop belching cattle