12 Jan 2007

James Blunt * Back To Bedlam

I first heard James Blunt's You're Beautiful in the autumn of 2005: I was listening to a bunch of tracks while working on a project for a radio station client. Within a few seconds I had stopped working and was just listening. That is very rare for me: music is usually just something for the background.

Such wonderfully wistful lyrics, with a voice that matches so perfectly. This is a song about an emotion that most - if not all - of us feel at some time, but that is so hard to capture in words. The desire for beauty and then the swings between despair (at not knowing how to grasp it) and wild unfounded optimism ("but I don't worry about that, 'cos I've got a plan."). He has the courage not to give us the Hollywood ending but instead the one that fits.

I asked for the album as a Christmas present, a long three month wait. Once I finally got it I was delighted that the other songs are of the same quality. This was not just my most listened to album in 2006, but it was most listened to album in every single month of 2006: I still have not tired of it.

There is not a single bad track, but I will still pick out some favourites, in addition to You're Beautiful: Goodbye My Lover, Cry and No Bravery. If you have not heard all of those, and did not find You're Beautiful too repellant, please give them a listen.

Speaking of repellant, it seems in the U.K. at least that opinion is sharply divided, partly due to the high voice he uses on some songs, and partly due to the large amount of air play and commercial success he has received. On the other side of the divided opinion are the nine million people who bought this album.

Learn more here: http://en.wikipedia.org/wiki/James_Blunt

Buy from Amazon UK here or from Amazon JP, either U.S. Import or Special Edition for Japanese market (2 extra tracks).

11 Jan 2007

Head Rush Ajax

I have heard good things about O'Reilly's Head First series, and have an interest in advanced learning techniques myself. This was my first Head First book so I cracked it open with high expectations.

I liked the style, an entertaining, easy read. The humour is more zany than funny, but that is fine. I am hopeful the Head First series will have a big impact on instructional computer books and magazines. Annotated source code alone is 10 years overdue.

However I found the repetition irritating: I got the concept the first time and did not need to be told it again and again. To be fair, as someone who can read an 800 page computer tomb cover to cover and not get bored, perhaps I am not in the target market.

The content was good, the examples realistic enough but still short enough to see the ajax. But I have complaints, brace yourselves: there were technical inaccuracies, i18n was spelt U.S.A., spelling errors in the hand-written text and the book is fluffy. By fluffy I mean this is a 400 page book that has less than 100 pages of content in typical computer book terms, not that you can cuddle up to it in bed while sucking your thumb.

Technical inaccuracies? My big complaint here is GET vs. POST. The author advocates GET and spends many pages trying to justify this. The reasoning seems to be that POST is more complex, but as we discover you make the data the same way and it is just one more line to add. His key argument is "POST is only slightly more secure". That argument in itself is lame: no security is perfect and your aim is just to avoid being low-hanging fruit so that the hackers will go elsewhere. Every little helps.

Another argument was the browser decides the GET limit and "IE allows 2000 characters for GET, which should be enough". But servers can set a limit as well. For instance a few years back I used a web server which had a GET limit of 255 characters.

Worse of all he missed some key security arguments in favour of POST. How about log files? All the GET data gets written to the log files, POST data does not. So your user's name and address are ending up in the log file. This is then getting automatically analyzed and posted on a web site that marketing use. And they will throw those reports around not realizing there is user data embedded in them. (Well, marketing will throw them around even if they have been told the report contains customer credit card numbers, but let's not go there...)

And GET makes a wider range of security attacks possible. For one example of what I am talking about see PHP Architect's ( http://www.phparch.com ) security column in Volume 5 Issue 5 (aka May 2006). Incidentally I highly recommend that magazine and suggest you get a year's worth of back issues if only to read Security Corner. This book is aimed at people who are not expected to be reading heavy articles on how to hack web sites. So, instead of the dangerously misleading: "POST is only slightly more secure, why bother?", this book should be advising: "Always use POST unless you know exactly what you are doing."

Internationalization? Not a mention and some examples are poorly designed in this respect (e.g. hard-coded comparisons with button label text). But much worse is that the sample code simply does not work for anything but ascii. I set my HTML, PHP and database to all use UTF-8, but German umlauts failed to arrive properly, as did Japanese text. After some study it seems you should use encodeURIComponent() instead of escape(). See http://blog.openboxsoftware.com/2006/04/javascript-escape-vs-encodeuricomponent/

In summary this book taught me most of what I needed to know about Ajax, but the technical accuracy is not up to O'Reilly's usual standards. And use POST.

Buy this book at Amazon Japan, or at Amazon UK.

10 Jan 2007

German Daily Phrases & Culture 2007 Calendar

Rip off a page each day and learn a new phrase. I was given one of these for 2006 and found it an enjoyable way to study. My skill at German improved slightly during 2006, and though this was not my only study tool I think the quick, regular practise it encourages is good.

The level is variable, from the most basic phrases to proverbs and obscure vocabulary. Assuming the format is the same as 2006, weekends are done as a single page, and some pages do not have a phrase but instead a bio of someone famous born on that day. The Amazon data lists it as 640 pages. Printing is only on one side of the paper, so I imagine the correct figure is 320 pages.

At 5000 yen on Amazon Japan it is more expensive than I realized. The Amazon UK price of £9.99 (i.e. around 2000 yen) seems more what I would expect, and at that price I think it is a good buy.

See if it is any cheaper yet at Amazon Japan, or buy it at Amazon UK here.

5 Jan 2007

ActionScript 3.0 Cookbook

The ActionScript Cookbook (covering ActionScript 1) has been an essential aid for my Flash development: usually the first book I reach for when I have a question. This new book is thinner, and the reason it is thinner is that "Part III Applications" is not there. That section showed seven complete applications that brought everything together. It was a useful read, a chance to see code in context. However I have not looked at those sections much since the first read. I guess O'Reilly thought the same and that it would be okay to drop them.

At the current time this is the only ActionScript 3 book I have read, and I have not done any serious coding in ActionScript 3, so I cannot say how useful it is when troubleshooting. But it is well written, seems to cover all the important topics, and left me itching to get started on some AS3 coding. It pointed out differences between AS2 and AS3, but I think it will still be readable by someone with no experience of earlier versions of Actionscript.

The first three recipes are specific to using Adobe's FlexBuilder 2. There are no instructions on setting up the free compiler on linux for instance. There is also no coverage of open source libraries (for instance asunit has had an AS3 version for at least six months before this book was published). For that matter unit testing gets no coverage at all.

But those are minor complaints. Overall this is just what you would expect from O'Reilly: a good solid book that every AS3 programmer will want to have to hand.

Buy from Amazon UK here, or Amazon JP here.