Sunday, December 07, 2008

HotSpot Shield

If you are out and about with your iPhone using public WIFI HotSpots and fancy a bit of security/privacy, there is a free VPN service available.

Simple instructions for setting it up are here.

Easy Peasy .....

Monday, November 10, 2008

More Copyright Infringement

I have just had another of my photos ripped off and used commercially without proper attribution etc. etc.

I really like Flickr, I think being part of the community has improved my photography, which is why I keep using it. But there is a price to pay, even though I use a Creative Commons license on my images, 20 or 30 images (to my knowledge) have been used inappropriately and it is extremely difficult to find out when this happens and almost impossible to do anything about it.

Flickr themselves are appalling in this regard. 
Two totally inexcusable things that they do, which IMHO promote copyright theft, display their ignorance and devalue CC Licencing : 

Flickr remove all EXIF tags (contains the copyright info) from your images that go into the download page (this is totally outragrous!!!).

Flickr allow you to change the licensing you add to an image after a license is applied ........ this is disallowed by Creative Commons, their licenses are by definition irrevocable.

However, lots of people do the right thing ....... I love it when someone writes to me describing their project, asking to use one of my images, I seldom refuse ....... and I have a growing collection of books and pamphlets at home, the results of some of those projects .......

So Flickr, get your act together, please !!!!!

Saturday, November 08, 2008

Obama on Race

My vision for America from the UK's Independent Newspaper.

Many thanks to Howard for pointing this out to me.

Howard says :
It's long, but this is Obama's speech on race - the most intelligent political speech on the subject I have ever heard, and a good primer on the issues. It is a measure of the man that he didn't simply disown Reverend Wright, but addressed the issue head on.

Wednesday, November 05, 2008

Well done America

I still could not really believe as I went to bed last night that this would be the outcome.

What a happy awakening!!

Not only has America voted for their first African American president, they voted for a clearly intelligent and erudite man, something that after the last few elections, I thought would never happen again.

Howard said something very memorable to me the other day ....... If Obama gets in, two little black girls will call the White House home ....... 

I hope this is finally a resolution to some of America's appalling racial history.

Thursday, October 09, 2008

Good money after bad

So the UK is also resorting to fund and forgive the past bad practises of their banks. 

What surprised me, was not that we are bailing out the Merchant Bankers (cockney rhyming slang pun fully intended) but that the amount of money on offer is almost the same as what is being offered in the US.

Is the size of these two nation's banking sectors really equivalent?

I bought the flat where I live in Brixton, for £18,000 in 1985.
There was a time when it became worth a large fraction of a £million!!!
In fact there were several years in which the value of my flat increased by more than I earn working!!!
This always seemed particularly mad to me ...... I was left wondering “what does that mean?”, “where does that money come from?”, “what does that mean for the currency?”.

Well it is a bit clearer now, we have been living in a “consensual hallucination” of a functioning economy. All this so called wealth has been an illusion, one that future generations will pay for, along with the price of our profligate environmental impact.

All we have to look forward to as we get older, is being despised by the young for our lack of foresight and restraint. Yummy!!!!

Sunday, October 05, 2008

Rare Opportunity

We are living through one of those deeply rare opportunities in history.

A time when it is possible to make a paradigm shift in society.

The last one I remember was the fall of the iron curtain, there appeared to be a slim window of opportunity in which those countries and their people could have found some new way, that was not socialism and not capitalism, but alas the moment was lost.

Now we have a situation where it is very clear to everybody (not just intellectuals, pundits and experts) that the foundation of our current system of economics is deeply flawed.

A moment in which we widely understand that our economies are deeply unsustainable, not only from the point of view of capitalisation and wealth but also from the point of view of environmental impact.

Even national leaders like Sarkozy are calling for structural change.

. . . lets not just leave it up to them . . .

Friday, October 03, 2008

Google's CalDav

Google have an implementation of CalDav for use with iCal on MacOSX, I just tried it, it's pants, don't go there.

I have been using the OpenSource Darwin CalendarServer for nearly a year now. I runs it on my old Mac Cube at home (it works on most OSs), to share several calendars between multiple machines. While there is lots of missing functionality, the important stuff works.

I thought I'd give the Google implementation a go, as it saves me having to run my own.

Not good.

Basically, if you have more than one calendar (I always have had more then one eg.  Home, Work, Admin, Holiday, Project, etc.) then you'll find the Google Calendar integration into iCal a real mess.

Unlike Darwin CalDav, a lot of important stuff in Google's CalDav really does not work.
Firstly, if you have multiple calendars, each will be in it's own section in the iCal sidebar, this reeks of a really big hack IMHO.
You cannot make new calendars from iCal. 
Each calendar needs replicated account details (username, password etc.).
There is no support for alarms or ToDos etc. etc. etc.

There appears to be such an enormous impedance mismatch between iCal and gCal that I don't see how they will ever get this stuff working smoothly, much like the terrible mess caused when I tried using the new 'Sync with Google' functionality in Leopard's Address Book application. I think Google's models for this kind of info are too simplistic, they only support the simplest possible scenario and then not well.

Since I stopped using the appalling Dot Mac service for syncing, I have tried almost everything I could find to keep this kind of data synced between multiple machines and nothing is really reliable (except CalendarServer). I am not tempted to try MobileMe, it sounds even less reliable then it's predecessor.

It is a real shame, I would happily use Google for this stuff, if it worked with the built-in desktop applications, but GMail is the only Google App that works well enough IMHO. Even then coupled with GMail using IMAP can be pretty ropey!!!

So while I am please Google is trying, my assessment is : Could Try Harder.

Euro * Bad

Beware booking Eurostar tickets at the moment. The channel tunnel suffered a bad fire a few weeks ago, but Eurostar are acting as if nothing happened.

I am off to Paris next week, to help some friends setup an exhibition of the work of Australian artist Tim Maguire

As usual, I booked tickets via
They take you through the whole process, book your tickets (I book mine based on arrival time), choose my seat (so I have a power socket), make my payment etc. etc.

Then, after I have completed my non-refundable, un-alterable ticket, they say that the timetable is completely irrelevant due to the fire and my train may or may not leave at the allotted time, that for sure it will take at least an hour longer than planned.

WTF do they think they are doing!?!?!

OK so the fire was not their fault, they are obviously struggling to cope with it, but to sell something they know they cannot provide with no warning up front, this is unbelievable!!!

This feels like fraud, like selling under false pretenses, like totally shoddy and incompetent behaviour!

BAD Eurostar!!!!

Tuesday, September 30, 2008

Highly Recommended

The 3 part BBC documentary “The Power of Nightmares” is now available via Google Video.

I saw this when it was broadcast last year and was very impressed by the quality of insight and the incredible range of interviewees.

I have been recommending it ever since.

Saturday, September 20, 2008

Meme (Me)

Via Bertrand

1. Take a picture of yourself right now.

2. Don’t change your clothes, don’t fix your hair…just take a picture.

3. Post that picture with NO editing.

4. Post these instructions with your picture.

Tuesday, August 26, 2008

Safari versus Firefox

Safari is my every-day browser, it just gets better and better.

Firefox is the browser I use for two specific tasks:

1. I prefer to use Firefox for my daily Google Reader session, because it is so easy to turn off advertising. I would not need to do this if adverts in article I read were not so extremely obtrusive. I find it much harder to read when the text is surrounded by strobing adverts for products I have no interest in. So I just turn them off. Sorry for the publishers who need the income but the advertisers are doing you a disservice.

2. I use Firefox for debugging Ajax web applications, using the truely excellent FireBug. Firebug Lite runs in Safari, and it is an incredible acheivement, but it does not hold a torch to the real thing.

Firefox has lots of annoying niggles. The two that I find the worst are:
No obvious access to the system dictionary or spell checker.
Uses option instead of command as the meta-key to open a search or link in a new tab.

(As I said, I am used to Safari)

Anyway, it looks like some of my habits are about to change.
I just downloaded the latest nightly build of WebKit and it blew me away.

Webkit has something very similar to FireBug built into it now, I have not used it heavily yet, but what I have seen looks really promising!!

FireBug can give you some incredibly unuseful error messages sometimes, maybe WebKit will be better.

If you write and debug web applications for a living, I heartily recommend you try out a WebKit nightly, or if not, wait for Safari 4 which has recently been seeded to Apple developers.

Tuesday, August 05, 2008

Number Format Heaven

Well here's a happy ending ....... I have a working solution to this hell.

I did not try any of the solutions I wrote up in the comments of the hell post. I just woke up the next morning realising it was even simpler.

The solution to getting Cocoon and Dojo using the same localised formats for numbers, was to use Java classes that are built using the same CLDR data as Dojo.

I now use the NumberFormat classes from instead of java.text, to send and receive formatted numbers. It was almost a drop-in replacement.

The IBM versions have their format data compiled from the same source as Dojo. While java.text.*'s data seems to be really stale.

Choose the version that uses the same CLDR version as Dojo.
Dojo 1.1.1 uses CLDR 1.5.1 so wants icu4j version 3.8.1 and Dojo 1.2 will use CLDR 1.6 which comes in icu4j 4.0 (so there is a clear upgrade path).

Here's one happy bunny.

The one remaining fly in the ointment is languages like Hindi and Arabic, that use different Unicode characters for digits, which is really ironic as supposedly zero came from India and the 1 to 9 came from Arabia, (imagine trying to do maths with Roman numerals!!) probably the next thing to try is re-building Dojo's locale number libraries with everything included.

Tuesday, July 29, 2008

Number Format Hell

I am in localised format hell at the moment.

I am currently re-working Apache Cocoon CForms.
My current task is a validating, currency field, which can properly display and edit any currency in any locale.

CForms (started long before Browsers became smart with big Ajax Libraries) allows you to use Convertor classes to map either way between an Object in the business logic and a localised String to be edited in a form.

Number Convertors are based on java.text.NumberFormat class.

Let's say that the Model (Bean, XML frgment, etc.) I am editing contains a value that represents a Currency in Pounds Sterling as a java.math.BigDecimal, I'd set up my Convertor like this :
<fd:field id="dieselprice" required="true">
<fd:label>Price for a liter diesel:</fd:label>
<fd:datatype base="decimal">
<fd:convertor variant="currency" currency="GBP"/>

When my number eg. "1000.00" goes into the Convertor, it is localised to the format for the viewer's locale, so in the UK someone should see: "£1,000.00", in France: "1 000,00 UK£" etc. (PS. Diesel will cost £1000 per litre one day, you'll see ....)

So far, so good. The user gets a number in a format they recognise, the edited number is returned to the server and the Convertor performs the reverse operation, to store it back to the java.math.BigDecimal.

Now the fun starts ........

I am changing CForms on the client-side to use all Dojo editors. In the case of currency, I use the dijit.form.CurrencyTextBox. It is a cool editor, while the editor is not focussed, it shows the formatted version "1 000,00 UK£" (fr_FR) but as soon as you click to edit it, it gives you the simple version, where it is harder to make editing mistakes "1000,00" and gives you validation feedback while you are typing.

So here comes the first impedance mis-match .... Dojo does not expect the server to format and localise the number as a String, it expects the server to send the value in the same format as a JavaScript primitive "1000.00". Dojo then uses it's vast library of localisation formatting rules to convert the primitive to a formatted String suitable for the locale of the User, allow that to be edited and post the new primitive back to the server.

So, I can hack Dojo, or I can hack CForms. I hacked Dojo, because CForms has the right behaviour, it should still work when someone has JavaScript turned off, they will see a simpler form but with properly localised values in it.

So I extended dijit.form.CurrencyTextBox <-- cocoon.forms.CurrencyField, to allow it to send and receive formatted strings instead of number primitives (as text).

Boom Boom, job done! (so I thought).

The first hint of trouble appeared when I was testing numbers represented as percentages. They would display fine in some locales but not in others. You see Dojo needs to be able to interpret the format to be able to validate it and it turned out that Java and Dojo use different formats for percentages in fr_FR and de_DE (France and Germany).

While Java formats them as "#,##0%" (123%) Dojo formats them as "#,##0 %" (123 %).

I am thinking WTF! These are supposed to be international standards! Where's this stuff coming from?

On the Java side, the closest hint I could find was that java.text.DecimalFormat is copyrighted by Taligent (IBM). It is also possible that IBM wrote the number formatting in Dojo, I believe they contributed all of the Internationalisation classes to Dojo, but specifically, Dojo's datasource for compiling it's lookup tables is I have yet to ascertain where Java sources it's data, but there are clearly problems, I read that JDK7 will package the currency bundles in a way that does not require a whole JDK update when currencies change.

So there is an annoyingly large number of very detailed differences between localised currency formats in Dojo and Java, simple differences like individual locale's currency symbol can be worked around via Dojo APIs, deeper problems like group and decimal separators not matching for Arabic and some far-eastern countries are proving more wasteful of my time.

I am currently using Java 1.4.2, will upgrading change the situation? Make it better? Make it worse? My JDK is supplied and maintained by Apple. Will moving to another OS make it better or worse?

It's an abysmal situation!

One tip for the would-be user of java.util.Currency and java.text.DecimalFormat is, if you call DecimalFormat.setCurrency, make sure you also copy over the number of decimal fraction digits, DecimalFormat leaves them out, resulting in a bad format for currencies that have no decimals (Japanese Yen etc.).

Currency currency = Currency.getInstance("GBP");
int digits = currency.getDefaultFractionDigits();
DecimalFormat format = (DecimalFormat)NumberFormat.getCurrencyInstance(locale);

I did not find this in any of the tutorials online, but it is in the JavaDocs.

Friday, July 11, 2008

iPhone Day

All the net is abuzz with iPhone unboxing reports etc.

I gave my iPod touch to my 14 year old godson a few weeks ago, a bit rash, I miss it a lot, but my intention had always been to pass it on when the 3G iPhone came along.

I am bursting to get one now ....... specially after I spent half an hour looking through the iTune AppStore and already found about 10 apps I would have downloaded straight away!!

One app that caught my eye immediately was FileMagnet. One of the reasons I jailbroke my iPod was to be able to copy files to it for viewing on the device, reference material, stuff like pdf public-transport maps of places I am visiting ...... it was never an easy process ...... entering those darn file:/// urls into MobileSafari, FileMagnet looks a lot easier.

But there is one hell of a bitter pill to swallow!!!!

There is only one carrier in the UK, no competition in most countries, therefore often ludicrous prices.
O2 has a bad rep (but then I guess all carriers have a bad rep).
The deal itself in the UK is not so bad, I'd be paying only a little bit more than I do now and I'd get more service.

But the international data-roaming charges!!!!!!!!

£3 per Meg in Europe, £6 per Meg in the rest of the world!!!!!!
This is utter madness!!!!

When I am abroad in a strange city, that is just the time when I'd want data-access, GPS + Google Maps would be indispensable.

An article in ArsTechnica today, outlines the amount of data transferred per hour to use different applications.

Using Google Maps comes out at 6.5Meg or £19.50 per hour in Europe!!!!

For crying out loud!!!! And you cannot even work around it by legally de-SIM locking and using a local carrier.
This just ruins the whole purpose of the device and I think the bad feeling from this will ultimately rub-off on Apple.

The EU is currently trying to force a reduction in call-roaming charges across Europe, apparently they also have data-roaming charges in their sights, I really hope they get a move on!!!

Monday, June 30, 2008

Form Symbols

I am re-working Apache Cocoon Forms framework at the moment, mainly upgrading it to use the new features of Dojo 1.1 but also taking the opportunity for a bit of a cleanup.

One thing I am looking at, is the three symbols that can sit beside form fields :
1. the field-error marker (currently uses an exclamation mark, don't like it, not visually strong enough)
2. the field is required marker (currently uses an asterisk, OK, I suppose .....)
3. the field help marker. (currently uses an icon, one of mine I think, a bit ugly)

I am trying to decide between two different approaches, and you may be able to help me decide .......

The typical approach (the one used extensively by Dojo) would be to have graphical icons as the background of a tag, turned on and off as appropriate by toggling the 'display' css property.

This is all and well, but TBH I am not such a great icon maker, not all of the ones I need are included with Dojo, I do not want to rip off someone's copyright by mistake and infect Cocoon with it.

I also reckon that these kinds of symbols are culturally-specific, hence should be controlled by the locale of the client.

So my alternative approach is to use characters from Unicode.
The characters I have chosen display fine in MacOSX, but I realise they might not do so under Windows or Linux.

So, you could help in two ways :
1. Do these characters display properly on your platform?
2. In the context of a latin language, do they convey the right meaning?

1. field error (name: High Voltage Sign)
2. field is required (name: Black Star)
3. field help (name: Circled Latin Small Letter I)

Please let me know what you think in the comments.
Many thanks for your feedback.

Wednesday, June 04, 2008

More Fraud

I have been ripped off again.

Apparently my debit card has been skimmed and the info used to attempt purchases across America and Nigeria. The bank noticed the activity immediately and stopped my card (last time, it was up to me to notice).

Unfortunately they stopped the card without telling me ....... I started having problems with payments failing, visited my branch to see what was going on with this (and several other problems) spent a frustrating half-hour waiting in a queue, got no resolution from them ...... called the bank's main office and began to hear that they could not deal with any of my issues because my account had been security flagged.

I finally got through to somebody useful in the security department and got everything quickly sorted out.

When this happened last time, I assumed my card details had been stolen online and had changed some of my purchasing behaviour accordingly, but what was interesting this time was that they told me that whoever stole my card info, had had access to the physical card itself, i.e. a modified ATM, an employee of a local shop or restaurant etc.

Not at all what I expected.

Tuesday, April 15, 2008

Another reason to eat less meat

OK, so many of you will know that I have been lacto-vegetarian for 29 years.
For me, the reason is metabolic, however there are very many reasons to at least eat less meat and dairy products :

George Monbiot writes in "The Pleasures of the Flesh" :

While 100m tonnes of food will be diverted this year to feed cars, 760m tonnes will be snatched from the mouths of humans to feed animals. This could cover the global food deficit 14 times. If you care about hunger, eat less meat.

Monbiot is an interesting writer.

As a designer, I worked in sustainable design for many years, however I still had some cherished assumptions broken, reading his book "Heat" recently. I highly recommend it.

Monday, April 14, 2008


ApacheCon Euro 2008 is over and I am home, no delays this time.

This was my first ApacheCon, I really enjoyed myself. Many thanks to the sponsors and organisers for a great event.

I went to very few talks, there are a few I regret missing now, but the opportunity to hack was so great. I am in the middle of upgrading Cocoon CForms to use Dojo 1.1, so having access to several other Cocoon comitters proved very useful. Many thanks to those of you who gave me your time, especially Grzegorz Kossakowski who spent several hours helping me with Cocoon 2.2.

I had some useful business discussions that I hope will lead somewhere.

My talk seemed to go OK. No one obviously walked out during it, no heckling, there were some questions at the end, with easy answers (Yes, No, I don't know) and several people approached me over the next couple of days to discuss it further.

Many thanks to Lars Eilebrecht for introducing my talk and getting it together when the wireless mike ran out of batteries : )

I suppose my main regret was not meeting more of the Apache people whose names I have known for a long time.

Sunday, April 06, 2008

All Change

Yesterday I was out in a tee-shirt and light jacket, and overheating, taking photos of a fire in Brixton.

Today there is 50mm of snow on the roof.

Wacky weather !

Tomorrow I am off to Amsterdam for ApacheCon. Taking the EuroStar to Brussels and the Thalys to Amsterdam. I just hope it is not the "wrong type of snow".

I have recently been investing in improving my flat's energy use.
A new hyper-efficient central heating boiler, an extra 300mm of loft insulation and replaced all filament light-bulbs with high-efficiency LEDs (and a few compact fluorescents).

My energy bills are already noticeably down, my flat is light, snug, warm and nice to see ....... unlike my neighbour, the snow on my roof is not melting yet :-)

Next project: replace the 20 year old heath-robinson MagnaTherm magnetic stick on plastic secondary glazing with built-in units.

Suppliers :
The boiler is off the shelf from Vaillant. What amazed me about these new condensing boilers is that the flue gas is barely warm, the flue is POLYTHENE!!!!
Some of the LEDs are from, they have some great products, but they have real supply problems and they really messed me about recently .....

Saturday, April 05, 2008

Destructive Editing

One of the really great things about Aperture, is it's non-destructive editing.

When you are working on a photograph, you can roll back any edits you perform, at any time.
When you perform say, a crop, the crop is not applied to the actual photo (until you export) the crop is saved as an instruction. Let's say I then do some colour adjustment, then realise I do not like the crop, I can go back and re-do it, without effecting any subsequent changes.

The good thing is, you do not end up with lots of versions of the full binary, you end up with the binary with a bunch of instructions on how to render it into different versions, it saves a lot of space and hassle.

The down side is that you need a reasonably fast computer.

It turns out the other downside is that you cannot do any pixel-level editing ...... you can only apply effects to the whole image.

Apple just introduced a plugin API to Aperture 2.1. As the library of available plugins builds up, there will be less need to export to PhotoShop to do edits on regions of images.

Unfortunately, this breaks your non-destructive workflow. As soon as you invoke a plugin, Aperture exports your image with all of your edits applied, before passing it to the plugin, much like editing in PhotoShop does.

The first time I tried it, on a 7Meg RAW image, I ended up with a new 70Meg master, which was passed to the plugin, meaning any effects I applied before the plugin are locked-in.

Maybe it was naïve of me to think that Apple could pull the trick of non-destructive editing in a plugin API. But as they have not, unfortunately, using plugins really throws a spanner in your workflow.

PS. The reason the new Master was so big was that I had the export settings at 16bit, which was probably pretty pointless.

Thursday, April 03, 2008

ApacheCon 2008

I'll be heading off on the train to my first ApacheCon in a few days. I am honoured to be giving a talk on the Wednesday, please come along.

I am looking forward to several things .....

Being in Amsterdam : )
Seeing old friends.
Putting faces to the many Apache peeps whose names I know, but have never met.
Asking lots of dumb questions to whoever Cocoon devs I meet, who know CForms.

Talking of CForms (it's the cool forms framework in Apache Cocoon) I am currently working on upgrading it to use Dojo 1.1.
I just got Repeaters working with Dojo's new Drag & Drop API. It is very pretty, you now get an avatar of your dragged rows, optional drag handles etc.
Next I am looking into changing the way the CForms backend processes repeater events, so that it can handle stuff like : dragging more than one row at a time, row cloning, clone or copy between Repeaters etc. etc..

I am really enjoying the work.
It's like doing a year's worth of 20% time in one go (no, I am not employed by Google, but that does not stop me making time for non-commercial research).

Look forward to seeing you in Amsterdam.

Sunday, March 16, 2008

The Sound of the Lambs

Originally uploaded by sharkbait.
It's that time of year again.

Some of my family have small farms, if I write to any of them around now, I get replies like "Sorry I did not reply earlier, we are lambing".

Lambing Season, for all you city folk, is the time of year when hill farmers are most busy, all of their sheep give birth at pretty much the same time and some need a lot of help. Everyone has to work day and night for weeks on end. It is a time of high mortality requiring very close attention. The vets are too busy, so you usually have to rely heavily on your own skills.

I remember as a kid, there were always a few orphan lambs. We would hand rear them, which is a lovely thing to do, small lambs being absolutely gorgeous creatures.

We'd give the orphans names like "Lamb Chop" and "Mint Sauce", so that as children we would remember that they were destined for the deep freeze.

I have been a vegetarian for nearly 30 years now, but I still remember our lamb as being the best meat I ever ate.

Look out for organic British lamb later in the year, who knows you might be eating one of ours :)

Sunday, February 24, 2008

Not Normal

I do not understand why Nikon do not make a 33.3mm lens.

Since the popularity of three-fourths sensors on semi-pro DSLRs, you would have thought someone would make a 'normal' lens for that sensor size, but no ...... the closest I could find is the 30mm lens by Sigma, which I have and like very much (but it is not quite normal).

I dunno, maybe I an being getting overly nerdy here ...... but all the advice about starting SLR photography says, don't use a zoom, use a normal lens first, learn to move not zoom, learn what that lens can do before moving on.

My understanding is that it is called 'normal' as it has the same perspective as human vision, making it appear very natural.

A normal lens on a full-size sensor or film camera is 50mm. You get many lovely, high maximum aperture, cheap lenses of that size. A normal lens on my Nikon D80, which has a sensor-size ratio of 1.5 would be 50/1.5 = 33.3mm, and no one seems to make one.

Zoom lenses are very convenient, I have one myself, I take it when I do not know what I am going to be photographing. Of course you could adjust the right zoom lens to be at 33mm, but you probably would not get such good results. Zoom lenses are always compromised in some way ....... at least ones in my price bracket. For instance the high aperture range of my 30mm Sigma (F1.4 to F16) opens creative low light possibilities that my zoom (F3.5/F5.6 to F22) could not.

So, do you have any suggestions?
Am I just being too nerdy about this?

Wednesday, February 20, 2008

Open Source VoIP

Amy Quinn (a distant relation, I wonder?) sent me this list of Open Source VoIP software : Wide Open VoIP: Top 50 Open Source VoIP Apps

Thanks Amy :-)

Saturday, February 16, 2008

Mobile PDF

At last I have found a reasonable PDF Reader on the iPod touch ..... and it was there all along .....

Unfortunately so far, all of the third-party PDF viewers for the iPod touch rather suck.
MobilePreview still in version 0.1 mentions reading pdfs as a "planned feature".
PDFViewer is too annoying to use, as it scales from the top-left of the document, not the centre of the screen and does not rotate.

The best solution I have found so far is to use MobileSafari, with the 'file://' patch applied.
I keep a folder of PDFs in ~/Media/PDF/ (which was where PDFViewer expected to find them), I copy them there using AppleFileProtocol, using AFPd (which also turns on Bonjour, nice).

MobileSafari is a far nicer PDF viewer than PDFViewer, but is less convenient because you cannot browse a directory.
What you can do though is to type in the URL to your PDF file, eg. file:///var/root/Media/PDF/TubeMap.pdf and when it loads, zoom into a representative part of the image and add it as a WebClip to your home screen.

Happy typing.

Thursday, February 14, 2008


Many updates from Apple over the last few days .....
A mixed bag really ......

I love the new Aperture 2 already, I am running it on an early low-end MacBook and it is really responsive. I was not able to get Aperture working here before.

The main disappointment so far is it still lacks the ability to write geolocation EXIF tags.
This means unless you add those tags before import, you've had it. What is worse, Aperture plugin and script writers cannot work around this omission as even the EXIF tag object in AppleScript is read-only.

Leopard 10.5.2 does not fix the things that I still miss from Tiger, like seeing WebDAV Shares in the Finder, missing SMS from AddressBook etc.. And Apple missed fixes for the various glitches to do with calendar entries in a CalDAV Server.

Monday, February 11, 2008

Linked In

I finally got linked in.
My friend Sena put me up to it.
He says he gets lots of work from it.
Let's see .......

Sunday, February 10, 2008

Getting Final

I never understood and definitely never used the final keyword in Java.

I saw it a lot in Giacomo's code, when we worked together on a project a few years ago. I was intrigued, but never really grokked it at the time.

I don't get to write a lot of Java, so when I recently got the opportunity to re-factor some code into a nice set of polymorphic classes I thought of looking at it again, and found this excellent article that helped me to understand it well enough to use it usefully in my code.

Friday, February 08, 2008

More Air

I was lying in the bath last night, listening to mucic streamed via wifi from my computer in my home-office, controlling it using RemoteBuddy on my iPod touch, thinking ..... Apple's AirTunes is such a great technology, why on earth do they not do more with it?

I was pretty organised back in 1985 when I re-wired my flat. There are speaker cables wired-in, running from the living room to the bedroom, office and dining room. That made a lot of sense when I only used my lovely old Quad 300 series Hi Fi, but these days, my music is on my computer in the office. The bath is one of those places where I really like to listen to music. I've been kicking myself for not wiring in speakers, but it would be really expensive to do now, I put fancy flooring down, I cannot get under the floor to lay new cables.

So I finally splashed out on a couple of AirPort Express. One in the living room to feed the wired HiFi, one in the bathroom to feed some old but good Yamaha powered speaker. Having to crank up the volume in another room, to be able to hear music in the bath used to really annoy my neighbours :)

So here Apple have this great tech, but what are they doing with it? One piece of hardware, not updated for may years (AirPort Express) and one piece of software that can send music to it (iTunes).

Rogue Ameoba, who make some great software for the Mac, like Audio Hijack, have a title called AirFoil. It allows any software's audio stream to be sent via AirTunes. In a recent update, they added Airfoil Speakers, a piece of software to turn any Mac into a player for AirTunes.

I think Apple should take note of this powerful idea (sorry RA). You see the problem with Airfoil Speakers is that it is not compatible with iTunes. Apple use some encryption in their hardware, that stops Rogue Ameoba from being able to fully simulate an AirPort Express.

Apple could solve this problem. Either open it and allow a "Made for AirTunes" programme develop like "Made for iPod", or just build AirTunes in at a System level (control speaker-sharing and audio destination in the Audio Sys Prefs).

Apple could make a whole new ecology of hardware and software for AirTunes.

Basically, any device with an audio out, and any device which has a library of music to play, should be able to play with AirTunes. Any device that can do both, should be able to play on another device, or play from another device.

A boom-box with built-in iPod docks and AirPort Express which runs on MacBook batteries would be a great start.
iPhones and Macs could play to it via Wifi. iPods without Wifi could play from the dock, or select another AirTunes client that the boom-box can see locally. Similarly now the latest AirPorts are coming with hard drives, why not add an amplifier and some iPod docks.

One of my favourite evening-with-friends activities, is playing music together, taking it in turn to play one track, it can be really good fun, specially with people who know their music. We used to do it with a couple of thousand vinyl LPs, then CDs, now MP3s. Do this with computing devices and you can makes games from the interaction.

Now that everybody is walking around with all of their music in their pocket, the next thing to sort out is how people can play their music to other people. Streaming is a great solution because it does not involve copyright-busting copying.

I hope you are listening Apple :-)

Saturday, January 26, 2008

XSLT 2.0

I had a complex XML transformation to perform. I ended up using XSLT 2.0, I was really impressed.

I needed to measure several sub-tasks in a publishing process, that updates hundreds of documents in batches every few hours, with data from live sources.

I needed to compare the original implementation with simulations of 3 incremental optimisations, so we could see if they are worth making.

Setting up and running the tests was out of my hands, happening in another country. What I got back were four very large XML files, in Java logger.xml format.

<message>timing.folder 15 1468</message>
<message>memory.folder 15 844128</message>


Thousands of them, all in a flat list. I needed csv files to import into a spreadsheet, to analyse the data.

The first processing pass, filtered out records I was not interested in and extracted values from the message, adding them as individual tags to each record. <message>[type].[key] [fid] [data]</message>

Each log file needed to be output into separate csv files, one for each type of measurement (timing, memory etc.). Each row of the csv file needed to contain each different measurement for one document update, where measurements with the same key were added together.

It is recognised that getting these kind of groupings from flat data using XSLT 1.0 is difficult. I tried for a while using muenchian grouping, the code was getting longer and more complex but I still had not solved all of the problems. It was looking like I would need a whole chain of XSLTs to do the job. I switched from xsltproc to Saxon, because it has a chaining command. Then I remembered it also implements all of XSLT 2.0 which has new commands that make grouping far easier.

I ende up with 3 nested <xsl:for-each-group select="nodes" group-by="key">. XSLT 1.0 has <xsl:for-each> which iterates a nodelist. <xsl:for-each-group> produces a list of lists and iterates through the outer one, giving you access to each inner list and it's key. This solves two difficult issues in XSLT 1.0, arbitrary grouping and making lists of unique keys.

After re-factoring, I had easier to understand code that was a third of the size and ran three times faster.

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="">


output a CSV file for each unique record/type (eg. 'timing' or 'memory')
one row per unique record/fid (document ID)

where multiple values of the same record/type are summed
eg. record/type values below have multiple values:

<xsl:param name="test">1</xsl:param>
<xsl:output method="text"/>

<xsl:template match="log">
<!-- create a set of nodelists of record nodes of each unique record/type -->
<xsl:for-each-group select="record" group-by="type">
<!-- output the log type for debugging purposes -->
<xsl:value-of select="current-grouping-key()"/><xsl:text>
</xsl:text><!-- new line -->
<!-- new output file for each unique record/type -->
<xsl:result-document href="results/{current-grouping-key()}.{$test}.csv" method="text">
<xsl:text>id,</xsl:text><!-- first column -->
<!-- nodelist of records for each unique record/key, within the record/type group -->
<xsl:for-each-group select="current-group()" group-by="key">
<!-- output each unique record/key into the first row -->
<xsl:value-of select="current-grouping-key()"/><xsl:text>,</xsl:text>
</xsl:text><!-- new line -->
<!-- create a set of nodelists of record nodes of each unique record/fid (document id),
within the record/type::record/key nested grouping -->
<xsl:for-each-group select="current-group()" group-by="fid">
<!-- for each unique record/fid -->
<xsl:for-each select="current-group()[1]">
<!-- output the document id into the first column -->
<xsl:value-of select="current-grouping-key()"/><xsl:text>,</xsl:text>
<!-- for each unique key in the document -->
<xsl:for-each-group select="current-group()" group-by="key">
<!-- output the sum of same-named keys -->
<xsl:value-of select="sum(current-group()/data)"/><xsl:text>,</xsl:text>
</xsl:text><!-- new line -->

<xsl:template match="@*|node()">
<xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy>


I think XSLT is an amazing language.

Wednesday, January 16, 2008

Thin Air

I don't know about you, but I found this year's keynote by Steve Jobs a bit thin on the ground.

I don't have a big movie-rental habit and they won't be coming to the UK for a long time, I guess ..... also I expect we'll pay a Rip-off Britain surcharge anyway .....

The MacBook Air is obviously gorgeous and looks like a really stunning bit of engineering, but I would have to think long and hard ..... I am not sure I would want to be without FireWire or Ethernet (though they are offering a USB/Ethernet adaptor).

I did think building demonstration videos into System Preferences for multi-touch gestures was a total hoot :-)

Remote-Disk sounds jolly clever. I did not hear whether is allows you to install a new System using it though.

My initial reaction to Time-Capsule is that it is a bit of a joke, why not just fix Time-Machine backups to AirPort-Disk?

I am sure that the improvements to the iPhone and iPod touch are welcome by people who have not jailbroken theirs yet, but for me, I could not see anything that I cannot already do ...... albeit differently on my jailbroken iPod touch.

I will wait for the release of the iPhone SDK, and see what it brings, before I un-jailbreak and update the OS on mine. Even with Apple's additions, there are still compelling 3rd party apps on mine, that I would not want to loose.

Charging for the applications they left out of the iPod touch is bizarre IMHO, I bet we see a refund in a few weeks ;-)
Now they are putting back the bits missing from the iPod touch, maybe they will put back the bits missing from Leopard :-)

I find it very difficult to believe their WIFI-location technology would actually work, specially outside urban America. It sounds bloody clever, but I have a GPS ..... I'd rather have a GPS module .....

So, WTF happened to "Just one more thing"?