Main Content

Short underground journeys and a PHP book

Archive - Originally posted on "The Horse's Mouth" - 2004-11-19 07:02:23 - Graham Ellis

I know London; I was brought up here and I'll travel around by bus and tube (and train) quite happily; usually, I don't even need to bother with a map except, perhaps, a streetmap of the immediate area I'm visiting to find the right street and building.

I'm always amazed by the number of travellers who get onto a tube at one station and off at the next - I rather suspect they walk further under ground to and from the tube than they would by simply completing their journey on the surface - and they'll end up 2 pounds the poorer too. This week, I'm staying in a hotel 1 stop from the place I'm giving a PHP course and I've explored the leafy inner suburban roads of Highbury and Islington each evening and morning. I now know where to go to get Ethiopian Cuisine, and I've see the King's Cross end of the Islington canal tunnel for the first time.

But after the course last night, I *did* catch the tube into town - just too good an opportunity to visit Waterstone's (formerly Dillon's) and catch up on what's new in computing books. The more "regular" topics from the "usual" publishers we buy on line - they're a pretty fair bet and if there's the occasional "lemon" we still like to have a copy on our shelves and know why it's a lemon. But there's a welter of more interesting topics. I think it was on a previous visit to Foyles that we bought "Web Bloopers" by Jeff Johnson - ISBN No. 1-55860-840-0 and that's turned out to be one of the books most read by our trainees. It's not from one of our "regular" publishers, it's not an Open Source book as such, yet it's peculiarly thought provoking to many of out trainees.

Last night I picked up another book, interesting also published by Morgan Kaufmann, entitled "Multi-tier application Programming with PHP". Written by David Wall, ISBN 0-12-732350-3. I'll be very interested to see what others think of this book on our courses. It provides a useful tutorial with examples into how to write a PHP application (where the accesses are transient) that talks to a persistent level for efficiency and data storage. But I find myself slightly concerned at the number of global statements that are present in the code examples, and the use (in parts) of page full of echo commands. I was taught (and experience confirms my teaching) that too many globals are a bad thing, and that if you find yourself repeating the same thing (such as an echo) over and over, there must be a better way of doing it. Looking at the echos, they could be simplified into a single statement very easily - the code change almost SCREAMS at me. But perhaps the author wanted to cover the principles without getting bogged down in another piece of PHP syntax.