Eric S. Raymond The Art of Unix Programming
Mon Oct 20 17:56:11 GMT 2003 Eric S. Raymond 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:
- 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 to 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 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: 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.
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
Increase ad revenue 50-250% with Ezoic
Inexpensive and informative Apple related e-books:
Take Control of the Mac Command Line with Terminal, Second Edition
Take Control of iCloud, Fifth Edition
Take Control of Pages
Take Control of Upgrading to Yosemite
Take Control of Numbers