DDJ书评(2003.11):Unix Zen and Now(有 The Art of Unix Programming)

原创 2004年04月08日 09:22:00
Review by Jack J. Woehr
Copyright (C) Dr. Dobb's Journal, November, 2003

The white-robed roshi and juvenile shaved-head monk on the cover suggest that Eric Raymond probably intended to call his book “The Zen of UNIX Programming.” Cooler editorial heads prevailed and we ended up with The Art of UNIX Programming.

Though Raymond covers everything from operating-system origins (including IBM/VM and DEC VMS) and HTTP, C, Lisp, and C++, to Docbook and CVS (and every blessed thing beyond and between), The Art of UNIX Programming is not a tutorial.

Raymond rambles through a bizarre exposition of what he finds to be the “kozmik trooths” of the UNIX programming environment. If you’re actually trying to learn UNIX programming, this is the wrong book. To the extent the book has focus, the focus is something like this:

Eric drove the Reader’s chariot out onto the Field of UNIX. They stood for a while between the two armies of the Ideal and the Necessary. The Reader threw down his keyboard and said, "I shall not fight!" Eric then expounded the True Nature of the Programming Field, the Knower and the Known. The Reader, now wiser, picked up his keyboard afresh and coded on.

In case you think I’m stretching the point, here are a few headings—just a few, mind you—to give you some of the savor of the opus:

  • TCP/IP and the UNIX Wars: 1980–1990
  • Blows Against the Empire: 1991–1995
  • Case Study: C Considered as Thin Glue
  • Security Wrappers and Bernstein Chaining
  • Case Study: Metaclass Hacking in fetchmailconf.
  • The “Separated Engine and Interface” Pattern
  • The Present Chaos and the Possible Way Out

The book is always informative, albeit in a patchwork fashion. Raymond palms off metaphysics as computer science and confounds aesthetics with epistemology as well as any of us FORTH programmers did a couple of decades ago. He also manages to broaden the reader’s perspective, in a critique that sports a literary sheen. It would be a more intellectually uplifting workplace if more gifted programmers were as erudite as Raymond, though it is possible in that case that less actual work would be performed.

The Art of UNIX Programming settles down around Chapter 14 (Languages) or 15 (Tools), and starts giving some practical programming advice. In this book much is true and much is good. The reading of it does serve to stimulate the imagination and the pride of communal ownership of the UNIX Ideal.

In contrast, UNIX Systems Programming: Communication, Concurrency and Threads, by Kay Robbins and Steven Robbins, is not at all a fanciful book. It’s about How. To. Program. UNIX. Emphasis on multiprogramming.

UNIX Systems Programming is as dry as (or drier than) a Sun Microsystems manual, and typeset identical to Sun publications, just in case the point was otherwise missed. It’s the second edition of the 1995 opus Practical UNIX Programming: A Guide to Communication, Concurrency and Multithreading. We’re informed in the Preface that the title was changed “to better convey [sic] what the book was [sic] about.”

UNIX Systems Programming is nerdly arcana for corporate staff programmers. That’s why I was surprised the authors missed an important point about threading. Thread implementations are mined with guarantees that functions will appear in libraries whether they have the desired effect or not. The function pthread_attr_setschedpolicy() has tripped up programmers before: POSIX insists it appear in a compatible library without demanding that it actually perform its specified work. Solaris pthread programmers know to #ifdef for Solaris and use the nonportable platform function thr_setconcurrency().

UNIX Systems Programming is detailed, indexed, cross referenced, generally accurate, useful, enduring, attractive, and hardbound. If you do serious UNIX programming and do not yet have a complete overview of pipes and/or sockets and/or exec calls and/or POSIX threads, this book is a good bet, but a close perusal of your system manuals will still be necessary.

Absolute OpenBSD: UNIX for the Practical Paranoid, by Michael Lucas, is the book all newbies exploring one of the free or open-source community’s most secure and austere operating systems have long demanded. It is the “missing manual” to obtaining, installing, using, and administering OpenBSD. Much of this information can be gleaned from the FAQs at the OpenBSD web site (http://www.openbsd.org/) and all of it has been asked, over and over again, on the mailing lists. Absolute OpenBSD is nicely written, organized in the order newbies need during install, cleanly laid out, and well indexed. New users should buy the book at the same time they buy the OpenBSD distribution CD. Because, if it’s half as good as I’m saying it is, Absolute OpenBSD will save newbies weeks of anguished whining on the mailing lists.

The Art of UNIX Programming
Eric S. Raymond
Addison-Wesley, 2003
512 pp., $39.99
ISBN 0-13-142901-9

UNIX Systems Programming: Communication, Concurrency And Threads, Second Edition
Kay A. Robbins and Steven Robbins
Prentice Hall, 2003
912 pp., $69.99
ISBN 0-13-042411-0

Absolute OpenBSD: UNIX for the Practical Paranoid
Michael W. Lucas
No Starch Press, 2003
600 pp., $39.95
ISBN 1-886411-99-9


the art of unix programming--笔记(chap12)

chap 12 optimizationpremature optimization is the root of all evel--C.A.R.Hoare这一章我是认为正本书第二好的一章,最好的当...
  • ccanan
  • ccanan
  • 2007年07月30日 11:47
  • 989

Reading The Art Of UNIX Programming Now

########################################################################      I love Linux!      I l...
  • starshus
  • starshus
  • 2004年11月20日 22:22
  • 1152

Unix Systems Programming

开放课程学习列表 CS360 -- Systems Programming James S. Plank, University of Tennessee http://web.eecs.utk.e...
  • DaI253
  • DaI253
  • 2015年12月08日 14:55
  • 136

关于APUE(Advanced Programming in the Unix Environment)第三版 代码在ubuntu中的编译运行

1. 下载代码:http://www.apuebook.com/code3e.html 2. 安装依赖库:sudo apt-get install libbsd-dev 3. 进入下载目录m...
  • hellochenlu
  • hellochenlu
  • 2016年01月09日 18:38
  • 769

Unix network programming

1.部署环境。这个就不用写了   参考  http://blog.csdn.net/hantangsongming/article/details/20453349 已经写的很好了。   ...
  • huohunri2013
  • huohunri2013
  • 2015年01月18日 17:32
  • 784


前三章:主要讲解了,unix的历史,以及与其他操作系统的不同之处 第四章:模块性-->保持清晰,保持简洁。 1:模块化的首要特质就是封装,不要过多的披露自身的细节,不胡乱共享全局数据,不直接调用其...
  • helloarm123456
  • helloarm123456
  • 2014年07月01日 11:00
  • 385

Unix Network Programming(1)---基本概念说法

一个简单的时间获取函数#include 'unp' //包含自己编写的头文件,该头文件包含大多数网络程序都需要的许多系统头文件, 并定义了所用到的各种常值 i...
  • liyuan_35023
  • liyuan_35023
  • 2015年10月16日 21:06
  • 430

Advanced Programming in UNIX Environment Episode 3

APUE Episode 3
  • myfather103
  • myfather103
  • 2017年09月10日 20:06
  • 101

Understanding Unix/Linux Programming-文件、设备和流

每个设备文件都支持系统调用 ioctl: 目标:控制一个设备 头文件:#include 函数原型:int result = ioctl(int fd , int operation [,ar...
  • donghaoascend
  • donghaoascend
  • 2016年08月26日 18:13
  • 575

Reading 'The Art of UNIX Programming'.

‘The Art of UNIX Programming原版,人民邮电出版社 2006年8月第1版,本篇页码对照此版书籍以下为阅读笔记,转载请注明出处颜色说明:黑色 -- Summary of the...
  • crob
  • crob
  • 2009年01月27日 10:22
  • 983
您举报文章:DDJ书评(2003.11):Unix Zen and Now(有 The Art of Unix Programming)