The Art of Unix Programming——Unix技术传统的口述历史
买这本书主要冲两点,第一是封面上的Software Development Productivity Award标志,第二是作者Eric Raymond,Raymond是开源运动的发起者之一,他的经典文章“大教堂和市集”广为流传。由于没有急用而且是英文,书买来后看了目录就收到书架上。
最近又有项目要用linux平台,于是把这本书拿出来翻了翻,有一种茅塞顿开的感觉。我一直对Unix系统怀着一种神秘的景仰,感觉Unix有很多不同于windows的风格,这些风格是我不太了解的,Raymond在这本书里把这些风格和习惯提升到文化和艺术的境界并做了系统的阐述,解答了我心中的许多问题。
比如说Unix下有专门的一类过滤程序,它们读入数据、对其进行简单的变换、然后将其结果写到输出,是Unix平台下非常有用的一类工具,它们是怎么来的?Raymond在书中指出了Rule of Composition的设计原则: Design programs to be connected with other programs。
Unix tradition strongly encourages writing programs that read and write simple, textual, stream-oriented, device-independent formats. Under classic Unix, as many programs as possible are written as simple filters, which take a simple text stream on input and process it into another simple text stream on output.
Despite popular mythology, this practice is favored not because Unix programmers hate graphical user interfaces. It's because if you don't write programs that accept and emit simple text streams, it's much more difficult to hook the programs together.
知道了Unix的这个传统,你就会知道这类程序的设计思想,应该就会很容易写出类似工具或者充分利用此类工具。
书中还提到的一些设计原则并非专属于Unix世界,象界面或接口设计的Rule of least surprise,要注意你的用户,不要给他们太多惊讶;程序设计的Rule of Representation,把知识封装到数据中,让程序逻辑尽量简单且强健。这些应该是所有设计中都应该遵循的原则,仔细阅读本书,相信会对提升程序设计理念有所帮助。
本书非常适合从其他平台转入Unix平台的开发人员,遵循Unix世界的传统,应该会节省开发时间,少走一些弯路。书的前言有句格言,大意是:与其说Unix是一个操作系统,不如说Unix是一段口述历史。我觉得这本书更像是一部关于Unix技术传统的口述历史。
最近又有项目要用linux平台,于是把这本书拿出来翻了翻,有一种茅塞顿开的感觉。我一直对Unix系统怀着一种神秘的景仰,感觉Unix有很多不同于windows的风格,这些风格是我不太了解的,Raymond在这本书里把这些风格和习惯提升到文化和艺术的境界并做了系统的阐述,解答了我心中的许多问题。
比如说Unix下有专门的一类过滤程序,它们读入数据、对其进行简单的变换、然后将其结果写到输出,是Unix平台下非常有用的一类工具,它们是怎么来的?Raymond在书中指出了Rule of Composition的设计原则: Design programs to be connected with other programs。
Unix tradition strongly encourages writing programs that read and write simple, textual, stream-oriented, device-independent formats. Under classic Unix, as many programs as possible are written as simple filters, which take a simple text stream on input and process it into another simple text stream on output.
Despite popular mythology, this practice is favored not because Unix programmers hate graphical user interfaces. It's because if you don't write programs that accept and emit simple text streams, it's much more difficult to hook the programs together.
知道了Unix的这个传统,你就会知道这类程序的设计思想,应该就会很容易写出类似工具或者充分利用此类工具。
书中还提到的一些设计原则并非专属于Unix世界,象界面或接口设计的Rule of least surprise,要注意你的用户,不要给他们太多惊讶;程序设计的Rule of Representation,把知识封装到数据中,让程序逻辑尽量简单且强健。这些应该是所有设计中都应该遵循的原则,仔细阅读本书,相信会对提升程序设计理念有所帮助。
本书非常适合从其他平台转入Unix平台的开发人员,遵循Unix世界的传统,应该会节省开发时间,少走一些弯路。书的前言有句格言,大意是:与其说Unix是一个操作系统,不如说Unix是一段口述历史。我觉得这本书更像是一部关于Unix技术传统的口述历史。
有关键情节透露