Jump to ratings and reviews
Rate this book

The Art of UNIX Programming

Rate this book
The Art of UNIX Programming poses the belief that understanding the unwritten UNIX engineering tradition and mastering its design patterns will help programmers of all stripes to become better programmers. This book attempts to capture the engineering wisdom and design philosophy of the UNIX, Linux, and Open Source software development community as it has evolved over the past three decades, and as it is applied today by the most experienced programmers. Eric Raymond offers the next generation of "hackers" the unique opportunity to learn the connection between UNIX philosophy and practice through careful case studies of the very best UNIX/Linux programs.

560 pages, Paperback

First published January 1, 2003

Loading interface...
Loading interface...

About the author

Eric S. Raymond

23 books128 followers
Eric S. Raymond is an observer-participant anthropologist in the Internet hacker culture. His research has helped explain the decentralized open-source model of software development that has proven so effective in the evolution of the Internet. Mr. Raymond is also a science fiction fan, a musician, an activist for the First and Second Amendments, and a martial artist with a Black Belt in Tae Kwon Do.

--from the author's website

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
558 (45%)
4 stars
414 (33%)
3 stars
191 (15%)
2 stars
48 (3%)
1 star
17 (1%)
Displaying 1 - 30 of 58 reviews
4 reviews2 followers
January 14, 2010
This book is about programming. Still, there is almost not a single snippet of code in this 500 page book. Instead it focuses on the philosophy that has developed within the UNIX community over the years. There is a lot of knowledge to be found here, even if you don't develop for, or even like UNIX systems. It has got comments from early UNIX hackers, even some of the original creators, which enrich the text and gives a broader perspective on things in some cases.

The fact that many sections includes historical perspective alone makes this an interesting read. This field is very young after all, and makes you think of how far (or not) we've come since the 70's. It also contrasts UNIX to other operating systems, and the way programs are built on these, since a huge point is that the environment you work in greatly influences how you think of things. For instance, UNIX programs tend to be small, specialized and made to work collaboratively, while Windows programs tend to grow quite big, have many features and do everything by itself.

The comments and evaluation, in respect of the UNIX philosophy, of wide ranging things, such as IPC, configuration and domain specific languages are very interesting. But if you're not an Emacs user (like me), prepare yourself to hear a lot of evangelism.
Profile Image for Will Semin.
17 reviews5 followers
November 23, 2019
I wanted to love this book, but INSTEAD I just sort of liked it. The book definitely was not a bad read, but it did not fit my needs.
Profile Image for Romain.
739 reviews36 followers
August 15, 2022
Ce livre est l’un des livres mythiques sur UNIX et le mouvement open source écrit par un de ses plus fervents défenseurs Eric S. Raymond. Dans le titre du livre figure le mot art et c’est bien sous cet angle ou plutôt sous celui de la philosophie que Raymond articule son ouvrage. Il propose de tirer la quintessence de ce qui a fait le succès d’UNIX, et de ses successeurs comme Linux, pour en extraire des règles, des principes et des bonnes pratiques qui seraient généralisables. Certains sont désormais très connus comme “Premature optimization is the root of all evil” ou le principe KISS certains le sont un peu moins comme les principes de compacité et d’orthogonalité. Pour les illustrer, il s’appuie sur les implémentions d’UNIX et sur celles d’autres outils open source.

Pour les amateurs – comme moi –, la partie historique est un régal, on apprend plein de choses, les cas d’études sont moins intéressants principalement parce qu’ils ont beaucoup et mal vieilli. Le reproche que l’on pourrait adresser à ce livre et à son auteur, est d’être partisan, mais c’est aussi ce qui en fait le sel. Forcément, Microsoft – le camp d’en face – en prend pour son grade dès que l’occasion se présente.
In 1981, Microsoft made its historic deal with IBM over the new IBM PC. Bill Gates bought QDOS (Quick and Dirty Operating System), a clone of CP/M that its programmer Tim Paterson had thrown together in six weeks, from Paterson’s employer Seattle Computer Products. Gates, concealing the IBM deal from Paterson and SCP, bought the rights for $50,000. He then talked IBM into allowing Microsoft to market MS-DOS separately from the PC hardware. Over the next decade, leveraging code he didn’t write made Bill Gates a multibillionaire, and business tactics even sharper than the original deal gained Microsoft a monopoly lock on desktop computing.

Et il ne se gène pas non plus pour égratigner le gourou du free software Richard M. Stallman avec lequel il ne partage pas la même vision.

Il reste de cette lecture un bon moment au cours duquel j’ai complété mes connaissances sur l’histoire de l’informatique et sur des principes qui restent pour la plupart, et malgré les années, toujours pertinents. En bonus, une tonne de citations qui sont de petits bijoux comme celle-ci.
Beauty is the ultimate defense against complexity.

Également publié sur mon blog.
Profile Image for Jonathan.
248 reviews
July 14, 2010
Victory!!! I have finally completed this book. The book weighs in at just under 500 pages, but it reads much longer than that (at least for me) I don't want to imply that that is negative though, the book is wonderful, and is an absolute must read for any software developer. It just took me 3 months to read, which is significantly longer than I would have thought, or originally wanted.

This book does a very good job of explaining the culture and history of unix, but all of those cultural and historical lessons are written in the context of how they drove or were the result of technical decisions.

Chapter 1 lays out 13 rules of the Unix philosophy, and constantly comes back to them when discussing the design of a particular unix program. If the program breaks one of the rules, Raymond points it out, explaining why it was a poor decision to do so.

The 13 rules themselves would be worth the price of admission. If you can only read one chapter, make it chapter 1.
Profile Image for Erika RS.
715 reviews194 followers
June 19, 2014
Good book. There were a lot of things in here that I've felt for a long time but was not sure how to explain. For example, the discussion of why config files should be human readable made me realize why I was so opposed to an advisor's suggestion that our config file be a giant ugly s-expression on a project I did last year; it also made me realize why I felt that the backend for that project should use sockets to communicate with the GUI (because it encourages modularity, keeps GUI code out of real program logic, allows new interfaces to be easily added, allows GUI to run on a separate machine than the back end; we'd only though of the last). Not all was justification though; I also learned lessons about good ways to format and output errors and how much our testing process sucked.
Profile Image for Dave Paola.
20 reviews4 followers
February 7, 2015
The history section alone is worth it. Nathan Marz's mantra of "first make it possible, then make it beautiful, then make it fast" clearly were taken from this philosophy. A nearly identical mantra is stated in the first pages of this book.

History is doomed to repeat itself.

I first read the chapter on Textuality, and have since gone back and started from the beginning. So far this book is excellent.
Profile Image for Ajitabh Pandey.
708 reviews38 followers
June 30, 2016
This book is more about the learnings/lessons from Unix world. Mostly historical descriptions and why certain choices were made by Unix and how they were revolutionary as compared to other operating systems. Lots of practice case studies are included wherein how and why certain choices were made by certain popular programs were made.

A very quick read for me - more of like a refresher -as I was already well versed with the historical developments.
Profile Image for Justin Cormack.
45 reviews5 followers
August 6, 2008
Curiously Raymond managed not to read Gancarz's classic The Unix Philiosophy while writing this. It doesnt cover quite the same ground, and is much less concise. Its bigger on scripting languages and other more recent developments.

Profile Image for Teodor Moroz.
62 reviews2 followers
September 26, 2019
The book includes an overview of core Unix principles and philosophies, such as:

Rule of modularity - write simple parts connected by clean interfaces
Rule of clarity - clarity is better than cleverness
Rule of composition - design programs to be connected with other programs
Rule of separation - separate policy from mechanism; separate interfaces from engines
Rule of simplicity - design for simplicity; add complexity only where you must
Rule of parsimony - write a big program only when it is clear by demonstration that nothing else will do
Rule of transparency -design for visibility to make an inspection and debugging easier
Rule of robustness - robustness is the child of transparency and simplicity
Rule of representation -fold knowledge into data, so program logic can be stupid and robust
Rule of least surprise - in interface design, always do the least surprising thing
Rule of silence - when a program has nothing surprising to say, it should say nothing.
Rule of repair -repair what you can—but when you must fail, fail noisily and as soon as possible
Rule of economy - programmer time is expensive; conserve it in preference to machine time
Rule of generation - avoid hand- hacking; write programs to write programs when you can
Rule of optimization - prototype before polishing. Get it working before you optimize it.
Rule of diversity - distrust all claims for “one true way"
Rule of extensibility - design for the future, because it will be here sooner than you think

With which I completely agree. Other than that book consist of a lot of history and case studies of tools, which are nowadays mostly obsolete.

Profile Image for Harald Groven.
166 reviews25 followers
July 29, 2021
This book is a CS classic.

Now, as more than a billion computers (ie /servers/smartphones/notebooks) run a Linux operating system, software running Unix derivates is ubiquitous. That was not the case when this classic book was written in 2003.

The original creators of the Unix operating system reflect on the design decisions they made in the 1970s, 80s and 90s as well as the underlying philosophy that guides the suite of software tools running on Unix (now eclipsed by Linux). These deliberate, as well as evolved design choices are the the reason that made this suite of software tools so great that this software later conquered the server and smartphone market.

Half of the pages and software mentioned in this book is now obsolete, as twenty years have passed since the publication. But the remaining content contains distilled wisdom from 30 years of development.
11 reviews1 follower
April 5, 2018
An excellent book, although I think the title is badly chosen because it's a bit of a misnomer and could put people off: the title implied to me that it would be about how to code for UNIX, what it *actually* is is the philosophies and design decisions that have influenced UNIX and why they were made. I think you could read this book without being a programmer and still get something out of it, however I also think that some familiarity of common UNIX tools would help as a number of them are used as case studies. Being written in 2003 it is a little dated but the vast majority of the advice in it stands up and of course the history it covers hasn't changed.
140 reviews
July 7, 2022
It's weird reading these kinds of books. It's like reading stories from a religious text. Using situations which are either timeless or outdated they describe how one might come to a fine course of action. It's not telling me how UNIX is today, but it tells me of the foundation that later decisions were built on.

I'm overall glad I read it. It gave me a history lesson and many different things to think about (and suggested readings).

I guess I don't find too much of this practical advice purely because it echoes through comments on reddit/hacker new/lobsters. I've already heard of the core concepts and approaches before.
248 reviews4 followers
January 2, 2019
Great book albeit quite biased against Microsoft and looks down on all other software/OSes. The last chapter offers some critical reflection on this pride.

I really enjoyed the software-related discussions on design and implementation methodologies. The talk of transparency and discoverability being critical to ease of software maturity and usage.

The book's age however shows in the dead links and outdated sections (e.g. on JavaScript, web browsers etc.).

Great read though and full of wisdom.
Profile Image for Aaron Dutton.
74 reviews2 followers
December 24, 2019
While dated (published in 2003), this book covers a large amount of relevant history that help explain *why* Unix is the way it is.

I lived through about half the history that was covered and experienced about a decade and a half. Despite being a professional programmer for twenty years, I felt like I learned a lot from this book.

While I have heard most of the Unix programming maxims before, this book really filled in the history and reasoning behind the sayings. I think this would be a valuable read for developers who aren’t well versed in Unix history.
72 reviews
February 10, 2020
There are lots of wisdom in the book, The information in the book is relevant today. The discussions about tools, such as sed, cat, awk are interesting since he says they have survived the trial of time, 17 years later and still in use. Vi and Emacs are two editors that survived the trial aswell.

In the end, the aspect of developing tools for non-developers is still a struggle today. For example, Jenkins is a high performance and the GUI leaves lots of things to wish for. Not that it was an example of the book, but still it proves his point.
26 reviews
December 6, 2021
It's a dense book with a brief tour trough the pre historical unix and many aspects regarding the good practices involved in developing software the unix way. I'm sure I didn't absorbed everything that was shown, but I'm sure I got really good insights that would help me to become a better developer. I'll have to read it again somehow in the future, and certainly I'll be able to take more from it.
Profile Image for Claudio Noguera.
81 reviews
June 4, 2018
Wonderful book in my opinion. It really tells you why Unix (and Linux) are the way they are and the efforts that made it become what it is. To me, Linux is a great humanity achievement.

This book is technical without being technical, it really is about philosophy and principles rather than algorithms, syntax or other programming techniques. Could be seen as an encyclopedia.
Profile Image for Noah.
131 reviews6 followers
September 26, 2017
Enjoyable insight into some history of the UNIX world.
Profile Image for Tomas Janousek.
15 reviews11 followers
May 8, 2020
Even though it's dated and ESR isn't very popular these days, the book is really good. Explains a lot of concepts that many of us intuitively understand but have difficulty arguing for.
Profile Image for V.
30 reviews
June 20, 2020
Not exactly what I thought I was getting into, with much more discussion of the culture and history of UNIX than I expected, but nonetheless a pleasant read.
Profile Image for Max.
44 reviews2 followers
October 13, 2022
I expected this to be far more technical than it is. The book is worth reading for its description of UNIX history and culture and some basic design principles. Many portions, however, are very opinionated, yet offer only sparse insight. Where it's not historic, the text is very dated by now (as one can expect considering its origins in the late 90s to early 00s). Even in 2003 many of the projects selected as case studies were just irrelevant.

Fortunately, back then Eric S. Raymond hadn't yet shown to be a person as insufferable as he ist today. There are well-formatted PDFs available legally for free. I'd suggest to look at one of those, rather than support the author financially in any way (rest assured, he doesn't need your money).
Profile Image for Brandur.
283 reviews7 followers
June 30, 2014
Great insights into some of the historical roots of Unix and its successors, as well as some deep dives into the design of many classic Unix programs. My only complaints were that there was a lot of attribution of elegance to interfaces which, in my opinion, are not very elegant (take the make system or fetchmail configuration for example), and that large sections of the book are dedicated to technologies which are a bit outdated these days. Otherwise, this is a very interesting read.
This entire review has been hidden because of spoilers.
Profile Image for Artem Gapchenko.
16 reviews2 followers
May 17, 2021
The combination of threads, remote-procedure-call interfaces, and heavyweight object-oriented design is especially dangerous. Used sparingly and tastefully, any of these techniques can be valuable—but if you are ever invited onto a project that is supposed to feature all three, fleeing in terror might well be an appropriate reaction.

With the exception of rpc interfaces, that sounds an awful lot like modern-day mobile development to me, at least on Android :smile:
15 reviews
September 19, 2011
This is an awesome book and it will make you question your approach to coding. I'm not saying that it changed my mind about OOP or writing integrated applications, but it did influence me. This is a well-written book seemingly written by a "grumpy old man", but I feel that it gave me a lot of perspective I wouldn't have had otherwise.
Profile Image for Gwern.
263 reviews2,420 followers
November 30, 2014
(Read online version.)

Not bad, but more than enough dated at this point (finished in 2004 and most of it is more relevant to before then) that I'm not sure how much is worth reading. The CLI material is as worthwhile as ever, but the GUI parts are totally obsolete. The case studies are also rather too brief.
Displaying 1 - 30 of 58 reviews

Can't find what you're looking for?

Get help and learn more about the design.