reading barcodes on the iPhone

I was wondering about scanning barcodes using the iPhone and found that pic2shop (a free app) lets third part iPhone apps and even web pages access its scanning software through a simply URL scheme interface.

Their developer documentation has an example iPhone app, but not an example web page.  However, I made a web page using their interface in about 5 minutes (see PHP source of barcode reader).

If you have an iPhone you can try it out and scan a bar code now, although you need to install pic2shop first (but it is free).

By allowing third party apps to use their software they encourage downloads of their app, which will bring them revenue through product purchases.  Through free giving they bring themselves benefit; a good open access story.

Apple’s Model-View-Controller is Seeheim

Just reading the iPhone Cocoa developer docs and its description of Model-View-Controller. However, if you look at the diagram rather than the model component directly notifying the view of changes as in classic MVC, in Cocoa the controller acts as mediator, more like the Dialogue component in the Seeheim architecture1 or the Control component in PAC.

MVC from Mac Cocoa development docs

The docs describing the Cocoa MVC design pattern in more detail in fact do a detailed comparison with the Smalltalk MVC, but do not refer to Seeheim or PAC, I guess because they are less well known now-a-days.  Only a few weeks ago when discussing architecture with my students, I described Seeheim as being more a conceptual architecture and not used in actual implementations now.  I will have to update my lectures – Seeheim lives!

  1. Shocked to find no real web documentation for Seeheim, not even on Wikipedia; looks like CS memory is short.  However, it is described in chapter 8 of the HCI book and in the chapter 8 slides[back]

First blog from iPhone

Just downloaded WordPress app and doing first iPhone blog. Can imagine doing short blogs this way, but typing longer ones will be a pain. I hope Apple will listen to their users and allow bluetooth keyboards soon, then this might become really useful rather than expensive toy.

big file?

Encountered the following when downloading a file for proof checking from the Elsevier “E-Proofing” System web site1.  Happily it turned out to be a mere 950 K not a gigabyte!

  1. I was going to add a link to the system web site itself at http://elsevier.sps.co.in/ but instead of some sort of home page you get redirected to the proofs of someone’s article in the Journal of Computational Physics![back]

the long now … maybe

I was looking at an old posting of Anne Galloway’s @purselipsquarejaw.  The article quotes Stewart Brand1 and in particular:

“How can we invest in a future we know is structurally incapable of keeping faith with its past? The digital industries must shift from being the main source of society’s ever-shortening attention span to becoming a reliable guarantor of long-term perspective.”

The name Stewart Brand (above) is linked to http://www.longnow.org/10klibrary/library.htm.  Now the 10K in “10klibrary” refers to the Long Now Foundation‘s mission to look forward at least ten thousand years, including sub projects to look at long-term file format conversions; similar to some of the aspirations of the Memories for Life UK Computing Grand Challenge.

Unfortunately when you click the link to the 10K library entry …

Looks like the URLs are not going to last till 12000 AD

  1. Whole Earth Catalogue, How Buildings Learn, The Clock of the Long Now, etc.[back]

Royal Mail comes through

The Royal Mail has had a lot of bad press recently with strikes, postal delays and ‘modernisation’. However, it is easy to forget the revolutionary nature of the “Penny Post“: one price and one service to deliver anywhere in the country.  Living  in Tiree, one of the western Scottish islands, this is particularly pertinent.  Many carriers do not deliver here or only do so at a higher rate; those that do are often delayed waiting for the ferries, but so long as the plane comes in so does the post.

Our shower was leaking water and on Friday at around 12:42pm we ordered spare parts from Shower-Warehouse.  I had assumed that they would not arrive before I set off back to Lancaster on Tuesday morning and so it would be Christmas before I could actually do the repair.

But, at 1pm today, they were delivered

So top marks for both the Royal Mail and Shower-Warehouse and may modernisation never change the wonder of universal post.

back to Tiree

I’m on the ferry on my way to Tiree.  I’ve not been back home for nearly 8 weeks and have a long weekend before heading back down to Lancaster until Christmas.  Since I left in mid September I’ve slept in 19 different places and had 23 moves between places; however, my main home has been the camper van, a Ford Transit Auto-Sleeper Duetto, small enough to manoeuvre easily, but with everything on board from cooker and fridge to its own toilet and shower!

I’ve also not blogged since I was last at home. I have a half-written entry from Paris, I was at a lecture by John Searle in Eindhoven and really want to write about that, and I also need to write a retrospective on my sabbatical year, but not had a moment; indeed on my office desk is an iPhone, which has sat waiting to be unpacked for the last 2 months, no time even to play :-/

Perhaps over the next few days I can catch up with the half-written blogs amongst the unanswered email, overdue papers, and pressing admin; and also take some time to appreciate the sea and wild wind.

Paris and the redemption of the French restaurant

I have been in Paris for a review meeting for the VisMaster project. I arrived the afternoon before the meeting started and so unusually had half a day to wander around, mainly to check out the location of the meeting places, but also to see Notre Dame, which was really just outside my hotel window. The hotel “Hotel Les Rives De Notre Dame Paris” was somewhat higher budget than I intended, but there was clearly some big meeting on this week as everything seemed booked solidly for the days I needed. However, given its location and it was a double room, it would be an ideal location for a couple visiting Paris: wonderful views, furnishing that made you believe you were in Paris and breakfast in a cellar that had clearly been there since the days of Victor Hugo.

I mention Hugo as one of the highlights of my half-day wander is the Shakespeare and Co bookshop just opposite Notre Dame. The books are all English but there is a special section of English translations of French authors and here I bought a copy of Hugo’s “Notre Dame de Paris“, the fateful tale of Quasimodo and Esmarelda and inspiration for the “Hunchback of Notre Dame” films. As well as Hugo I also bought a copy of one of Montaigne’s essays, which strangely haven’t yet found their way to Hollywood.

Having bought two books to load my already overburdened suitcase destined for its 15 kilo Ryanair weight limit I was drawn back and this time looked through the second hand section. It was fascinating to see what the English speaker in Paris reads, and I was again tempted and came away with Edna O’Brien’s “Mother Ireland” and also an old psychology book “Thinking and Reasoning”. It is an overused title (a bit like “Human Computer Interaction”) and I almost passed it by as it was clearly an old book and so obviously “out dated”. However just in time I noticed the editors, Wason and Johnson-Laird, and realised this was a collection of classic papers from the late 1950s and early 1960s, a real treasure capturing the period when cognitive psychology flowered.

However, the high spot for me1 was the first evening when I ate on my own in a small restaurant, next door to the bookshop. In the past I have been critical if not dismissive of French cooking. Not French food — cheese and bread from even the most basic supermarket is an epicurean joy, but the food you get in French restaurants.

Now by French restaurant I think I mean self-consciously “French” restaurants and in particular Parisian restaurants, as I have mainly been in Paris and in Toulouse twice. The regional food in Toulouse was wonderful (once you get over the fat), but even there “French” restaurants were a disappointment. It was not that I have only been to the Parisian tourist haunts, where the contempt of the non-Parisian can be apparent and where they serve the kind of lump of meat and pile of potatoes meal that I last saw in the UK thirty years ago, with the sole exception of some highly flavoured sauce instead of the customary British gravy. On many occasions I have been with French and Parisian natives who have selected carefully and taken us to well-classed restaurants, but they have still left me disappointed. In Italian restaurants, even the most basic Formica-tabled trattoria, the food itself is not treated with the reverence of the French, but as a more homely pleasure. Not unlike the everyday Catholicism of Italy compared to the more austere cathederals of France. In Italy, like the restaurants I find today in the UK (not 30 years ago), the appreciation is of the food; the food is the focus; the food is what you eat and what you enjoy. In contrast, in French restaurants it is always the chef that is king, the centre stage, the impresario.

That is I would have always said this until now.

Opposite the Notre Dame, set back from the busy Seine-side, in thoroughfare by small jardin, is “Le Petit Châtelet“. It is crushed on one side beside the brash tourist restaurants that cluster round Notre Dame like flies once did round the fetid sewers of mediaeval city rivers. On the other side it flanks Shakespeare and Co., which feels a closer bedfellow.  The service was impeccable and friendly and the food divine including sorbet in unexpected flavours such as lavender.  Out of the dirty mire that had been my previous experience of Paris, like Notre Dame itself rising from the foetid streets in Hugo’s account of 15th century Paris, Le Petet Châtelot has redeemed French cuisine in my eyes.

  1. That is of course apart from the review meeting, which was very productive – and those of you who have been at an EU project review might not believe me, but really it was![back]

Justice and mercy: al-Megrahi

I’ve been away most of the last two weeks with just a few days at home in between.  However, just before I was first away I heard the Scottish Justice Secretary Kenny MacAskill announce the release of al-Megrahi.  The decision was clearly hard and arbitrating the balance between justice and compassion is an unenviable task.

Whether the final decision was right or wrong, hearing MacAskill’s explanation of his decisions made me proud to be living in Scotland. Rather than bowing to the clear political pressure he was under, instead he kept his focus on what justice means in a land where compassion is at the heart of who we are.  In a world often ravaged by war and terror, suffering under human cruelty, and governed by the twins of aggression and revenge, MacAskill put himself under a  higher order and demonstrated the clear difference between a country still under the influence of its Christian past and those, from all sides, who besmirch the names of their own countries and religions by terror and violence.

Since then the grubby world of UK deals over oil and US deals over billions of dollars of compensation payments have both been aired, but it appears that MacAskill’s decision stood against pressure from all sides.

It was perhaps inevitable that the release would provoke some controversy, but disappointing nonetheless; one always hopes that integrity will triumph over knee-jerk reactions.  However, it has been especially galling to hear US voices raised in protest, a country which for so many years acted as safe haven for IRA fund raising; bankrolling the London bombings of the 1970s and beyond.  While Gaddafi supplied the weapons, the US public supplied the dollars1.  I was only young at the time, but these were vicious attacks in crowded tube trains and on the streets of London and elsewhere, designed specifically to cause maximum death and injury; and all the while, in the US, the IRA were allowed to operate freely due to political support in high places.

Obama came to power with the promise of a new attitude and a principled approach to politics, so it is doubly disappointing that he has failed this early test of principle over public opinion.  If the current White House staff cannot accept the independence of the Scottish justice system over politics, what hope in other parts of the world.

  1. Of course, while the Libyan involvement in the Lockerbie bombing and al-Megrahi’s guilt have been a matter of debate, the involvement of Libya in IRA terrorism was indisputable.   Since those days the IRA have become part of the Northern Ireland political process and Libya itself has been welcomed into the allied camp of the ‘war on terror’.  Whether in India, Israel or Ireland, yesterday’s terrorists become today’s politicians.  This makes the focus on al-Megrahi seem even more like that of a scapegoat.[back]