![]() |
|
Even in this state of rapid growth and change, there are precious few clear winners among the books for Linux developers. One delightfully notable exception to this pattern of chronic underperformance is Linux Programming Unleashed, Second Edition, by Kurt Wall. The book's 34 chapters and nearly 900 pages contain a well balanced, thorough, and artfully presented treatment of more Linux programming topics than most readers would dare wish for. Individual chapters cover Linux's background; setting up a development system; using gcc (the GNU C compiler), the make utility and autoconf; using RCS and CVS; debugging; error handling; file and directory operations; processes; threads; accessing system information; IPC; daemons; socket programming; ncurses programming (two chapters); X, the Gtk+ and Qt widget toolkits; Bash scripting; device drivers; product packaging; and documentation.
The characteristic of Linux Programming Unleashed that stood out most clearly is the author's emphasis on real-world issues. A good example is Chapter 5, "Creating Portable, Self-Configuring Software", which delves into the intricacies of autoconf, the preferred method for adapting Linux source to different platforms and a familiar fixture to just about anyone who has downloaded and installed Linux software from source code. The authors present an overview of autoconf and detail the program's built-in macros in eight categories, then present a lengthy and heavily annotated sample configure.in script. This chapter is representative of the author's apparent awareness throughout the book of the need to bridge the gap between the "here are the pieces of the API, go figure out how things work on your own" approach we've seen all too many times and the needs of busy programmers. Other strong sections in this respect are the treatment of working with libraries (Chapter 10), threads (Chapter 14), and RPM, the RedHat Package Manager (Chapter 32).
You might expect that any book that tries to cover every aspect of programming for any modern operating system would have to cut corners here and there, and Linux Programming Unleashed is no exception. GUI programming is truly a world unto itself, which always makes it an add-on to a book otherwise concerned with kernel- and C run-time-library-level APIs. In this case, the authors spend five chapters -- a total of about 135 pages -- on X, the Athena, Motif, and LessTif widget kits, GTK+, Qt, and 3D graphics programming with the OpenGL and Mesa libraries. This part of the book is definitely well done, despite its brevity, and provides the reader with a good introduction to these various toolkits and their key concepts. But don't expect these chapters to be a replacement for any of the available book-length treatments of GUI programming; the authors show repeatedly in Linux Programming Unleashed that they can dance well enough, but asking them to waltz in a phone booth is a bit much.
By comparison to the GUI material, the chapters on network and bash programming don't suffer nearly as much from lack of elbow room, and they're much more likely to provide everything you'll need in terms of tutorials and reference material in these areas, until you need help with advanced topics.
One quirk, albeit a pleasant one, is Linux Programming Unleashed's conspicuously high level of hardware awareness. While most programming books barely recognize the need for, or even the existence of, hardware, this one doesn't draw such a hard line in the silicon. Linux Programming Unleashed provides far more than the expected level of advice on hardware selection in Chapter 2, "Setting up a Development System." The authors talk about things like BIOS levels, video cards, and types of motherboards. While most readers will gloss over the chapter and try to hammer the operating system into whatever their current hardware happens to be, it's good to see this material available as a reference resource if and when things go haywire. Another surprise in this vein was Chapter 31, "Device Drivers," which uses the example of a three-axis stepper motor project. The authors include a real, honest-to-Niklaus Wirth circuit diagram, and explore the project in considerable detail. They also include the expected warning that misapplying the circuit "can damage the computer, circuit, or motor and can even cause a fire," which makes the typical programmer complaints about software crashes seem downright petty by comparison.
Linux Programming Unleashed is a first-rate treatment of a vast topic that combines a very readable style with excellent use of sample programs. Like another recent book in this area (Wrox's Professional Linux Programming), Linux Programming Unleashed should be considered a must-have book for anyone programming for the Linux platform.
-- Lou Grinzo