PDA

View Full Version : Basics of the Unix Philosophy



matthew
December 8th, 2005, 03:38 AM
From this blog page: http://software-quality.blogspot.com/2005/12/basics-of-unix-philosophy.html

Monday, December 05, 2005

Basics of the Unix Philosophy

From Eric Raymond's "The Art of Unix Programming (http://www.faqs.org/docs/artu/index.html)" i picked here the 17 rules described as the Basics of the Unix Philosophy. For me these are also rules for writing high quality software:

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 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.

Or even rules for living a high quality life !

posted [*on the original blog--matthew] by Ronny De Winter

atoponce
December 8th, 2005, 03:43 AM
Rule of Generation: Avoid hand-hacking; write programs to write programs when you can. Yes. This seems to be a more difficult task than applied. In other words: easier said than done. I am currently writing a Python/CGI web application that utilizes code generation, and I am banging my head on my desk trying to get it to work properly. You have to plan way ahead of your coding when taking advantage of code generation.

23meg
December 8th, 2005, 03:47 AM
That's a very enlightening book that I often see recommended to developers coming from the closed development world. I had a great time reading it; I actually admire Raymond's way of putting things in general.

detyabozhye
December 8th, 2005, 05:20 AM
Optimization[/B]: Prototype before polishing. Get it working before you optimize it.
That is a hard thing to make me do. LOL. I always do everything together, unless I get stuck.