APLawrence - Information and Resources for Unix and Linux Systems, Bloggers and the self-employed
RSS Feeds Get APLawrence.com by RSS











(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Home > Blogging > Blog # 610 Eric S. Raymond The Art of UnixProgramming
Printer Friendly Version




Eric S. Raymond The Art of Unix Programming


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

Link: http://slashdot.org/article.pl?sid=03/10/20/1656259

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.


If this page was useful to you, please click to help others find it:  

Your +1's can help friends, contacts, and others on the web find the best stuff when they search.

Comments?




More Articles by Tony Lawrence - Find me on Google+



Click here to add your comments

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

--BigDumbDinosaur



Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments


If you want a picture to show with your comment, go get a Gravatar



Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

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. We appreciate comments and article submissions.

Publishing your articles here

Jump to Comments



Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.


My Troubleshooting E-Book will show you how to solve tough problems on Linux and Unix systems!


book graphic unix and linux troubleshooting guide




 I sell and support
 Kerio Mail server
pavatar.jpg

This post tagged:

       - Linux
       - Unix




Unix/Linux Consultants

Skills Tests

Guest Post Here