APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

Eric S. Raymond The Art of Unix Programming

© October 2003 Tony Lawrence

Mon Oct 20 17:56:11 GMT 2003 Eric S. Raymond The Art of Unix Programming

Link: The Art of Unix Programming

This isn't a review. I don't know if I'm even going to review this; it looks to me to be similar to Linux and Unix Philosophy, perhaps better or worse but pretty much nothing new.

However, I did notice his listing of design principles:

  1. Rule of Modularity: Write simple parts connected by clean interfaces.
  2. Rule of Clarity: Clarity is better than cleverness.
  3. Rule of Composition: Design programs to be connected to other programs.
  4. Rule of Separation: Separate policy from mechanism; separate interfaces from engines.
  5. Rule of Simplicity: Design for simplicity; add complexity only where you must.
  6. Rule of Parsimony: Write a big program only when it is clear by demonstration that nothing else will do.
  7. Rule of Transparency: Design for visibility to make inspection and debugging easier.
  8. Rule of Robustness: Robustness is the child of transparency and simplicity.
  9. Rule of Representation: Fold knowledge into data so program logic can be stupid and robust.
  10. Rule of Least Surprise: In interface design, always do the least surprising thing.
  11. Rule of Silence: When a program has nothing surprising to say, it should say nothing.
  12. Rule of Repair: When you must fail, fail noisily and as soon as possible.
  13. Rule of Economy: Programmer time is expensive; conserve it in preference to machine time.
  14. Rule of Generation: Avoid hand-hacking; write programs to write programs when you can.
  15. Rule of Optimization: Prototype before polishing. Get it working before you optimize it.
  16. Rule of Diversity: Distrust all claims for one true way.
  17. Rule of Extensibility: Design for the future, because it will be here sooner than you think.

I certainly don't disagree that these are excellent principles; I would however insist that damn few Unix programs follow them well, particularly with regard to numbers 2, 7, 8, 12, 16 and 17. Probably the most violated of these is the rule of Clarity: very little source I have looked at meets that criteria; instead cleverness is all through it. Programmers can't resist showing off, and that leads to violations of Clarity and Transparency. Robustness? Hardly. Certainly I'm not singling out Unix programmers here, but very few programs really do much in the area of forgiving error, or dealing with unexpected events intelligently. The Rule of Repair is ignored almost always, and Unix is full of One True Way zealots. Finally, Unix programmers haven't done any better at designing for the future than anyone else has.

So, it all sounds good from the pulpit, but come Monday morning all the sinners are back to business as usual.

Got something to add? Send me email.

(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> Eric S. Raymond The Art of UnixProgramming

1 comment

Inexpensive and informative Apple related e-books:

Take Control of iCloud

Photos: A Take Control Crash Course

Take Control of the Mac Command Line with Terminal, Second Edition

Photos for Mac: A Take Control Crash Course

Take Control of OS X Server

More Articles by © Tony Lawrence

Rule 17 will never happen. Many of today's crop of programmers seem to have the attention span of a canary.



Printer Friendly Version

Have you tried Searching this site?

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us

Printer Friendly Version

Basic happened to be on a GE timesharing system that was done by Dartmouth, and when GE decided to franchise that, it started spreading Basic around just because it was there, not because it had any intrinsic merits whatsoever. (Alan Kay)

Linux posts

Troubleshooting posts

This post tagged:



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode