Slashdot Mirror


Advanced Programming in the UNIX Env, 2nd Ed.

Eater writes "W. Richard Stevens wrote Advanced Programming in the UNIX Environment, which was published in 1993 by Addison-Wesley. It quickly became the cornerstone of many bookshelves. The original edition has been revised by Stephen A. Rago to more accurately reflect the current landscape of UNIX and UNIX-like systems. APUE is targeted at the experienced C programmer with a working knowledge of UNIX. It includes chapter long examples of real-world applications, and--as with other works by W. Richard Stevens -- somehow manages to serve simultaneously as an enlightening tutorial and a valuable reference book." Read on for the rest of Eater's review of the book's recent second edition. Advanced Programming in the UNIX Environment, 2nd Ed. author W. Richard Stevens, Stephen A. Rago pages 927 publisher Addison-Wesley rating 9 reviewer Eater ISBN 0201433079 summary Essential classic for experienced C progammers working in UNIX environments

Few technical authors have had such a great impact on the geek community as Rich Stevens, and because of this, any review of his books should include a few words about the man himself.

Stevens' work typically tops any "recommended reading" list when it comes to TCP/IP networking or UNIX programming. Stevens passed away on September 1st, 1999. In addition to APUE, he authored UNIX Network Programming (Volume 1: APIs and Volume 2: IPC) and TCP/IP Illustrated (Volume 1: Protocols, Volume 2: Implementation, and Volume 3: TCP/T, HTTP, NNTP, Unix Domain Protocols.) Stevens was posthumously awarded the USENIX Lifetime Achievement Award for his extraordinarily lucid teaching and generous spirit within the community, which was accepted on his behalf by his surviving wife and children. (Slashdot coverage of his unfortunate death is available.)

Stephen A. Rago, who has taken on the daunting task of revising Stevens' APUE, worked at Bell Laboratories as a UNIX SVR4 developer. His first contact with Rich Stevens was an e-mail regarding a typographical error in Stevens' first book, UNIX Network Programming. Stevens later acted as a technical reviewer for Rago's UNIX System V Network Programming. Rago reciprocated as a technical reviewer for the first edition of APUE, and has done a fine job of revising that same text for the new second edition.

After more than a decade of changes in UNIX and UNIX-like operating systems, the original edition of APUE holds up well. Rago's revision reflects the following:

  • System V variants are being replaced by Linux, Solaris being the last of these with any reasonable market share.
  • 4.4BSD was the last UNIX release officially maintained by Berkeley's CSRG, with subsequent derivatives being maintained by volunteers.
  • The popularity of Linux and inexpensive x86 hardware has introduced a notable shift in development.
  • Apple Computer has abandoned its previous operating system for one based on Mach and FreeBSD.
  • The original book was based on the 1990 version of the POSIX.1 standard. The new edition has incorporated changes from the 2001 version.
  • Chapters on threads and thread control have been added.
  • Some material has been omitted to reflect changes in common hardware. For example, the "Modem Dialer" example from the first edition has been removed, and "Communicating with a PostScript Printer" (which focused on serial and parallel communication) has been replaced with "Communicating with a Network Printer".

The following platforms were used in Rago's edition:

  • FreeBSD 5.2.1 on Intel Pentium
  • Linux 2.4.22 (Mandrake 9.2) on Intel Pentium
  • Solaris 9 on 64-bit UltraSPARC IIi
  • Darwin 7.4.0 (Mac OS X, version 10.3) on PowerPC

A comparison of the tables of contents between the first and second editions indicates only minor organizational changes. When delving into the text, it's apparent that Rago has done a painstaking job of reworking the text to reflect the changes over the past 13 years.

Notably, Rago has included a few new helpful tables in the chapter on UNIX standardization. These tables compare the differences among the four platforms he used in writing this edition, making this text rather valuable for those trying to support multiple offerings.

An entirely new part of this edition is two chapters dealing with POSIX threads. Rago presents this material first with an introductory chapter on threads, POSIX.1 primitives available for creating and destroying threads, and a discussion of the fundamental issues when dealing with synchronization between threads. The follow-up chapter is on thread control, dealing with the specifics of synchronization, reentrancy, and thread interaction with process-oriented system calls.

Stevens believed that the best way to learn code was to read code, and his books reflect that philosophy well. The original edition contained a chapter titled "Communicating with a PostScript Printer" that included a complete program to communicate over a RS-232 serial connection to an attached printer. Most PostScript printers today are accessed via a network interface, and Rago has managed to rewrite the material reflecting this while still maintaining the original intent of the chapter. The first edition's chapter on modem communication has been omitted from the new edition, but is still available via the book's website.

This book is no superficial rewrite of the first edition. From cover to cover, it's apparent that Rago has carefully interpreted the original text and rewritten it to accurately reflect the changes of the past 13 years; he has also managed to preserve to original lucid and efficient presentation style of Stevens' classic.

The book's official website is available here, including all source-code examples and errata.

You can purchase Advanced Programming in the UNIX Environment, 2nd Ed. from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

7 of 128 comments (clear)

  1. Ah, yes... Cornerstone Books by xactuary · · Score: 4, Funny

    It quickly became the cornerstone of many bookshelves.

    Um, those books never get read - used as they are in making space for shelving to hold the other books!

    --
    Say hello to my little sig.
  2. Re:Cornerstone by Chris+Burke · · Score: 5, Funny

    Sure it does. At over 900 pages, the hardcover version of this book would serve quite well as a cornerstone for a bookshelf. It works almost as well as cinder blocks or milk crates!

    --

    The enemies of Democracy are
  3. Re:What I always liked about Stevens by Timesprout · · Score: 4, Funny

    Big deal, I have several trees growing in my garden from seed, which I intend to gnaw down with my own teeth before turning the wood into pulp for paper on which I will hand write every copy of my forthcoming autobiography 'Sprout from the veggie patch'. This sure to be a classic will of course be hand delivered by me and I will be available 24/7 to read it aloud for the visually impaired, or anyone purchasing the audio version.

    --
    Do not try to read the dupe, thats impossible. Instead, only try to realize the truth
    What truth?
    There is no dupe
  4. Re:What I always liked about Stevens by tomhudson · · Score: 4, Funny
    I have several trees growing in my garden from seed, which I intend to gnaw down with my own teeth
    Sorry, but I represent the Beavers of North America, and you are being served with a Cease and Desist for copying our prior art and patents.

    The Department of Homeland Security has also been informed that you are in possession of terrorist devices, namely augmented dentition, which you could only have obtained if you were gene-spliced.

    As someone who has defied and defiled creation through this gene-splicing, your name and location has also been handed over to the new ultra-secret, government-funded Fundamentalists for Human Purity, who will quickly show you the error of your ways during your upcoming "vacation".

    Also, after running your words through Echelon, we have determined that "trees ... gnaw down" is code for "Bush ... knock off", or a threat to assassinate the president. Your room at Gitmo is being prepared even as you read this.

  5. Re:What I always liked about Stevens by Timesprout · · Score: 3, Funny

    Damn, and all this time I though the Beavers of North America was the porno actress union.

    --
    Do not try to read the dupe, thats impossible. Instead, only try to realize the truth
    What truth?
    There is no dupe
  6. Re:What I always liked about Stevens by Anonymous Coward · · Score: 2, Funny

    "Big deal, I have several trees growing in my garden from seed, which I intend to gnaw down with my own teeth"

    Wow, you must be one real eager beaver.

    Thank you. I will be here all week.

  7. Advanced Unix Programming in one word by ReadParse · · Score: 2, Funny

    vi