Dylan’s Drawn Blank exhibition

Yesterday I attended the Bob Dylan – Drawn Blank exhibition at the Halcyon Gallery in London. This is a smart gallery near Bond Street; the exhibition is free but this is also a highly successful commercial enterprise.

I really enjoyed the exhibition and recommend it highly. It is open in London for a few more weeks; following which I gather there will be a world tour.

The origin of the pictures is unusual. Dylan drew some sketches while on tour (then again, he is always on tour) between 1989 and 1992. These were published by Random House under the title Drawn Blank. A museum curator called Ingrid Mössinger picked up on them in 2006 and got Dylan to agree to reworking them for an exhibition and for sale as originals and limited edition prints.

The original drawings were scanned, enlarged, and printed. Dylan then added colour by painting on them, mainly over a period of 8 months in 2007. Some, possibly most, of the drawings were painted several times; Dylan being Dylan, he used different colours each time.

This means that what you can buy is either an unique painted print, for sums of £25,000 and upwards, or a limited edition coloured print, for sums of around £2000 upwards. Note the “upwards”: the prices I saw were several times larger on many of the pictures. I also noticed that most of the paintings were already sold.

The exhibition is on several floors, with the paintings on the lower floors and the prints above. I spent a happy hour or two looking at them. I have no idea how they rate as art; I cannot separate them in my mind from the Bob Dylan I know as a singer and songwriter. The pictures have a certain naivety; but I found them rich in meaning as well.

He gets perspectives slightly wrong at times, but in a charming manner. For example, there is an image showing a timber porch and stairway beyond which you can see cars driving up a hill. They are like toy cars and one is at an especially odd angle, but it is quaint and humorous. Dylan seems interested in angles; he draws a car parallel to the banister of the stairway; we see pillars and telegraph poles leaning this way and that.

There are several images of train tracks which are highly evocative; there is also a rather sensual picture of two sisters which brings to mind Ballad in plain D “Of the two sisters, I loved the young…”

In a memorable quote on one of the walls Dylan recalls visiting an office and seeing a “blazing secretary”; who else would put together those two words? For me it evoked a woman with deep passions who keeps them constrained and hidden during her humdrum working day – though who knows if that was what Dylan meant?

If the prints had been a few hundred rather than a few thousand pounds I might have scraped together the money to buy one or two. As it was, I contented myself with the books. The hardback exhibition book is a well produced collection with nearly 300 pages in large format; at £39.95 it struck me as pretty good value. There is also a cheaper paperback which just has the prints. Being a fan, I bought one of each.

Is the rebel Dylan of the Sixties now totally owned by the establishment? I fear so; but it is a compliment as well.

iPhone fever in London

I happen to be in London this morning for iPhone 3G day. Congratulations to Apple on another successful launch. There were queues outside the (numerous) branches of Carphone Warehouse and O2; I didn’t visit the temple of Apple itself in Regent Street. Further, the other mobile stores seemed particularly quiet, with plenty of staff but few customers. The 16GB model was most in demand; early birds were able to grab one, but by about 11.00 I was told that it was sold out "all over London".

I did have a quick play with a sample. Lovely design, but, errrm, superficially much like iPhone 1.0. 

Seeing these queues has a remarkable power. Part of me wanted to stand in line and sign up, just because. Another part of me knows that it is not a good fit for my requirements. I am a partial match. I am a heavy data user while out of the office, and fairly annoyed with my current 3G phone (Samsung i600) which seems to lose its data connection for no apparent reason and requires a restart.

On the other hand, here’s what I don’t like. First, the price. The cheapest deal, presuming you want the 16GB (8GB is £50 less), is £159 for the device plus £30 monthly for 18 months. That’s £699; or a little bit less if you understand about net present value. For the true cost, you also have to deduct what you would otherwise spend on mobile fees; in my case I pay as I go so it is not very much.

I might still buy it, except that I prefer a real thumb keyboard. Further, I hate the App Store idea (though I admire the way Apple makes everything into a profit centre); I feel that for £699 I should be able to install whatever apps I want from wherever I want, as I can with the i600. I also hate the games Apple is playing by disallowing Flash and Java.

Perhaps I’ll pick up a used and jailbroken first gen model.

PS blog posted using Tablet PC connected to the Internet via Bluetooth on the Samsung i600

Technorati tags: , , ,

Debugging PHP code to fix a WordPress problem

How do you debug a PHP application? Traditionally developers resort to outputting variable values to HTML, or peering through logs, but why not set breakpoints and step through code just as you would in C# or Java? Maybe because it can take some effort to set this up, as I was reminded today.

I was motivated by an annoying WordPress problem which I’ve blogged about before. For historical reasons, I have a lot of subscribers to an old RSS url which delivers the feed in the now deprecated RSS 0.92 format. I prefer to have a full text feed, and this used to work fine with WordPress, which placed the entire blog post in the element of the feed.

At some point this stopped working, and subscribers got a summary only. In fact, the feed broke completely for a while, after I switched to pretty permalinks; but even after fixing that, I still had the problem with summary items. I tried upping the length of the description, but it was delivered without any HTML formatting so that did not work.

Next I tried the WordPress support forums. There are lots of good folk there; but if you review the posts its clear that many queries go unanswered. That’s nobody’s fault; it is a community, and for whatever reason there seem to be more people seeking help than there are experts with the time to give free advice.

So how about debugging the PHP code and working out what was happening? It seemed a good opportunity to try the latest Eclipse Ganymede, released a couple of weeks ago, along with the PHP Development Tools (PDT). I also figured it would be easier to set this up on Linux, to match what I use on the web server. I used the same Ubuntu on VirtualBox setup that worked well for trying out SproutCore. It worked…

Debugging PHP with Eclipse Ganymede

…but I can’t pretend it was wholly straightforward. Here’s how it went. I installed the latest Ubuntu distro versions of Apache, MySql and PHP – easy. Ubuntu’s Eclipse is not the latest, so I downloaded it from the Eclipse site and used some tips to set it up tidily. Note: make sure Sun Java is installed; I set it as the default JVM. Adding the PHP development tools was more fiddly. I’d half expected this to be part of a standard Eclipse download by now, but it is not, and if you try to install it into Ganymede using the standard update site is does not work because of dependency issues (a big problem with Eclipse). You have to download a 2.0.0 build from here instead.

I’d decided to use the Zend debugger – that’s a separate Eclipse update too, as explained here. Note that even after updating Eclipse, you still have to install the separate Zend debugger server from here, if you want to debug real web applications. I had a few problems getting this working, mainly because of the zend_debugger.allow_hosts directive which you have to edit in php.ini, and which is not brilliantly documented.

I replicated my blog on the Ubuntu virtual box – easy. But how do you get your Eclipse PHP project pointing at this existing code? The method I settled on after a couple of experiments was to start a new PHP project, uncheck the Use default option for project contents, and select the blog directory in /var/www. You then get a scary dialog which observes that files already exist. You can either create your project as a subdirectory, in which case you cannot debug with the existing files, or else pass the scary warning:

Create project in /var/www/blog
(Deleting the project will delete the entire /var/www/blog folder)

I mis-read this at first, thinking it would delete all the files when creating the project. That’s not what it says. Everything was a backup anyway, so I took the plunge; it worked fine. In fact, if you look closely at the screenshot above (click for a full size image) you can see that it is nicely done. You can see the call stack at top left, current variable values, output as it is being generated, and the usual options to step into or over the code.

That said, I did have some problems with Step Into. Just when it was going to be most useful, it bombed out with a message that said Error. If you looked at the detail, that also just said Error. The only fix I found was to set breakpoints in the actual file I needed to debug.

Still, it worked. I found that by adding a single argument to a line in feed-rss.php I could get my full text feed back. I’ve duly reported this in the WordPress support forums.

A couple of observations.

First, I don’t much like the WordPress code. Sorry, because the product is marvelous, but the code seems like a typical PHP tangle. Using pretty permalinks, which I regret, makes it worse.

Second, are there not plenty of developers who use both Java and PHP and would like it to be a tiny bit easier to set up in Eclipse? I’m being a little unfair, since Ganymede is just out and I guess the PDT will integrate better with it soon. Even so, Eclipse is still not quite the smooth plug-in dream that I once hoped it would become.

Note that if you don’t mind paying, you can have Zend Studio which I should think makes life easier. Or perhaps Delphi for PHP.

Apple accused of security blunder; highlights cloud risks

According to this post, someone at Apple committed a huge security blunder, giving the password to someone’s Apple ID to a third party. How was this accomplished? Someone emailed from an email account not associated with the Apple ID, and asked for the password. Apple apparently just reset the password and emailed it to the enquirer.

I haven’t verified the claim; but even if it is false, it highlights the risks of living the cloud life. Here’s what victim Marko Karppinen emailed to Apple:

Apparently based on a single-line email inquiry, you have allowed a third party access to:
– My personal details
– My personal email
– All the files stored on my iDisk
– Everything I’ve synchronized to .Mac, including my Address Book, Bookmarks, Keychain items, etc.
– My credit card details as stored in my Apple Store profile
– My iTunes Music Store Account
– My ADC Premier membership, including the software seed key and other assets
– The iPhone Developer Program’s Program Portal, including details of our development team

Frankly, this makes me so angry that I can’t see straight.

Simon Willison, whose blog alerted me to the incident, mentioned a few weeks ago the security problem inherent in any site which will email you a password:

I have a very simple rule of thumb for whether or not a site should consider whitelisting OpenID providers: does the site offer a “forgotten password” feature that e-mails the user a login token? If it does, then the owners have already made the decision to outsource the security of their users to whoever they picked as an e-mail provider.

Let’s bear in mind too that email mostly travels through the internet as plain text, vulnerable to interception.

Thought for the day: how much of your data is protected only by a simple username/password combination, and presuming there is some, how well protected is that password itself?

I imagine Apple will be tightening up its procedures, if the incident above is confirmed, since it was easily avoidable.

Technorati tags: ,

Sample code for a very very simple VB database application

I wrote a short piece for Personal Computer World about making a simple Windows Forms database application. I did this because I get a lot of enquiries about it, and search hits to this site looking for samples.

The piece is actually in two parts. Part one shows how to do CRUD without any databinding or datasets.

You can download the code here – but please don’t bother if you can already do this in your sleep. The app is for Visual Basic Express 2008.

Part two is about using the VB wizards to create an app with a typed dataset, TableAdapters and so on. The database is SQL Server CE, which is well suited to this kind of application. It is the default in Visual Studio 2008 even though it turns out not to be fully compatible with the wizards. Typical Microsoft – simple, but with enough gotchas to frustrate beginners and keep experts in business.

I ran into another little puzzle while doing the sample. I needed to populate the listbox with both a string value and the ID that is the primary key in the database table. The way I would do this normally is to create a custom class to represent the record, implement a ToString() that returns the display value, and add instances of this object to the listbox. I wanted an even simpler way though, so I decided to use a ListView. This lets you add items that have both a key and a value. You can do this with one of the overloaded Add methods for a ListViewItemCollection, documented like this:

Creates an item with the specified key, text, and image and adds an item to the collection.

The strange thing is, the ListViewItem has no key property. So how do you retrieve the value of the key?

The answer is that the ListViewItem.Name property returns the value of the key. So the key is the name. Why not call it the name in both places? Or the key?

I guess that would be too easy.

The messy world of the Web 2.0 user interface

Verity Stob’s Web 2.0 app diagram is worth a look.

So is it back to plain old HTML+forms then? That won’t do either; your app will look a decade old, and offline will never work.

This is why the current RIA wars are fascinating – particularly since Apple seems averse to runtimes like Flash, Java or Silverlight on its iPhone.

Which leaves what? JavaScript, hélas.

My early days with music part 2: records with my parents

In the late sixties we lived in a small village in Oxfordshire (then Berkshire). I have a few musical memories. One is a song covered by Tom Jones, The Green Green Grass of Home. We had a television, and there must have been some programme we watched that followed Top of the Pops. As a result, we always caught the last song, which was the number one, and in my memory it was always Tom Jones and The Green Green Grass of Home. I see that according to wikipedia it was number one for just seven weeks in 1966; but it was possibly an entire school holiday. I had no idea what a sad tale the song told, about a man awaiting execution. Still, that wasn’t my favourite tune at the time. That would have been the theme tune to Thunderbirds, a TV puppet show about rescuing people with fabulous machines.

We had a record player, a green one-box affair, mono of course, but with an auto-changer. My dad bought a record of Vaughan Williams’ On Wenlock Edge, and another with someone crooning Sullivan’s The Lost Chord. The tale of perfection found fleetingly but lost forever appealed to him; bear in mind that he was an artist too (a writer):

It linked all perplexéd meanings
Into one perfect peace,
And trembled away into silence
As if it were loth to cease.

I have sought, but I seek it vainly,
That one lost chord divine,
Which came from the soul of the organ,
And entered into mine.

I remember musicals too. A great Saturday treat was to go to the cinema and see the latest: The Sound of Music, My Fair Lady, Doctor Doolittle, Mary Poppins, Thoroughly Modern Millie. We bought some of these soundtracks (like everyone else) and the songs will stay with me forever. I still enjoy My Fair Lady and its extreme political incorrectness.

My brother managed to come home one day with a job lot of secondhand singles. I think we bought one or two as well. There was treasure here, though I didn’t know it. The Carnival is Over by The Seekers makes my eyes prick whenever I hear it. Windmills of my mind sung by Noel Harrison, with its clever words by Alan Bergman, Marilyn Bergman and Michel Legrand:

Like a tunnel that you follow to a tunnel of its own
down a hollow to a cavern where the sun has never shone
like a door that keeps revolving in a half forgotten dream
or the ripples from a pebble someone tosses in a stream
like a clock whose hands are sweeping past the minutes of its face
and the world is like an apple whirling silently in space
like the circles that you find
in the windmills of your mind

There was also Goodbye my love, by the Searchers, which we thought was hilarious (goodbyyy-yy-yy-yy-yyee my love); and a single by the Rolling Stones, As Tears go By which we quite liked, but had 19th Nervous Breakdown on the other side which we considered very silly (actually it was the A side and, I realised later, a great song).

The next event was going away to school and getting a portable radio. Yes, a tranny (transitor radio). That’s the next post.

More AVG nonsense

AVG found a virus on my Vista system this morning:

I was puzzled at first: what is Scratch? Then I remembered: it’s an innovative visual programming language aimed at education. Virus, or false positive? I checked the file, which seemed unchanged since 2007, but of course these things can be deceptive. Still, why this file, and how had this virus arrived? I looked here; other Scratch users have had the same problem, and other anti-virus software does not detect any virus, so it seems that this is indeed a false positive.

Most anti-virus software is based on a broken concept, the idea that you can detect malware by comparing files against a “known-bad” list of signatures, and occasional false positives are inevitable. I’d like to see that possibility properly recognised in the UI that the a-v software presents.

Not good for AVG, following its ill-judged LinkScanner problems.

Technorati tags: , , ,

Why you can’t trust a Google ad

An interesting facet of the recent problems with UK non-supplier Zavvi Direct is that all the purchasers I spoke to found the fake web site via a Google ad. Put another way, without the ease of advertising through Google and eBay, it is likely that far fewer people would have found the site and potentially lost their money.

That raises the question: does Google do anything to verify that its advertisers are genuine? Here’s the answer, from a Google spokesperson:

Google, along with other online and offline advertising platforms are not able to proactively check the legitimacy of each and every advertiser. Consumers should always check the validity of what is being sold to them and how they are asked to pay for items. If Google is alerted to a potential fraud then we will work with the relevant legal authorities to help them resolve such matters.

This was clarified to me as follows. Google will assume ads are OK unless it receives complaints. If it receives a few complaints it might pass them on to the merchant. If it receives numerous complaints it might warn the advertiser and eventually disable the account.

I guess it is unreasonable to expect Google to conduct checks on every advertiser. Still, there is a related point: does Google do enough to highlight the difference between advertisements, and links identified by its famous search ranking algorithms? Here is a snapshot of a search I just made:

I’ve sized the browser small to get everything in; there are more search results than I’ve shown. However, it shows three panels of results. The top left is tinted and marked in unobtrusive gray type “Sponsored links”. The top right is narrow, not tinted, and also marked in gray type “Sponsored links”. The bottom left is what most tech-savvy folk think of as the main results area.

Judging by my interviews, some people are not really aware of the distinction between a “sponsored link” and a search result. In some cases, the buyer could not tell me what kind of link they clicked. To them it was just “Google”.

It would be easy to make the ads more distinct. Google could use the plain English “Advertisements” rather than the “sponsored links” circumlocution. It could use something bolder than gray text to identify them. It could use a different font and colour for the links in the right-hand column. It is good that the top left links are in a tinted panel; yet some may perceive this simply as best-match links, rather than links in an entirely different category than those that follow.

Overall, it seems to me that Google deliberately makes its ads look the same as search results. Which is good for advertisers, but can be bad news for buyers.

Technorati tags: , ,