LJ Archive

Professional Linux Programming

Stephanie Black

Issue #85, May 2001

This book is a huge credit to both its authors and publishers.

  • Authors: Neil Matthew and Richard Stones

  • URL: http://www.wrox.com/

  • Price: $59.99 US

  • ISBN: 1-861003-01-3

  • Reviewer: Stephanie Black

With the increasing number of Linux programming books on the market, the new Linux coder is left in a bit of a muddle.

Information about Linux is spreading—a good thing in terms of the open-source model and the community that supports it. The influx of new Linux authors also tends to decrease the odds of finding literacy and technical expertise in the same place. Numerous would-be writers ride the popularity wave of “Penguin Power!”, resulting in increasing numbers of Linux “bibles”, most of which are just as difficult to follow as the original and not nearly as imaginative. In either case, the context is most often distorted, if presented at all. Then again, there are exceptions.

Professional Linux Programming is a huge credit to both its authors and publishers. It's clearly written, highly informative and, with the exception of one or two topics, exhaustive in scope. Its intended audience is intermediate programmers, but the book is written in sufficiently clear and plain language as to be quite easily understood by the novice programmer.

The book's main “theme” is a project designed for a DVD rental store, taking into account both general and user requirements for a design specification. These specifications are followed up in subsequent chapters, which discuss various elements. The vast majority of the chapters in the book go back to this project and approach the subject matter from that context. Occasionally, the authors sprinkle in “take a break” chapters. These are related to a variety of programming issues in general. The project, however, is the meat of the book.

This approach provides not only a context, but a flow of information from one topic to the next. As a result, the reader learns a vast quantity of subjects easily because they're all connected to each other—an approach more conducive to increasing a coder's knowledge and skill than the “bits and pieces” approach so prevalent among technical works.

Highlights

The majority of programming books, even Linux programming books, are negligent about providing sane information regarding application design according to general (and user) specifications. Given that the first step of writing an application is to define its use and user-base, design is too often overlooked or, if mentioned, relegated to the back of the book. This is the first topic of discussion in Professional Linux Programming and gives the reader a taste of rationally approaching software development.

Having read several Linux programming books, all of which ignore (by intent or accident) the increasing popularity of CVS (concurrent version system), I was overjoyed to find an entire chapter detailing this marvelous tool, both in collaborative and individual contexts. Common CVS terminology (check-out, commit, repository, etc.) is delineated, as are commands and the growing number of CVS resources available on the Internet.

Databases are, for many programmers, the singularly least interesting subject and the one that is most easily overlooked. Matthew and Stones not only give a foundation in database requirements and functions, but offer an in-depth comparison of PostgreSQL and MySQL. An interesting addition was a brief contrast between libpq and ecpg as ways of calling PostgreSQL from C. Later in the book, as application construction confronts the area of connectivity, PHP is detailed as well.

In separate chapters, both debugging and testing are carefully illustrated, with particular attention paid to the varieties of software errors and the tools to intercept them prior to release. Testing tools, including different kinds of tests for different kinds of requirements, are examined in great length with particular attention paid to getting the most information from tests to ensure quality of the application.

Chapter 12 deals with secure programming (including a reference to Ken Thompson's “trojan” that appeared in every release of the UNIX compiler). This chapter does not, however, simply leave the reader with a simple alert; it details how permissions work, some useful cryptography tools and some environment variables, all of which can assist in the production of secure code. It ends with a discussion of security features/impediments that come with some of the more common programming languages.

I personally have to give an extra round of applause to anyone who can take the complexities of Beowulf clusters and turn them into very comprehensible English (I am currently scrounging a bunch of 386s with which to construct my own Beowulf cluster—or should that be Bayou-Wolf?).

Where the Book Succeeds

The success of the book lies in several factors, not the least of which is readability. This is a book that can be read cover-to-cover: for a tome of 1150+ pages, such quality is remarkable. The information is presented clearly and leaves the reader with a sense of having gone on a rather enlightening journey (without the flight delays).

Another factor in its success is the timeliness of its topics: this is information from which all programmers can benefit given current trends in software development. It takes into account the increasing need for networkable applications that don't require extensive training time for staff to become comfortable with them. The book also presents a vast array of less commonly discussed tasks such as LDAP (Lightweight Directory Access Protocol), building device drivers and distributing the application. Such topics may, in time, prove to be the direction of information technology. For now, they are useful as foundations on which to build increased repertoires of environments for which applications are needed.

There are two primary authors, but another eleven contribute information based on their individual areas of specialization: Browne, Clements (Python), Froggatt, Goodger (Python), Griffin, Licquia, van Loon (multimedia), Ranawake (Beowulf), Rawat (networks), Sundbakken (QT), Thomas (PHP), Turnbull (internationalization) and Woodhouse (device drivers). The synergy behind such a collective effort is apparent, as each contributor's work, experience and expertise have created a comprehensiveness to Professional Linux Programming not often found in “tech-lit”. If only more authors follow these gentlemen's fine example of collaboration.

The publishers, Wrox Press, even provide a support site for programmers: http://p2p.wrox.com/. This includes source code used in the book, as well as a forum for discussing programming issues.

Where the Book Falls Short

If you're a Debian developer, or want to be, this book will help in numerous respects, but there is no discussion of the .deb package format, or its relevant tools. Given the increasing numbers of developers who want to develop applications for Debian (or Corel, or Storm, or Libranet, or...), the topic would have merited at least a passing mention. The Connectiva Discovery (a version of APT that is RPM-aware) aside, the ubiquity of RPMs negatively impacts their wonderfulness.

Additionally, there are no autographs in the book. One can only assume this is rectifiable solely through writing to the authors and asking them sweetly for their missing signatures (you may need to send return postage).

Ladies and gentlemen, we have a winner!

Stephanie Black is a writer—of words and code. When not writing, she runs a Linux consultancy, Coastal Den Computing, in Vancouver, BC, Canada. In her off-hours, she's usually playing fetch with her cats or collaborating/colluding with her partner, a fabric artist and business manager.

LJ Archive