Articles

PHP Hacks: Tips & Tools for Creating Dynamic Web Sites

book coverPHP Hacks by Jack D. Herrington
Dec. 2005, O’Reilly Media, Inc.
468 pages, $29.95, paperback
Amazon.com | Amazon.co.jp

From generating Flash movies on the fly to adding interactive maps to your Web site, the number of interesting things that can be done with PHP is limited primarily by one’s imagination. To provide some stimulation on that end, Herrington has picked 100 nifty things you can do with PHP and brought them together in PHP Hacks from O’Reilly.

Like the other titles in the Hacks series, this book contains a smattering of just about everything, but treats the reader to just enough information about each topic to serve as a springboard for further exploration on your own. Although the code samples are quite generous (in many cases, they could be adapted to your own projects with minor alterations), they are clearly intended as a staring point, not as finished, production-ready scripts. In many cases, Herrington also provides well prepared UML diagrams to go along with the code samples, which provide an intuitive visual complement to the code itself.

Although there is certainly a lot of good information and inspirational value in the book’s first four chapters (Installation and Basics, Web Design, DHTML,and Graphics), in my view the really good material is in the last six chapters (Databases and XML, Application Design, Patterns, Testing, Alternative UIs, and Fun Stuff). The material in the chapter on design patterns, in particular, was excellent and would very likely challenge the skills of all but the most experienced PHP developers.

In some cases, though, the content of this book may be a little bit too close to the bleeding edge of what is possible with PHP. I could not help but notice that many of the hacks required PHP5 or the latest versions of Microsoft Office applications, whereas in many production environments (including the Tokyo PC server, I believe), PHP4 is still widely used, and many office environments have more or less standardized on the features that were available in Office 2000.

Another thing that may surprise some readers is that, contrary to the regular “copy this code to your server and then load that page in your browser” technique used in many PHP books, many of the hacks in this book are actually designed to run from the command line, which some might find unusual for PHP, which is often thought of as simply an “HTML scripting language.” When shown the command line hacks—and the one for creating desktop applications in PHP—I think most readers will quickly realize that there is more to PHP than just Web pages.

Recommended for anyone who is interested in PHP, but needs a bit of a creative nudge to get started on some truly interesting projects.

Posted by S. Patrick Eaton on Apr. 1, 2006 at 11:48 AM
(0) Comments • (12) TrackbacksPermalink   Index of articles

AI Game Development

book coverAI Game Development by Alex J. Champandard
October 31, 2003, New Riders.
500 pages, $49.99 US, paperback.
Amazon.com | Amazon.co.jp

Instead of dry theory the book tries to show the AI techniques in real applications, which is a great idea.

The sub-title of this book is Synthetic Creatures with Learning and Reactive Behaviors. The book covers what it calls “nouvelle AI” and reactive techniques, as opposed to planning and searching.

Instead of dry theory the book tries to show the AI techniques in real applications, which is a great idea. The theme is creating a shooting NPC (non-player character, also referred to as an “animat") for the game of Quake and it is quite possible there are real-world military applications. Now, call me a liberal, loonie pacifist—you can even call me French if you like—but I had trouble getting excited by this.

The book is divided into 8 sections, each of which approach one part of the problem, and generally show one AI technique. The AI technique chosen is not always the best match for the problem but I had no issue with that.

Section I is the overview. Four boring chapters of repetitive advocacy. The author also introduces FEAR, which is the open-source framework used throughout the book, and is available at http://fear.sf.net

Section II is about moving and navigation. Mostly tedious. The AI technique is rule-based systems.

Section III covers shooting, and the AI technique is neural nets. The maths gets a bit heavy but I found these the first chapters worth reading in the book.

Section IV is on weapon selection. The techniques are scripting and decision trees. The latter were interesting but I found the explanations lacking enough clarity for me to grasp them on a first read. Feel free to call me stupid.

Section V is on using objects and defensive actions. The topics covered are fuzzy logic and genetic algorithms. Some good chapters here.

Section VI is on emotions and the technique is finite state machines. Quite good, though state machines seem better suited to some of the other problems rather than emotions.

Section VII brings it altogether: choosing when you should move, when to shoot, when to run away. The technique is reinforcement learning. Some nice diagrams but there seemed lots of overlap with earlier sections in the techniques shown.

Section VIII is summary. Nothing special.

There is a web site for the book at http://AiGameDev.com/ which allows you to download the source code. I had a brief look at the source code and it seems to be well written. I didn’t try compiling any of it (Windows, Visual C++ only apparently).

I have three main problems with this book. First is that, while there is some pseudo code, there is no source code. Even I am surprised that it bothers me because one of my pet hates is books that kill innocent trees to show the same source code over and over. You know the kind of thing: “Listing one shows how to write a server in just 400 lines. Now let’s add 5 lines to show how it can restrict access by IP: see the 405 lines in listing two.” But there is a balance to be struck and AI Game Development goes too far the other way. In many places I was in desperate need of some concrete C++ code to help me understand the Greek-letter mathematics or the vague English algorithm description.

That brings me to the second problem, which is that the writing is not good. It is a first draft that has not been edited on any level: there were typos, there was poor grammar (this is not just tedious to read, it also made it hard to follow paragraphs of the form: A. But B. However C. Yet D.), and at a higher level the writing was repetitive. Frequently I saw a group of three or four paragraphs, all saying roughly the same thing, that could have been written more clearly in half the space.

My third complaint is that there were no quantitative results. The conclusion at the end of each section maybe had a fuzzy description of how well the techniques worked. The counter-argument that these things are hard to measure and that you can only judge the difference by playing a death-match against the animat you have made is not true. For instance you can run a 1000 games pairing each animat against others, in different environments, and report the winning percentage. Currently not all source code is available for download on the web site. Perhaps the author wrote the book first and so would not have been able to include results?

But despite those problems the book is still quite good. The later sections of the book are better than the early sections and the few good chapters are good: I will come back and read them again and study their source code. In summary I can recommend this book if you are interested in the theme and the AI techniques presented; just brace yourself for the fuzziness.

Posted by Darren Cook on Mar. 19, 2004 at 4:35 AM
ReviewsBooks • (10) TrackbacksPermalink   Index of articles

Hardware Hacking Projects for Geeks

book coverHardware Hacking Projects for Geeks by Scott Fullam.
November 1, 2003, O’Reilly & Associates.
504 pages, $29.95 US, paperback.
Amazon.com | Amazon.co.jp

For those of you who never got further than taking apart toys as kids, now you have no excuse not to let loose your inner hardware geek.

O’Reilly has built up a good reputation of publishing interesting and original books. When I heard about Hardware Hacking for Geeks I was intrigued and had to give it a read. I was at first surprised by the absence of O’Reilly’s trademark animal on the cover of the book, and the inside design departs from O’Reilly’s layout of recent years. A sign of a different series or a new format for O’Reilly publications?

The first page of the book starts off with why the author is really a hardware hacking geek, not surpringly including the ‘used to take toys to pieces as a kid’ piece, but you are soon convinced that the author is well qualified as a hardware hacking geek.

Rather than including a CD with all the supplementary material, it can be found at the URL noted in the book. Not having a CD drive on my laptop, I much prefer it this way.

Not having a background in hardware hacking I wondered how easy it would be to get into the book. The second page put me at ease. “If you have no background in electronics, you may want to first read through Part I, Basic Hacks, Tools, and Techniques. It will help you become familiar with the tools of th trade and basic soldering techniques”.  Moving to the introduction of Part I, “The projects in this section require you to use basic hand tools, read schematic diagrams, use a multi-meter, and know how to solder”. The tour of the author’s toolbox may be a bit overwhelming for any hardware hacker beginner. I skipped over this for the time being assuming that my first chosen project wouldn’t require all of the tools and that later parts of the book would help me understand the jargon here so I could pick up the relevant parts from a nearby 100 yen shop. A later chapter covers “advanced hacks, tools and techniques…to tackle the more complicated hacks”.

As with all O’Reilly publications the book is well organized and clearly laid out: “Each project begins with a duration scale representing how much time the project will likely take to complete, a cost scale…and a difficulty scale”.

The book contains the following projects, one chapter for each: how to build a portable laptop power supply; how to build an aquarium inside a Macintosh; how to hack 802.11b antennas; how to build a PC water-cooling system; how to hack a furby (and other talking toys); how to hack a video periscope for your car; how to build a digital video recorder; how to hack a building size display; how to build a cubicle intrusion detection system; how to build an internet toaster (…that can be commanded to toast a pattern on the bread based on the weather or any other web-based data); how to build a home arcade machine; how to build a remote object tracker; how to make RC cars play laser tag; how to build a wearable computer; and finally how to build an internet coffee maker.

After taking into account the hacks, tools and techniques chapters, the book is probably worth the price even if you just want to do one or two of the projects. Each chapter contains full, detailed instructions and lots of photographs and diagrams, even including ‘a quick overview of assembly language and C’ in the furby hacking chapter. The final two projects sounded most interesting and useful to me so I immediately skipped to those chapters and will focus on them for this review.

Looking at Chapter 14, How to Build a Wearable Computer I found that it ranked very highly on the cost, time and difficulty scales. Still tempted and and having skim-read the detailed instructions in previous chapters, I was not fazed and read on. After the overview the required components for the project were listed and then a detailed explanation of the requirements and availability of each item followed. I learnt a great deal about wearable computers just from reading this. A lot of different alternatives are explained giving you plenty of ideas that you would never have considered or thought possible yourself, for example taking a viewer from an old camcorder. Useful links are used sparingly and effectively, including information on where to buy any parts you need. Given that the system is componentized there was not a lot of information on putting everything together but there is enough information in other sections to ensure that you get coomponents that work together. The latter part of the section gave an overview of the different operating systems to choose including information on options available for free. This project left the reader with a lot of choices and options to work with but didn’t make things sound as difficult as I had imagined. I’ve yet to try the project but the prospect of being able to check my e-mail through a headmounted viewfinder powered by a CPU in a waist pouch, replying using a one handed input method is very tempting. The availability of low priced, flat rate wireless data cards in Japan means that you could turn yourself into a walking internet and e-mail terminal.

Having gone through a ‘very difficult’ chapter I was glad to see that the internet coffee maker project was only ranked as moderate. I was hoping that I could ‘make’ a cup of coffee using my browser (then I would have been really impressed) but the project had the aim of letting you know whether there was any coffee in the pot and its temperature. As with other chapters, the first page starts with an informative background setting the scene nicely for the project . This project again worked by teaching you how to put together freely available or commercial parts and also provided adequate information on the hardware side of things.

The internet coffee maker was an interesting sounding project but I plan to start on the wearable computer one first. Of the 15 projects I’m sure there is one that speaks to your inner geek and if so I wouldn’t hesitate to recommend getting hold of the book to give it a try. You are sure to learn a lot and have a useful toy at the end of it.

If there was anything disappointing about the book it was likely due to the fact I had not read in detail what the book was about in advance. I had hoped that I might learn some tips about how to try to fix some of the broken hardware I have such as hard disks or a PDA. I guess given the huge range of hardware available this approach would be impractical and the fully explained project approach is good for giving you all the required knowledge to get you started working on projects in a short amount of time. The book also succeeds in helping you build a good working knowledge and toolset for embarking on projects of your own.

For those of you who never got further than taking apart toys as kids, now you have no excuse not to let loose your inner hardware geek with the help of O’Reilly’s (http://www.oreilly.com) ‘Hardware Hacking Projects for Geeks’ (ISBN: 0-596-00314-5).

Posted by Andrew Shuttleworth on Mar. 14, 2004 at 4:43 AM
ReviewsBooks • (4) TrackbacksPermalink   Index of articles

PC Annoyances

book coverPC Annoyances by Steve Bass.
October 14, 2003, O’Reilly & Associates.
500 pages, $19.95 US, paperback.
Amazon.com | Amazon.co.jp

For those of us who tear our hair out trying to figure out why Microsoft Word, Excel, Powerpoint, Outlook and Outlook Express programs sometimes do those strange things, buy this book and save your hair.

Steve Bass has crafted a fine book, providing clear, easy-to-implement steps to solving those nettlesome little problems that get in the way of getting work done. The book covers seven general computing areas: email; Windows; internet; Microsoft Office; Windows Explorer; music, video and CDs; and hardware; and a multitude of applications within each area. It’s written in a short, snappy style and is peppered with links to software and shareware to help you keep your PC running without hiding menus, disappearing or overcrowding taskbars, weird things happening to your numbered lists in MS Word, and—my personal fav—the loss of desktop organization when Windows crashes. But the best thing about this book is that all the URLs for all the tips, fixes, and software downloads are listed by chapter and conveniently located at http://www.oreilly.com/pcannoyances

In PC Annoyances, Mr. Bass writes about the really dumb things programs do to us, and is “floored that some companies—RealOne and AOL for instance— actually think it’s okay to plaster icons willy-nilly in the start menu, on the desktop, in the system tray.” And, he knows he’s not alone in feeling this way, so when Tim O’Reilly called and asked him to expand the PC Annoyances columns he’s written in PC World into a book, he agreed.

Mr. Bass has been using computers at work for about 20 years, and is a Contributing Editor to PC World, writing the “Home Office” column since 1990. His work has also appeared in Forbes, Family Circle, and Computer Currents, and he has a regular spot on KPCC’s “Airtalk” and KPFK’s “Digital Village”. Mr. Bass is the founder of the Pasadena IBM Users Group, and 22 years later, he still runs the group. He also co-founded the Association of Personal Computer User Groups http://www.apcug.org, of which the Tokyo PC Users Group is a member. The book is written from the point of view of PC users, but doesn’t talk down to the reader. If you know your way around a keyboard and can use common programs to get things done, you’ll understand this book and benefit from the gems within.

Many of you know that I’m a die-hard Eudora user. Eudora’s always been the way I read email, and I’ve gotten to know it pretty well, but in five short pages of tips and tricks specifically for Eudora users I’ve learned more than I expected—all of it very useful—and including things like slimming Eudora headers down by entering the commands provided in the Eudora.ini file. This chapter is not just about Eudora. The author helps you understand and solve a host of general email problems and then guides you through the annoying things that Outlook, Outlook Express, Eudora, AOL, Hotmail and Netscape mail do, and how to stop them from happening. Mr. Bass has also provided me with a way to pre-address an email to my mom, for example, without having to go through the clicks necessary to open a new email, and select an address for the To line. There’s also a sidebar on Eudora’s keyboard shortcuts.

Actually there’s sidebars everywhere: the outside edges of each page list tips, hints, and URL references for the specified topics and a host of other stuff that’s at least entertaining, if not enlightening. I don’t know if AOL mail is so less annoying that it only needs two pages (call it a hunch, but I don’t think so), but that’s all the space that’s given to the bothersome things that AOL mail does.

The book covers Windows annoyances in 26 pages. Some of you scoff, and assume that it would take at least 2,600 pages to document repairs for all the irritating things that Windows does, but this is a really good start. Mr. Bass encourages the reader to perform the Number One, Biggest Fix of All Time and switch to Windows XP. He then spends a lot of time and consideration telling you how to ensure that your hardware and software will be compatible with XP; gives you valuable information on the new help engine in XP; and even tells you why it’s OK to activate the Windows Product Activation feature. In addition, you’ll learn to take charge of your Start Menu and System Tray, restore a Quick Launch toolbar that’s gone missing, shut down in one click, and learn where and how to keep multiple network settings for the various places you plug in to. Now that you can receive faxes in XP, the quick fix to faster printing is to associate the fax files with a viewer other than Windows Picture and Fax Viewer. Changing the association prevents the dreaded Photo Printing Wizard from opening up and dragging you through the click, click, clicking necessary to answer all the questions before printing commences.

There are also tips on fiddling with the Registry—a place in the PC I rarely go, but would be willing to attempt with Ball’s helpful advice—saving disk space by deleting old system restore points data, faster disk cleanups and compressions, and at least 12 other explanations that will help you understand Windows and force it to do your bidding. This book has made me look good to my family, because I’ve used the suggested screen capture utility SnagIt to show them where on the monitor they need to look for a particular command. The demo at http://snipurl.com/snagit_vid is short, to the point and well spoken. I’ve also learned how to protect my system from dumb installations, or programs that want to plaster their shortcut in every possible location.

As for fiddling around with the Internet, Mr. Bass provides over 40 tips “that untangle and streamline browsing (both Internet Explorer and Netscape), unleash Google, pound AOL into compliance, make IMing feasible and fun, and otherwise make your Internet experience nuisance-free”. I especially like the way the tips are organized under easy-to-find topic headings within the chapter, like “Make Your PC an Ad-Free Zone” which provides two programs to help you keep those annoying popups from popping; “Pictureless Pages Predicament” which tells you why sometimes you see that funny red X instead of a photo, and what to do about it; and “Clear Dead Links from your Favorites Menu” which tells you about AM-Deadlink that detects dead and duplicate links.

For those of us who tear our hair out trying to figure out why Microsoft Word, Excel, Powerpoint, Outlook and Outlook Express programs sometimes do those strange things, buy this book and save your hair. By using the almost 40 pages of tips to halt the most annoying things these four programs do, the G&A Factor (Grief and Aggravation) when using these programs should go way down. I only wish he’d included Access in the book, although that would surely have doubled the total number of pages.

There is also a whole chapter on Windows Explorer, and it needs it. In it, Mr. Bass tells you about “a handful of free file management utilities and two terrific alternatives to using Windows Explorer.” In addition to showing how to speed up searches for files on your hard drive (a must now that we all have HDDs larger than the state of Montana), there is also information on how to manage your Zip files — info that the good people at Zip apparently left out.

Lastly, we come to the chapter on Music, Video and CD. And as Mr. Ball says, “With great power comes great irritability. There’s a maze of file formats, a gaggle of players and the many complications surrounding disc burning.” The chapter focuses on the bigger annoyances of multimedia and your PC, including keeping all your music at the same volume, playing sound files quickly and easily, and turning off RealOne’s Message Center Ad (Yeah!). One interesting item is about using labels for your CDs. Steve’s advice is, no, don’t use them, because over time the label can shrink, or tear, pulling off the disks protective layers and distorting the reflective layer that holds the data. If the label is not applied precisely centered, it can make the disk wobble as it spins rendering it unreadable. If the label comes off while the drive is spinning, you risk destroying your drive.

All together this is a great reference book for the general PC user. I don’t expect a run-up of book purchases from the Tokyo PC Users Group, but if you have family and friends who often turn to you for advice on how to do something or stop something from happening, at 14 bucks this is a good book to buy for them. I’m glad I have it, and will buy copies for my family.

Posted by Barbara Manning on Mar. 13, 2004 at 4:47 AM
ReviewsBooks • (0) TrackbacksPermalink   Index of articles

Google Pocket Guide

book coverGoogle Pocket Guide by Tara Calishain, Rael Dornfest & DJ Adams.
June 12, 2003, O’Reilly & Associates.
129 pages, $9.95 US, paperback.
Amazon.com | Amazon.co.jp

While the package is convenient, the delivery of content is also very functional. The writing is non-nonsense, although not humorous, as one finds in the “Dummies” guide series. Gray-scale screen shots supplement the text. The examples do their job.

Why turn to hard copy for learning to use Google when the same information can be found online? That’s got to be the first question that comes to mind if you already spend a lot of time on the Internet. I mean, why spend the money (978 yen at amazon.co.jp)? If you really want to get to know Google better, spend a few minutes clicking around their site for free. Find the page that gives hints and tips and study it. Click some more and discover Google Labs, Google News, Google Glossary, Google Images, and more. It’s all there…somewhere.

After about 20 minutes, though, if you’re like me, chances are you’ll have had enough and turned elsewhere, never to return again, even if you bookmark a page or two. You know it will always be there. Granted, you may find a page so useful you’re willing to spend printer ink on it—that you plan to sit down and actually read later. That’s fine, too. But the online experience has its drawbacks. Any slice of information, being “just a click away” means that countless temptations and distractions are vying for one’s attention, and sometimes more discipline than we can muster is required to stay on track. Not to mention that the longer one spends staring at the screen, the closer to information overload one gets before mental fatigue sets in. That strong initial motivation disappears and the question becomes “what was I trying to do in the first place?”

Now the investment in a mass-market paperback doesn’t sound so bad after all. What you get comes in a compact, portable package, featuring high legibility and durability. It can be tossed into a backpack without fear of damage and accessed without drawing undue attention to oneself. The glossy turquoise-and-black-on-white O’Reilly exterior is attractive, although on the interior some bleeding of ink from facing pages may be found.

While the package is convenient, the delivery of content is also very functional. The writing is non-nonsense, although not humorous, as one finds in the “Dummies” guide series. Gray-scale screen shots supplement the text. The examples do their job. The content is divided into four sections, roughly equivalent to: general introduction, how to search, how to read results, and other functions. A quick-reference appendix and adequate index are also included. The linear presentation facilitates absorption of the content, while built-in flippability provides instant access to any section.

The slim 100-pager is not a keeper for reference, nor is it a cover-to-cover thriller. It is better suited for reading during idle moments in an acquisitive state of mind. In two or three minutes, you’re sure to find a useful tip such as limiting a search to a company’s website ("site:canon.co.jp" for OS compatibility for a printer), or to a specific type of file ("filetype:pdf" for a manual in downloadable format), for example. Even if one knows the basics of Google, like putting hyphens between words to find an exact phrase (or using quotation marks), a reminder that searches are limited to 10 words can be appreciated.

Published in June 2003, the guide includes tips on searching for blogs, but is already starting to get dated as Google moves ahead with new features such as word definitions ("define:wlan"), and a calculator function ("39.95 times 108"), from the top page. The concepts can sometimes get very technical, such as using special syntax to restrict by date, but since Google isn’t rocket science (or PHP), the guide has only so much material to cover. It’s a great bathroom read, but won’t last long, leaving you looking for more to learn. So buy another item along with it. Besides, when your Amazon Japan order is 1,500 yen or more, shipping is free. But you knew that already. And you didn’t even need to search Google.

Posted by Richard Sadowsky on Jan. 27, 2004 at 4:51 AM
ReviewsBooks • (0) TrackbacksPermalink   Index of articles

The Photoshop Book for Digital Photographers

book coverThe Photoshop Book for Digital Photographers by Scott Kelby.
March 5, 2003, New Riders.
384 pages, $39.99 US, paperback.
Amazon.com | Amazon.co.jp

There are many Photoshop how-to books, and we finally have one written especially for digital photographers.

Digital photography is finally coming of age as digital camera prices come down, image quality goes up, and inkjet printers produce true photo-quality prints.

I finally made the big switch from film to digital less than a year ago. It’s great. I no longer have to buy and process film nor scan my photos for the Web or emailing to friends. It’s also much easier to organize photos with a computer than with shoe boxes. I will never buy another film camera again.

Although digital brings many advantages and loads of fun, it also poses a whole new set of questions. Beginners will have to become familiar with image resolution, file sizes, etc. And serious shooters will sooner or later want to tweak their photos with a good image-editing program.

Enter Adobe Photoshop, the industry standard for image editing. This is a very sophisticated and complex program, but easy to use if you know what to do.

There are many Photoshop how-to books, and we finally have one written especially for digital photographers. The Photoshop Book For Digital Photographers is perfect for people like me who take pictures with a digital camera and sometimes need to use Photoshop to improve images. The book is for both beginners and professional users (Windows or Mac).

It’s a practical and helpful collection of step-by-step image-editing techniques. You’ll find quick and easy fixes for common ailments such as underexposed photos, red eye, color casts, crooked photos (especially horizon shots), and digital noise (colored spots).

There are also advanced techniques such as making a fat person look slim, erasing freckles on a face, and replacing a cloudy sky with a blue one. It even shows how you can turn a slight frown into a slight smile (Mona Lisa style). Too bad it doesn’t also teach you how to open the eyes of a person who blinked when the picture was taken. That’s my main problem. The smile is beautiful, but the eyes are closed. Nothing more frustrating than that.

The first piece of advice the author gives is, burn your digital camera photos to a CD even before starting up Photoshop or doing any editing. The original images will serve as your “digital negatives” which can never be accidentally erased or trashed.

You can also print out thumbnails of the photos for the CD jacket. And the Batch Rename feature automatically renames your image files from the unrecognizable 110_101.jpg, 110_102.jpg, and 110_103.jpg to something more familiar like huladancer1.jpg, huladancer2.jpg, etc.

Thus, the book starts out with the most basic things as it progresses toward more advanced procedures (such as embedding digital copyright info) to improve (or protect) your digital photos.

There are eleven chapters covering subjects like cropping and resizing photos, fixing digital camera photos (red eye removal, etc.), color correction, masking (to isolate a person or object from the background), retouching portraits (removing blemishes and wrinkles, etc.), editing the human body (erasing flab, etc.), applying special effects, working with grayscale images, image-sharpening techniques, and showing digital photos to clients. It pretty much covers all the things a digital photographer would want to do with his or her images.

Each procedure has an introductory paragraph that explains the purpose and strategy of the respective technique. Then the procedure is described step-by-step with full-color screenshots (taken from a Mac). It’s very easy to follow. The text, layout, and design are also attractive and the book is not too thick and heavy like other Photoshop books, making it less daunting.

The author also mentions all the little flaws of Photoshop and tells you effective workarounds. For example, the Dodge and Burn tools are “lame” so he offers an alternative. Photoshop is a great program, but it’s not perfect. To think that I’ve ruined so many images with these lame tools!

You don’t need to read the book from cover to cover, just read the techniques that you want to do. However, I would at least skim through the entire book just to see what techniques are possible for future reference. It’s quite amazing to see what’s possible.

If you have Adobe Photoshop Elements or the newest Photoshop CS, you can still use this book since most of the commands are similar or the same. I highly recommend this book for digital photographers willing to spend a little or a lot of time making their digital images perfect.

Posted by Philbert Ono on Jan. 27, 2004 at 4:49 AM
ReviewsBooks • (1) TrackbacksPermalink   Index of articles

Mac OS X Hacks

book coverMac OS X Hacks by Rael Dornfest, Kevin Hemenway
March 24, 2003, O’Reilly & Associates.
304 pages, $32.75 US, paperback.
Amazon.com | Amazon.co.jp

I’ve been impressed with Mac OS X Hacks not only for its utility, which has undoubtedly saved me from premature baldness, but for the entertainment provided by the unabashed geeks-having-fun attitude of the various authors. Even though the hacks are written by many different people, the style of writing is always clear and it never reads like a manual; it’s more like a weblog of interesting Mac OS X snippets organised into sections.

Mac OS X represents a radical shift compared to previous incarnations of the Mac OS. The old engine of Apple’s proprietary operating system has been exchanged for an open source Unix OS, the Free-BSD-based Darwin, over which Apple has built a Mac-like interface using a number of innovative technologies.

For the first time, Mac users have an OS that provides a true multitasking and protected memory environment, with a core than gives the user unprecedented power over the running of the system. To the end-users this means that their Mac will, for the first time, happily let them switch from one application to another at any time and that if an application crashes the rest of the system is usually unaffected. In addition to the new OS and new interface Apple has added new i-apps into the pot: iTunes, iPhoto, iMovie, iDVD, iChat andiCal, to name a few, with first four now bundled and promoted as iLife. Of course, being Unix-based, huge amounts of Unix open source software has also become available for the Mac.

So, while there are die-hard Mac OS stalwarts who refuse to upgrade from Mac OS 9 (or even earlier), most Mac users have eagerly embraced the new version of the Mac OS with all the advantages it brings. Unfortunately, old tricks that used to work on earlier Mac OS versions are now obsolete, as are some old Unix tricks which aren’t compatible with Darwin.

In a situation like this one needs a guide to the useful, and sometimes just plain nifty, tricks and hacks that can be performed on the new OS. Mac OS X Hacks provides its 100 hacks grouped into nine topics: Files, Startup, Multimedia and the iApps, The User Interface,Unix and the Terminal, Networking, Email, The Web, and Databases. Not all hacks are created equal, however, and they have been graded into three categories based on their technical complexity: Beginner, Intermediate, and Expert.

Given the distribution of hacks over the three rating categories, 43 Beginner, 29 Intermediate and 28 Expert, one might feel that the words “industrial-strength” in the subtitle refer to light industry.That’s a little unfair, perhaps, as some of the hacks I have found most useful have a Beginner rating while most of the hacks that I doubt I’ll ever use (too esoteric) have an Expert rating.

The Beginner hacks may be technically simple but many of them give answers to the kind of questions that would otherwise have me tearing my hair out trying to find an answer. A good few hacks from Chapter 1, including Hack #1 “Understanding and Hacking your User Account” and Hack #11 “Inspecting the Contents of an .app Package” fell into that category for me. I’d find it hard to say that any of the Beginner rated hacks are really useless or trivial.

Intermediate and Expert level hacks held much more interest, and I was very grateful for the SSH tunneling walk-through in Hacks #70"Secure Tunnelling with VPN” and #71 “Remotely Log In to AnotherMachine with SSH”. Having used Unix extensively many years ago, one of the first hacks I read was #56 “Top 10 Mac OS X Tips for UnixGeeks” which told me my Unix experience is still, happily, relevant.

Some of the Expert hacks may be non-trivial but I wonder how useful they are. Hack #65 “Running Linux on an iBook”, is more of a curiosity item than something many Mac-users will follow. Indeed, if your iBook ran Linux, you wouldn’t have any use for the rest of the book. More useful, but likely to have a restricted audience, are the the two hacks which comprise Chapter 9 on how to install the MySQL and PostgreSQL database software. Similarly, the Hack #82 “Getting sendmail up and running” and Hacks #88 to #98 on how to activate and configure the Apache web server built into Mac OS X are, I dare say, unlikely to be used by most readers. Nonetheless, I personally find it comforting to know that the information is there, neatly packaged into Hacks, if I need it.

One of the real strengths of this book is the self-contained nature of the hacks. This is not a book which could be comfortably read cover-to-cover; it’s much more interesting to read a hack here and a hack there and much more useful as a reference for those times when you have a specific problem. Indeed, many a time my first impulse was to reach for Mac OS X Hacks when I had a problem and the excellent index is another of this book’s strengths.

Computer books always have the potential to date swiftly, given the pace of change in the computing environment. Mac OS X Hacks has generally steered clear of material which will date quickly, although the tips on iApps in Chapter 3 will probably be the first to show their age. Although I haven’t been using the latest OS upgrade, Mac OSX 10.3 “Panther”, for very long, I’ve found that most of my favourite hacks still work well.  Alas that Hack #66 “Anatomy of an InternetShortcut” is already obsolete in Mac OS X 10.2 “Jaguar”: URLs dragged from browsers, etc. to the Desktop are no longer text files with a .url extension, as described in the hack, they are resource-fork-only files and the URL is editable only with a resource editor.

Old-style Mac files with resource forks, which includes every “Classic” Application, pose a particular problem for Unix tools that don’t recognise resource forks. Such tools will irreparably damage such files and unfortunately, this includes rsync which is detailed in Hack #59 “Mirroring files and Directories with rsync”. A warning about rsync’s incompatibility with resource forks is a grave omission from the book particularly since a resource-fork-aware version, rsyncX, is freely available.

Of less importance, but potentially very annoying, Hack #7 “Locking and Unlocking Files” contains a typographical error in the final command, to unlock the file you use a lower-case ‘L’: SetFile -a l filename.txt

Despite these few blemishes, I’ve been impressed with Mac OS X Hacks not only for its utility, which has undoubtedly saved me from premature baldness, but for the entertainment provided by the unabashed geeks-having-fun attitude of the various authors. Even though the hacks are written by many different people, the style of writing is always clear and it never reads like a manual; it’s more like a weblog of interesting Mac OS X snippets organised into sections.

Mac OS X Hacks is written for those Mac users who want to roll up their sleeves and have a bit of fun in the terminal, who have probably already installed the Mac OS X Developer Tools (for those who haven’t, there is Hack #55 “Introducing and Installing the Mac OS X Developer Tools") and who are willing to spend a little time to teach their Mac a new trick. My Mac knows more than a few new tricks now, and I’ve had a few laughs along the way as well as learning a few new tricks myself. What more could I ask? 

Posted by James Quilty on Jan. 14, 2004 at 4:53 AM
ReviewsBooks • (0) TrackbacksPermalink   Index of articles

Linux Server Hacks

book cover Linux Server Hacks by Rob Flickenger.
January 2003, O’Reilly & Associates.
221 pages, $24.95 US, paperback.
Amazon.com | Amazon.co.jp

This collection of 100 hacks will help you fine-tune your Linux server and help you get optimal results with minimal effort.

SECTIONS
I was delighted to see that Eric S. Raymond’s “How to become a hacker” was excerpted in the front matter. It was Raymond’s work that first nudged me down the hacker’s path; any book that quotes from the Cathedral and the Bazaar is off to a good start.

CHAPTERS

Server Basics

Although the hacks presented in this chapter do indeed cover many of the basic tasks that make up the regular routines of server administration, don’t be fooled into thinking that the word “basic” in the title means that only utter newbies need to read this chapter. Many of the hacks described here are reasonably sophisticated, and none could be described as obvious. In reading this chapter, I discovered that many of the unnecessary-daemon-killing and resource-hog-hunting hacks can be combined with performance-milking hacks in ways that had never even occurred to me before.

Revision Control

Revision control is an undisputed necessity in any system administration effort, so it really goes without saying that this chapter is a must-read. That being said, however, the three RCS-specific hacks are really just enough to allow RCS to make a token appearance in a chapter that is otherwise entirely dominated by CVS-specific hacks. One almost gets the impression that a collection of RCS reference materials could be relegated to a sidebar in subsequent editions, thereby making more room for the author’s obvious favorite, CVS. It’s not that the RCS hacks are not useful—far from it!—but simply that there are two few of them to build upon, unlike the CVS hacks which have the additional benefit of being numerous as well as useful.

Networking

Expect very little hand-holding in this chapter. If you don’t already understand networking jargon, this book is not going to explain it to you. The author expects readers to have a solid understanding of those concepts already, so that he get get on with explaining more advanced topics, like how to thwart DoS attacks, drop packets that seem to be infected, or create tunnels across the Internet from one private network to another.

This is also perhaps the real jumping off point, where the book really dives into hacks on a level that only true professionals can sufficiently appreciate. The earlier chapters presented hacks for purposes that even Linux hobbyists could use, things like version control and backups, but this chapter breaks away from those basic things and goes far beyond. (For one thing, the hacks about tunneling require multiple private networks, which it seems safe to assume the hobbyist will not have.) Some might say this is where the book starts to get really interesting. Whether you agree with that sentiment or not, this chapter is the dividing line between the hacks for all and the hacks for pros.

Monitoring

In order to make sure that everything is running the way it should and to get the best performance out of your particular setup, it is imperative to know what’s going on and when. That means monitoring. The catch, though, is knowing what to monitor on any given system, as no two are necessarily alike. Monitor everything and you’ll soon end up with a disk full of information you don’t really need. Monitor too little and you run the risk of “poking variables in the dark”, as the author puts it. Obviously, neither of these alternatives is acceptable, so the author thoughtfully provides numerous hacks that will help you pinpoint exactly the information you need, including information that you may have never even realized was available.

SSH

This chapter, all by itself, cleared up many of the things I found hard to understand in SSH: The Definitive Guide. Books dealing with data encryption can be abstruse and exceedingly dense (which make it a chore to read them), but Flickenger manages to focus solely on practical applications of SSH, with an eye on helping you get back as soon as possible to what it is you were working on before SSH entered the picture.

Scripting

Although this book is not about programming per se, this chapter is the author’s nod to the value of applying programming techniques to common, repetitive tasks as a time-saving measure. A bit of Perl goes a long, long way!

RECOMMENDATIONS/OBSERVATIONS
If there are shortcomings in this author’s approach, they are quite beyond my ability to detect. The sensible advice found herein condenses a great deal of experience, making it possible to absorb a lot of concentrated knowledge without actually having to relive those same experiences yourself. This is in keeping with the Hacker’s Ethic, as described in the preface: No problem should ever have to be solved twice.

For a book intended for hackers and geeks, Linux Server Hacks is remarkably well written. This is a refreshing change from most geek-oriented books, many of which are tediously dull. Quite the contrary with this book. Flickenger has a gift for levity that makes what would normally be monotonous into something light-hearted, even funny—and this remains true even when he’s chiding you for doing something foolish. Such is the mark of an able mentor. You’ll find it hard to read this book with a straight face, which could be good or bad, depending on who happens to be nearby when you are reading.

All the hacks are numbered, and the number of the hack being discussed appears in the outside corner at the top of each page, which makes it remarkably easy to flip through pages while looking for a hack that was referred to in another section. That’s probably as close as you can get to hyperlinks in a dead-tree publication.

One sure sign that you are getting candid, professional advice is when the author points you to books and resources other than those produced or owned by the publisher, as Flickenger does a number of times in this book. (Conversely, you know that you are being lured into a marketing ploy when most of the references in a book are to other titles by the same publisher. A little bit of cross-marketing is fine, but outright inbreeding really dilutes the value of the entire gene pool, so to speak.) It’s a small point, perhaps, but one that speaks volumes about the author’s true intentions.

A noteworthy side-effect of these collected hacks is that they stimulate ideas about how you could be handling tasks differently, more effectively. In the process of going about making these changes, however, you may find yourself in a position where you need to hack the hacks you had planned to use, thereby improving them (at least for your own purposes, if not in general). In this sense, each collection of hacks contains the seeds of the next generation of hacks. Therein lies the real value of this book: it leads you up to the point where you must forge ahead on your own. Sure, it’s great if you buy this book and find solutions to your problems in its pages, but you’ll know that you’ve really gotten your money’s worth when you buy this book and find even better solutions within yourself.

CONCLUSION
Serious professionals should have a copy of this book, even if only to hand to their less experienced brethren. Would-be pros and serious amateurs should definitely have a copy. People who are merely curious about how to run a Linux server can certainly learn a lot from this book, but might be better served by a resource targeted at a less advanced audience. Strongly recommended.

Posted by S. Patrick Eaton on Jan. 8, 2004 at 4:56 AM
ReviewsBooks • (0) TrackbacksPermalink   Index of articles

Digital Video Pocket Guide

book coverDigital Video Pocket Guide by Derrick Story.
June 30, 2003, O’Reilly & Associates.
113 pages, $14.95 US, paperback.
Amazon.com | Amazon.co.jp

Digital Video Pocket Guide is the author’s second contribution to the O’Reilly Digital Studio, the first being Digital Photography Pocket Guide,which is now in its second edition. In this book, you get a concise introduction to DV terminology, tips on best practices for your DV workflow, and numerous techniques aimed at getting the most from your DV-shooting experience.

SECTIONS/ORGANIZATION
The book is divided into three chapters that aim to address specific questions. The first is the “What Is It?” chapter, which provides easy-to-understand explanations of DV equipment. The next chapter, “How Does It Work,” shows how to use the equipment to get the effects you want. The last chapter, “How Do I...,” offers professional advice on how to manage common shooting situations. The book is also liberally peppered with professional tips, which are invaluable in the sense that they stimulate ideas about how to extend your DV-shooting skills after you have a good grip on the basics.

As you would expect, there is also an appendix with a number of handy tables for quick reference. The index at the end is also quite useful in pinpointing the location of desired content.

CHAPTERS
The premise of this book is spelled out in the preface, where the author emphasizes a simple point: although the advent of inexpensive digital video cameras has made it easier than ever to create your own videos, the fundamental techniques of videography have not changed much from the days when only pros could afford it. “Only the science has changed, not the art,” Story writes, “In this book, you’ll learn both.” And so you do, in three easy-to-read chapters.

What Is It?
When setting out to shoot digital video, there is no single determinant of success that comes anywhere near the importance of knowing your tools and how they work. Sure, you can probably get passable results by simply putting in a fresh tape and pushing the record button, but to get the footage you want, it behooves you to know how the video camera works before you start.

With that in mind, this chapter lists the key parts of most digital video cameras and rates them according to three levels: Basic, Intermmediate, and Advanced. This information is a useful supplement to the owner’s manual (and no doubt far more interesting to read), as it describes in detail features that often get short shrift in most manuals. It could also be very useful to someone who is still trying to decide, based on which features are most desirable, which DV camera to buy.

Don’t be too quick to assume that any given feature is superfluous or not relevant to the task at hand, the author warns, because you’d be surprised at how often a seemingly unimportant feature can dramatically improve your ability to get good footage. Take the time to familiarize yourself will as many of the features as you can stand: it pays off.

The author quite literally explains the workings of digital video cameras inside and out, which can be useful to give you a sense of what you need or to help you get the best use out of what you’ve got, depending on your circumstances. From accessory shoes to zebra patterns, you can learn about what your camera has (or should have) here.

How Does It Work?
After you get a feel for the features your camera offers, the next step is to figure out how to put those features to use, which is what the second chapter is all about.

Like anything worth doing, making a video is best handled as a pre-planned process. In this chapter, the author outlines a ten-step process, and then walks the reader though each step. You’ll have to read the book if you want to know what these steps are, but several of them related to preparation for and careful management of the videos you shoot. It is here that you will learn the difference between “bumping” and “blacking” tape in preparation for shooting, how to manage the timecode that enables you to log your scenes and set up batch processing routines in your application of choice, back up your projects, and prepare your footage for specific types of output (such as streaming video over the Web or recording to a DVD).

The author builds a great case for following a regular process for dealing with your digital videos. Each step builds on the ones before it, with the cumulative effect of making even simple things look very professional. Follow a pre-planned workflow, produce great videos. Story’s suggestions make it easy.

How Do I...?
In this chapter, the author promises to show you how to capture “footage that you never thought was possible with a $500 camcorder.” He fulfills that promise by introducing 12 tips that will help you manage common shooting situations like a pro and put finishing touches on your footage that will really make it stand out.

From how to deal with various lighting conditions, through how to survive special events like weddings or graduations, to how to archive and share your work, Story packs a lot of vital information into this chapter.

RECOMMENDATIONS/OBSERVATIONS
The author warns in Chapter 2 about the hazards of breaking the timecode, but doesn’t provide any advice about what to do with a source where the timecode is already broken. Is the user just out of luck? Is there a way to salvage some or all of the footage? The author doesn’t say. (To his credit, the author does hint that not all video-editing applications need “clean code,” but the casual reader might be left with the impression that broken timecode leaves the tape ruined beyond hope.)

CONCLUSION
Whether you are looking to get into digital video or simply looking to take your existing skills to the next level, this book will point you in the right direction. You won’t finish this book knowing everything there is to know about digital photography, but that’s not what Pocket Guides are for. This book provides a solid grounding in the fundamentals of digital video and encourages a foundation in time-honored professional practices. What you do from there is up to you, your talent, and your dreams. The author’s closing sentence emphasizes this point well, so I’ll borrow it here: “Get out there and make it happen.”

Posted by S. Patrick Eaton on Dec. 18, 2003 at 5:00 AM
ReviewsBooks • (0) TrackbacksPermalink   Index of articles

Put a little PHP in your pocket

book coverPHP Pocket Reference, 2nd Edition by Rasmus Lerdorf.
November 1, 2002, O’Reilly & Associates.
144 pages, $9.95 US, paperback.
Amazon.com | Amazon.co.jp

This book provides a quick reference for how to install PHP, how to use it, and what functions are built into it already. In this respect, it serves as a very concise guide to what you can expect from the language.

SECTIONS
This book could easily be divided into two sections: a 33-page, general explanation of PHP and a 99-page listing of select, ready-made functions. Given the nature and scope of PHP, this first part might seem a little short, but actually it is just the right length for its purpose--which is to provide an overview, not teach PHP (there are a great many other books for that). If either of these sections could be described as too short, it would be the second one, which only describes about half of the roughly 2,800 functions that are built into PHP4. Again, this is not a deficit of the book’s coverage so much as it is a testament to the author’s discipline. Lerdorf could have included all the functions, but there is no way the resulting book could remain in the Pocket Guide category. Instead, he presents those that he thinks will be most useful, and he succeeds brilliantly. As the inventor of PHP, Lerdorf’s first-hand experience with the langauge provides him with a clarity that other authors simply cannot match.

RECOMMENDATIONS/OBSERVATIONS
Although the order of the functions described is relatively easy to understand, this book would benefit from an index. Sure, you could easily flip to the end of the book to look for information about functions that handle ZIP files ("z" entries being near the end, of course), but is that the only place you will find ZIP-related information? As the book is currently organized, there is no way to tell, aside from scanning the other 1,394 functions that are described in the Function Reference section. Array-related functions make an even better example, because although you can reasonably expect the ZIP-related functions to be clustered together, array-related functions appear in many locations throughout the text. An index would be helpful in corralling them into one place.

CONCLUSION
One of the many blessings of PHP is that the online documentation is so abundant and so rich. This book does not attempt to substitute for the online material, but rather to supplement it. I find myself reaching for it a lot to find out if a function I’ve just thought of already exists. As a pocket-sized reference, it is also extremely useful to carry around when I know I won’t be able to access the online documentation (such as during meetings or while commuting to or from work).

There’s a lot of really useful information in this book. All you have to do is look.

Posted by S. Patrick Eaton on Dec. 18, 2003 at 4:58 AM
ReviewsBooks • (0) TrackbacksPermalink   Index of articles

FlashMX, Actionscript and Actionscript Cookbook Review

book coverActionscript Cookbook by Joey Lott.
June, 2003, O’Reilly & Associates.
552 pages, $49.95 US, paperback.
Amazon.com | Amazon.co.jp

The Actionscript Cookbook follows the same format as other O’Reilly cookbooks: solutions to how-to questions.

Though principally a review of a new O’Reilly book, this article will also talk about the capabilities of FlashMX and the Actionscript language.

Actionscript is the scripting language of Flash which many know as being responsible for annoying animated banner ads; it has also been popular for developing games. But since FlashMX it has many features that make it well-suited to many business applications. In particular for a front-end that must work from a web browser but requires interactivity, Flash is a much better solution than struggling with HTML and javascript, or even worse, HTML that calls a server-side script to generate a new HTML page when the user clicks anything.

Actionscript is very similar to Javascript: in fact many of the recipes from Javascript & DHTML Cookbook (that I reviewed a few months back) can be applied directly in your Flash movies. If all you’ve ever used Javascript for is mouseovers, or verifying form input, you may be surprised to discover just how powerful and interesting a language it is. You can build classes with constructors and even inheritance is supported.

It is an interpreted language and very weakly typed: if you call a function that does not exist it just does nothing, if you refer to a variable that has not been defined it treats it as zero, blank string or false depending on the context (you can ask if a variable has been defined or not). This weak typing, along with a complete lack of error reporting is the hardest thing about developing in Actionscript: there is no equivalent of PHP’s error_reporting(E_ALL) to catch your typos, and you have to resort to trace() statements to track down why things do not work as expected.

The syntax for class definitions takes a little getting used to: first define a constructor function just as with any normal function. Then to add variables and functions you assign them to a prototype. Here is an example:

//Define the class
  function myclass(a){
    this
.a=a;
    
}

  myclass
.prototype.some_var=77;

  
myclass.prototype.some_action=function(b){
    trace
("a="+this.a+",some_var="+this.some_var+",b="+b);
    
}

  
//Use as follows
  
var v1=new myclass(10);

  
myclass.prototype.some_var=55;        //Override class default
  
var v2=new myclass(); //Constructor parameter omitted

  
v1.some_action('xyz');        //Outputs "a=10,some_var=55,b=xyz"
  
v2.some_action('abc');        //Outputs "a=,some_var=55,b=abc"

FlashMX (also known as Flash 6) has some easy to use built-in methods for data communication with servers. You cannot directly connect to an SQL server, but instead use an intermediate script in a server-side language to take the data from the SQL server or server file system, perhaps modify or format it, then send it to the Flash client. This can be done with text strings, XML sockets, using FlashCom (mainly used for streaming video) or Flash Remoting.

Flash Remoting is a streamlined version of web services: the data is passed around in a special binary format instead of XML. Macromedia sell Flash Remoting servers for Java, Cold Fusion and .NET, but the format has been reverse-engineered and an open source version for PHP created (See amfphp.sf.net), and that has then been ported to PERL and Java. There are two distinct things you can do with Flash Remoting. First you can easily pass your back-end objects to Flash and have them created as Flash objects, and have all the data encoding and construction handled transparently. The second thing is you can access web services on other machines—the Flash Remoting server is referred to as a gateway for this reason. That means no need to understand SOAP, and no need to do any parsing. The data arrives ready to use.

Naturally Actionscript also has drawing functions, fine control over colour (including transparency and gradients) and text strings, and—important for us in Japan—uses Unicode internally. There are also form components, and javascript gives it many date and maths functions. In addition you can display jpegs, and play mp3s and videos, and it works equally well across Windows, Mac and Linux (at the time of writing Flash is the only software I have on my Linux workstation that will play video clips—I just cannot get the alternatives to work reliably).

Having teased you with the sexy features and got you all hot and excited, now comes the slap in the face: the Flash authoring software costs $500. Flash MX 2004 has just been released and seems to have split off the video options and some other things into a professional version at $700. There is a 30 day trial version available.

All is not lost: there are some cheaper commercial alternatives that produce Flash files, but their focus seems more on the drawing and animation side, and I do not know if you can use Actionscript. There is also an open source project called Ming, allowing a programmer to construct Flash files. It is fairly low level but does seem able to embed Actionscript. I do not know which of the data connectivity features of FlashMX are supported.

The Actionscript Cookbook follows the same format as other O’Reilly cookbooks: solutions to how-to questions. This is my favourite style of computer book, though here the original idea seems to have been lost and the author covers topics about which he has something to say, rather than it being a collection of the most common questions that developers ask. It is a good cover-to-cover read, but less good for picking at.

The book is comprehensive: part 1 covers local recipes, and part 2 covers remote recipes—connecting to the back-end. Then part 3 shows seven complete applications: a Paint program, an animation (very good as it shows the iterations development goes through), video chat, slideshow, mp3 jukebox, a web services “My Page” application, and a scheduler program.

The biggest thing missing in this book is screenshots: there are practically none, and for a book dealing with such a visual subject that is unacceptable. I understand that would have increased the book size, but I’d rather have lost some of the items and example applications if it meant I could see what the example code actually produces. Of course other computer books err too far the other way: I do not want to see a screenshot of a circle in the item on drawing circles. But at a minimum I want to see what each of the complete applications looks like when finished.

Other complaints? There is no attention paid to optimization, not even discussion of what might make your Flash movies slower or bigger. Maybe this is outside the scope but in a cookbook I would prefer to see high-quality professional solutions I can copy and paste directly into my code, rather than easy-to-understand solutions that I will end up having to rewrite if I discover they are too slow.

I would have liked to see more cross-referencing between items. In particular something that confused me when I first started with Flash is that if you want to fade text you have to embed the fonts. This is mentioned in item 8.20 on embedding fonts, but not in item 3.6 on fading movie clips.

In summary this book is not perfect, and it is not really a cookbook, but if you are doing anything with Actionscript then I think it is essential reading. It arrived in the middle of an Actionscript project and it has become the first book I reach for now. Recommended.

Posted by Darren Cook on Nov. 16, 2003 at 5:04 AM
ReviewsBooks • (0) TrackbacksPermalink   Index of articles

Outlook Pocket Guide - No-Fluff Help for Outlook Users

book coverOutlook Pocket Guide by Walter Glenn.
February 2003, O’Reilly & Associates.
192 pages, $9.95 US, paperback.
Amazon.com | Amazon.co.jp

Overall a valuable addition to any Outlook user who wants to be more productive and get quick answers to Outlook questions…without the fluff.

Like it or loathe it, Microsoft Outlook is the de facto e-mail and PIM (Personal Information Management) software in many companies. It also comes bundled with Microsoft Office on many home computers. Wherever you use it Microsoft Outlook is a powerful tool, but not, unfortunately, extremely intuitive or without its quirks and frustrations. In fact O’Reilly publishes ‘Microsoft Outlook Annoyances’ which deals directly with these issues. With a more positive outlook (pun intended) O’Reilly also publishes Outlook 2000 in a Nutshell (new version on the way)—a thorough guide to all of Outlook’s components. But for the everyday user looking for a quick guide to using a new part of Outlook, a quick reference on Outlook functionality or trying to solve a how-to question, Outlook Pocket Guide is what is needed.

The book is about A5 size and 1 cm thick. I tested it, and to my surprise it did fit perfectly into my trouser pocket. The book is, as you naturally expect from O’Reilly, well organized and presented. Diagrams and screen shots are used sparingly but effectively. The table of contents could perhaps give one more level of detail but there is a good index and subsections are clearly marked in bold face at the bottom of each page.

The book is split into ten parts. Part I covers how Outlook works—useful background reading but you’ll want to skip to the later parts if you just want to know how to do something.  In the following order, these parts cover general tasks (finding, organizing, configuring, viewing and customizing), mail tasks, calendar tasks, contact tasks, task tasks, notes tasks and journal tasks. The chapter headings themselves show that the book is very task focused and this is the real differentiator of this Pocket Guide over other user guides. There is no more than half a page of introduction for each of the chapters, which are then split up into the main usage area and then further split up into paragraphs which specifically answer the italicized question they are headed with. For example under ‘Changing Contact Views’ you will find ‘View contacts as address cards?’, ‘Browse through an address card view’, ‘Make address cards fit better in the display pane?’ and so on. The answers are no longer than 10 lines and give the clear steps you need to follow or menus options you should choose to solve the problem at hand. If alternatives are available these are also provided, and differences between Outlook 2000 and 2002 are explained.

The final two parts of the book are perhaps the most useful for advanced or power Outlook users. Part IX is a concise reference guide on commands, file locations, view and print styles, internet headers, startup switches and keyboard short cuts. The last of these at least should be of use to everyone. Ctrl+Alt+I to get back to the Inbox is my favorite and there are many more to help speed up Outlook navigation. Part X lists some interesting internet sites, books and tools. Such a well compiled list of quality resources is an invaluable addition.

As with all O’Reilly books Outlook Pocket Guide has its own page at www.oreilly.com where any amendments will be posted. Unlike other O’Reilly books though, there is no online version available at http://safari.oreilly.com—not surprising as the book is intended to be a quick-to-hand reference guide and is not really suited to an online format.

Overall a valuable addition to any Outlook user who wants to be more productive and get quick answers to Outlook questions…without the fluff.

Posted by Andrew Shuttleworth on Nov. 16, 2003 at 5:02 AM
ReviewsBooks • (0) TrackbacksPermalink   Index of articles

Designing with Web Standards

book coverDesigning With Web Standards by Jeffrey Zeldman.
May 14, 2003, New Riders.
456 pages, $35.00 US, paperback.
Amazon.com | Amazon.co.jp

Overall, Zeldman does a great job of giving a general overview of standards, their pros and cons, and how they can be used to your advantage.

Jeffrey Zeldman’s Designing with Web Standards could have used a better title for two reasons.  First, designing with web standards implies that the book is useful only for web designers and their ilk, which is simply not true.  The first part of the book merits a place on the desk of any IT manager who is responsible for a web presence.  Second, I think it is a pretty boring name for a book introducing such an exciting shift in web design practice.  Web standards compliant design results in cost savings, increased scalability, improved maintainability, and inherent improvements in accessibility to alternate devices such as screen readers.

Web standards are basically guidelines for designers to use when writing code, and rules telling browsers and other output devices how to handle code written to those standards.  Actual programming languages all have a required syntax that programmers must follow to get their code to work properly and there are set commands from which programs must be constructed.  Markup and scripting languages for the web, however have been plagued by differing implementations by different browsers, each trying to outdo each other and win the “browser wars”. These differences, even between different versions of the same browser, made it necessary to maintain multiple versions of a web page. This may have been possible during the Internet boom, but is far too expensive in today’s business climate.  Luckily all modern web browsers finally support web standards to a degree that makes them feasible to use.  This eliminates the need for maintaining multiple page versions, and ensures that a page will continue to look the same even as browsers continue to be upgraded (forward compatibility).  Zeldman lays all of this out in much greater detail, and gives an overview of how it should be done. The book is divided into three sections, but as the third part is basically a description of the standards support in current modern browsers, I will limit this review to the first two parts.

The first part of the book discusses what web standards are, how they can benefit an organization, and what options are available to an organization considering a move to standards based design, and gives some real life success stories.  The section doesn’t go into much detail about the nuts and bolts of standards based design, instead focusing on giving an overview and helping the reader to understand the issues in play.  The thing that makes this section truly useful in my opinion is that Zeldman avoids simply evangelizing.  He instead gives an overview of the pros and cons of standards based design and suggests alternatives to full standards compliance in cases where they would better serve the needs of the project.  Zeldman has a gift for explaining things in a way that is easy to understand even for non-designers.  This comprehensive overview could help give an IT manager the knowledge needed to speak with his web design team, and to make decisions that could save the organization a lot of money and time. 

The second part of the book is most useful for those actually involved in web design itself.  Covering the how and why of hybrid layout, CSS (Cascading Style Sheet) layout, accessibility, and DOM (Dynamic Object Model) Scripting, it gives useful practical examples, as well as inspiration for creating techniques not covered in the book. 

The book is not intended to be a text on the ins and outs of any particular technology.  There is not a lot of instruction on any particular technique, but it does contain quite a bit about how to use XHTML (eXtended HyperText Markup Language), CSS, and DOM scripting together to make forward compliant, accessible, interesting, and beautiful web pages.  If I could choose anything to add to the book, it would be a little bit more explanatory depth on the techniques covered, but that is not really the purpose of the book. 

Overall, Zeldman does a great job of giving a general overview of standards, their pros and cons, and how they can be used to your advantage.  The first part would be very useful for a designer trying to get a better understanding of standards or figure out how to sell the idea to his/her manager.  It would also be useful for anyone else who plays some part in the creation of a web page.  The second part of the book serves as a good introduction to many of the techniques used in standards based design.  It is a good starting point for designers trying to figure out where to start in learning about web standards, and a source of new ideas for designers already involved in standards based design.  Those looking for an in depth explanation of the technologies covered, though, should look elsewhere.  Designing with Web Standards, like Zeldman’s website http://www.zeldman.com is a great jumping off point for learning about web standards, but will not stand alone to teach you any particular technology.  I highly recommend the book for those interested in learning more about web design, and recommend it as an interesting read for designers already using web standards.  For a preview of Zeldman’s writing style, see his website.  Most of the material covered in the book has also been covered on the site, but the book serves to put it all in one conveniently organized place.

Posted by UltraBob on Nov. 16, 2003 at 4:33 AM
ReviewsBooks • (1) TrackbacksPermalink   Index of articles

PHP Cookbook Review

book coverPHP Cookbook by Adam Trachtenberg and David Sklar.
November 21, 2002, O’Reilly & Associates.
624 pages, $39.95 US, paperback.
Amazon.com| Amazon.co.jp

Essentially the book can be seen as a collection of sign posts and usable bits of code to get you started when you are looking for a solution to a problem you might spend quite some time looking for elsewhere. Many of the problems selected in the book are ones that you would not find solutions to elsewhere so easily.

Let me start off straight away by saying this is not a book for people who are new to PHP. As with other books in the Cookbook series, such as the Java Cookbook that was previously reviewed by TPC, this book is different in its aim and its structure to most other computer programming books. It is not about teaching you how to program but is a book for people who have understood the mechanics of PHP programming (or who will be using other resources to understand the mechanics of PHP). It is a reference book for use when embarking on your first project using PHP and for use thereafter. Its structure is simple and to the point, consisting, for every task detailed,of a statement of the problem, solution, a discussion of the solution and “see also” references.

What’s Covered

Areas covered in this book are Strings, Numbers, Dates and Times, Arrays, Variables, Functions, Classes and Objects, Web Basics, Forms, Database Access, Web Automation, XML, Regular Expressions, Encryption and Security, Graphics, Internationalisation and Localization, Internet Services, Files, Directories, Client Side PHP and PEAR. Each area has a chapter dedicated to it. In each chapter between 9 and 27 problems are addressed with a solution including working source code downloadable from the book’s web site. They really have crammed a lot into this book. Topics covered are diverse and the tasks covered range from the very simple to very advanced.

Although there is a discussion of solutions for each problem these are kept brief. You are referred to the appropriate section of the PHP manual or other appropriate online sources for more information. Essentially the book can be seen as a collection of sign posts and usable bits of code to get you started when you are looking for a solution to a problem you might spend quite some time looking for elsewhere. Many of the problems selected in the book are ones that you would not find solutions to elsewhere so easily.

Many of the topics covered seem to have been selected on the criteria that the authors feel they have something to offer the reader that will have not been covered in basic texts. On the other hand some of the problems solved in this book are certainly covered in every basic book on PHP programming; most tasks that you will regularly encounter as a PHP programmer have their solutions in this book. Solutions offered are often elegant solutions to a task that comes up again and again. Or they might be rather obscure and non intuitive but simple solutions to tasks that you are likely to want to perform in your scripts.

Good Points

The kind of information contained in this book could be more easily referenced and searched online. Certainly such resources do exist on the Internet but since the contributors to these projects are unpaid volunteers it becomes necessary to sort out the chaff from the wheat when using such resources. Thus many searches for a solution to a problem may involve exhaustive work searching through many different sources of information. This book is authorative and trustable in a way that is often lacking in online tutorial repositories or similar, and is more comprehensive and consistent than any online repository I have come across. Of course it will probably go out of date in a year or so at which time it will be necessary to buy another similar book.

I have found myself referring to this book again and again when programming with PHP. It is a great companion for the programmer looking for solutions and is a good first source to turn to in many cases. You can quickly find solutions to all sorts of things you want to do with your script. It is more useful than the books I bought that taught me the basics of PHP programming for reference purposes, because it dispenses with going into too much detail about how everything works, which is not what you need at a more advanced stage. You can use the PHP manual or other online resources to find out about the syntax of the functions used by the scripts in the book, for example: a lot of info from the PHP manual would be replicated in many beginner books.

Not-so-Good Points

Not everything is covered in this book. Since this book was written mainly, I suspect with an American or other Western audience in mind the coverage of localisation/internationalisation is not exhaustive. There is a quick mention of how to decode/encode from European ISO 8859-1 to UTF-8 characters. I would liked to have seen more detail in this section of the book. This is not just a failure of this book, though. I would very much like to find a good tutorial which would step me through all the different character escaping and character sets used in a typical HTML/PHP/MySQL application and how to get them all working properly together so that they can correctly display complex character sets such as Japanese without any surprises. This still seems to be a specialist topic although many application programmers are now providing some support, for non-European character sets such as Korean, Japanese, Chinese, etc.

One other problem with the format of this book is that in this book problems have only one solution. This is quite different to the world of PHP where there are many different solutions to one problem. Solutions found in this book are intended to be best practise. Most of the time this will probably be true. Programmers will however find that when reusing some of these solutions in real-world situations the solutions of this book will not always be best practise. If the rest of your site uses, for instance, one database abstraction library then it would not make much sense to use another library in just one part of the site. Examples given in the book should on the whole work well together but code you may get from other sources will not always fit so well with code from this book.

Conclusion

You will certainly need another book or maybe two to accompany this very useful book from O’Reilly. Other books I would recommend are Core PHP Programming or perhaps one or two of the excellent WROX press books on PHP Programming such as the excellent Professional PHP4 programming. Also if you are going to be programming with PHP you should download and install the PHP manual on your computer from PHP.net, install a version including user comments as they can often be quite useful and fill holes in the manual.

I would say this book is a good buy if you are beginning to put together web sites using PHP. This book will, hopefully, save you many hours of searching online for equivalent solutions and will probably result in web sites that are better coded and more robust.

Posted by James Pratt on Sep. 30, 2003 at 4:06 AM
ReviewsBooks • (3) TrackbacksPermalink   Index of articles

Search


Advanced Search

Keep up with TPC

TPC News in RSS format RSS Feeds

Akatombo Media Logo
ExpressionEngine logo