This weekend I read a PHP and MySQL book cover to cover, watched Dodgeball at the Regal 24, met the lead singer of Keane and then was caught on camera in the background of a Fox 5 Atlanta outside broadcast this morning while I sipped my coffee and read the closing chapter of the Benjamin Franklin book.
As a veteran CFer and SQL Programmer I was intrigued to read about PHP and MySQL in "PHP and MySQL Web Development, Second Edition" by Luke Welling and Laura Thompson. Learning a new language is always going to reveal some interesting things and one that was particularly intersting was the availability of the GD libraries to allow the creation of dynamic images. This was of relevance to a recent thread on CF-Talk where someone brought up the idea of CAPTCHA images from a CF only standpoint. PHP uses the GD libraries to generate GIF, JPEG and PNG images which allow you to combine text and images on the fly for buttons or, indeed, CAPTCHA images. I reviewed the C code to implement this and it struck me as something which could be easily migrated to CF as a custom tag.
Imagine being able to call
<cfdraw imageName="myImage" height="300" width="300" format="JPG">
circle(10,100,50,red);
text(verdana,10,50,50,black);
</cfdraw>
to see a dynamic JPEG image of a circle at 10,100 50 pixels wide in red with some black text over the top in Verdana 10px font at 50,50.
That would be fun. The book was a little disappointing from an established programmer perspective. I would guess that 80% of what someone with existing programming skills would need to know to write code in PHP with MySQL is presented in the first 258 pages. Then pages 259 through 436 offer some advanced topics including the dynamic image information before the remaining 350 pages describe 8 example applications and offer some information on building large projects and debugging them.
A great book I recently finished was "Eats, Shoots and Leaves" by Lynne Trusse. I heard an interview with Lynne on NPR and thought the book sounded like fun. The British author takes a dicatatorial stance on the issue of punctuation and its abuse (note the correct absence of an apostrophe in its). Not only did I learn about the subtle mistakes in my own writing but I have a keener eye for spotting errors elsewhere. The book is a quick read with delightfully humorous examples taken from the media and her local environment. One example which stands out is the sign "Book's, DVD's and CD's" - where book's should be apostropheless since it is a plural whereas CD's and DVD's is correct since the apostrophe indicates the contraction of the word discs to d's.
Pick up a copy of "Beginning Java Databases" for an incredibly good account of writing Java to connect to a database, run queries and extract metadata about the database. Here the first 60 pages are a "what you need to know" quick-start guide to querying a database followed by a more detailed discussion of SQL concepts and JDBC application development. I have thoroughly enjoyed the book and it is empowering in many ways since it takes what you know about databases in ColdFusion and escalates you to the underlying principles.
Watch Dodgeball with Ben Stiller and Vince Vaughn. Seriously. It makes great light relief after a week of geeky books and it has to be my favorite movie of the year so far, ranking as high as Old School, maybe higher.
...and finally, after the Keane concert at the Cotton Club in Atlanta on Friday night I had a surprise opportunity to chat with Tom Chaplin, the lead singer of Keane. For the uninitiated, Keane's album "Hopes and Fears" is number one in the British album chart and they are making waves on US radio stations currently with "Somewhere only we know". There is a good review of the band at MetroWest Daily News. The fun part was knowing that this has the potential of another Coldplay. I saw Coldplay at the Reading-Leeds festival in 1999 when the band were new to the scene but still with a good crowd. When I moved to the US in 2000 I saw them play at a small club, maybe Metro, and there were fewer than 100 people there. Big contrast with the 2002 concert I attended in Atlanta at the Gwinett Civic Center where I strained my eyes to make out the band members on the stage from the rediculously priced seats I bought for Melissa and I.