Advanced Programming in the UNIX Env, 2nd Ed.
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.
- 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
Gee a bit old on the old linux front, no? Are a lot of people still using the 2.4 series?I heard it was a hang gliding accident.
What I always liked about Stevens, is that he delivered print-ready copy to his publisher. This guy did everything himself. Layout, typesetting, graphics, indexing, the whole works. Where can you find people like that nowadays who take so much pride in their product that they hand-hold it from draft to customer?
8 of 13 people found this answer helpful. Did you?
I don't mean to sound like a troll, but I already have a few similar books in my dusty collection... so what's new in this one that can't be found in the other books and/or web sites out there? anything exciting enough for me to put on pants and drive down to my Books-a-Million?
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.
big friggin deal you pedantic butthead, we know what he means.
Assassination by Microsoft, I assure you.
apparently, this book, (should i ever come across it)(I have TERRIBLE trouble finding books; when I'm actually looking for them, I can't find them; the MINUTE i stop looking, I find in some weird section of the bookstore) would be a good thing to read if I was planning to get in programming on linux. But, I rather like python and am fairly proficient at it. But I might pick this up, just to see if it has any relevant information.
Show this to your friends and family that don't know what a real hacker is
An indispensable and fundamental basis?
I fear that this new edition might not be as good as the original just because its not Stevens. Stevens is one of my Heroes of the Comp Sci world, and I pray that his soul is doing well in heaven. I'll just wait until my other friends tell me that the coast is clear
"C++ is to C as Lung Cancer is to Lung"
n/t
I remember reading that all the Stevens books were typeset with troff. I wonder if this new edition has been typset the same way?
-AP
He drowned.
Of course, it's a 900+ page book and it's only been out for a week or two, but the author of the review didn't do anything other than recap the preface and foreward of the book. In many cases, he quoted sections directly from othe book without attribution.
Nice "review"
Back in the day I did a lot of programming against specific operation system API such as Windows and UNIX and had the classic books for each environment. Now that programming environments such as Java and C# exist most of those book just gathering dust. How the UNIX API changed that much since 1993? I have huge book on Win32, MFC and UNIX programming that today are just take up space.
programming in the *nix environment, new as in nill, the review neglects to mention how well people with a basic understanding of C with an interest in programming the platform will interpret or even benefit from this book.
Bieng one of these people, would I benefit more from Stevens book than this title?
Or would this one make a better selection?
Should both of them grace my bookshelf?
I am Bennett Haselton! I am Bennett Haselton!
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
The first thing I like to check in a new book is the table of contents, yet the book homepage doesn't seem to have it.
I hate it when they do that, I'll have to look for it in the publisher 's website.
I've got "Internetworking with TCP/IP Vol. 3 (Sockets)" that I picked up in a used bookstore for a dollar. It was written in '93 and deals with 4.3BSD - all the code examples are in K&R-style C and the API's are old, but the algorithms are there and the advice on design is very relevant.
It's a really good book. My first network-aware programs were written using this book. There's examples for several different protocols and a deep discussion of Sun RPC. Concurrency takes a couple of chapters and ideas on server design appear throughout the book. It doesn't cover STREAMS (there was an alternate book for that) or deal with threading, but it's more than enough for most new network programmers.
I'd highly reccommend Stevens if his other books are as useful as this one.
Those who can't do, teach. Those who can't teach either, do tech support.
Stevens' books are always great, and this one is no exception. I use this book regularly and I highly recommend it. But that aside, there is another shorter and somewhat overlapping book: Advanced Unix Programming: 2nd Edition by Marc J. Rockhind, that I highly recommend anyone who might like the reviewed Stevens book should check out as well. Link was the only bn.com reference to it that I saw, but my copy is softcover, whereas the link appears to be hardcover.
11*43+456^2
You can also buy it at Amazon: Advanced Programming in the UNIX Env, 2nd Ed.
...as Netcraft confirms.
Are they really going to put a Dilbert cartoon on the cover? It's a funny one but the original book has kind of a classic, authoritative look to it. Putting a comic strip on the cover makes it look more like one of those jokey 'Unix in 3 hours!' books.
At least he was to me, the one time I met him at a Usenix conference, where he autographed one of his books for me.
His books were tops in the field. Glad to hear the revised edition is still good.
A friend recommended to me the book the Advanced Unix book, and I actually saw this book last week while browsing but was hesitant to purchase it. First because the Dilbert comic strip on the front made me wary that the content was superficial. And second because the extreme length suggested that the book was probably "dumped" from PDFs, man pages, and source listings rather than "written" with insight and an analytical mindset.
The book is a significant size so it will not fit comfortably into my lunch and bedtime reading routine, but if the binding on book of this size looks like it will physically hold up for me to read the parts that interest me then I'll likely shell out the money for it.
Thanks for the recommendation.
As a graduate student, I really needed the original APUE book at one time but was put off by the $80 asking price (or something like that). Meanwhile, all of my Indian classmates brought their "Indian" editions with them which they acquired for insanely cheap prices. The difference is that these were often paperback and definitely were denoted as a special edition for India, but the content was the same. Very discouraging for me at the time because I had no way to acquire a discounted edition.
Advanced Unix Programming came out with a 2nd edition in 2004, and I was lucky enough to spot it in a Half Price Books here in Indy. This is very similar, in terms of upgraded content.
In particular, the test systems are the same between books. (FreeBSD, Linux, Solaris, Darwin.) Both books have grown considerably to take on the growth of Unix and the various flavors.
Of course, AUP came out in 1985, so it had a little more turf to cover.
For those not familiar with AUP, it is a slightly different beast from APUE. It only covers Unix system calls in C categorically, whereas APUE covers a wider range of tasks and subjects within Unix.
*is run over by rotten tomatoes*
According to the book's official site, the modem chapter was pulled from the print edition, but it was still revised, and is available as a PDF or Postscript file.
(The site is chock full of frames, but here's the inner content page talking about it and linking to the chapter's files.)
About three weeks into it, though, I realized I was struggling. My lectures were flat and the class really wasn't getting much out of it. I asked Paul Banks, a student who'd taken several courses with me, what I was doing wrong. "You're reading your slides, Kevin. You're not interacting with the subject matter like you usually do."
I realized that, basically, I was intimidated as Hell by Stevens' mastery of the subject. I changed my approach. The next lecture, when there was something I couldn't entirely wrap my brain around, I tried something different. I stepped away from the lectern, sat down in the chair at the front of the class and admitted my ignorance. "I don't have direct experience on this. This is how I think this thing works. Is that how you guys read it?" Sure enough, someone in the class indicated that they'd touched on the issue in their code, but had been confused. The class came alive as my lecture became a discussion, which is my preferred mode of teaching.
Looking back, I guess I owe that success to Stevens as much as the problem (and, yes, the problem was really between my ears, thank you very much...). His books have always been about experimentation as a means of understanding, not dictating down lessons down to the reader. If only I'd taken that tack when I started the class I could have saved myself much trouble. I'm just glad I corrected my approach and that everyone got a lot out of that class.
Paul passed away a few years ago and I was glad that I had made a point of thanking him profusely for his advice. My only regret about the class is that I never did the same to Stevens for APUE.
"Prepare for the worst - hope for the best."
Steven's APUE and Unix Network Programming are the books that turned me from a novice into someone who felt confident enough to pursue programming for a career. The first edition of APUE is so extremely well written - clear, concise and lucid. I'm definitely going to flick through the new edition, but the great thing is that the first one is still reelveant, in fact it's one of the five books I take with me to any new job.
My point exactly, besides the Princess Bride reference.
One man's Troll is another man's Funny, as we demonstrate.
Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
Correction.
It is not "this book would serve".
This book (along with UNP I and II on the other side) is the cornerstones in my bookshelf.
It's an insult to the memory of Richard Stevens to mention Eric Raymond in any context associated with him. Eric Raymond on the best day of his life could not honestly pretend to deserve to sit at a table with Richard Stevens.
hmm. seems to missing the ring?
Having had both editions of Unix network programming (gives me one to lend out...)
Glad it has been updated, it seems superficially dated which might put people off, although there is actually lots of stuff thats still completely valid.
... to kaleidojewel's Amazon referral account. Why give this spammer a reward? Especially when it's $3 more.
vi
I can see Solaris and Linux, but FreeBSD and OSX? What about AIX and HP-UX? There are surely many more developers working on AIX and HP-UX than FreeBSD and OSX combined unless you just count PHP web-heads.
It was autoerotic-asphyxiation. Very sad and tragic.
This book (along with UNP I and II on the other side) is the cornerstones in my bookshelf.
Do we need to singularize conerstones, or add 'among' after 'is'?
Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
I just bought the first ed last quarter for my Unix programming class, now I am going to have to go out and buy another ed just so I don't have something quite so freaking historic on my bookshelf.
Need help treating your acne? Come here!
Which woman would bother to ask a man for help? Be honest! ;-) So why should unix users enter `man' for help? There is nothing advanced about unix or c.
The moderation system officially makes no sense.
--
WHO ATE MY BREAKFAST PANTS?
Stupid mods don't understand funny posts.
The people who are buying the book for its contents, not its cover, will buy it anway; and the people who would normally buy "Learn UNIX in 21 seconds" will buy it, and perhaps actually end up learning something worthwhile for a change! :)