Unix编程哲学

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 form mechanism; seperate 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 visibilty to make inspection and debug going easier.

透明性准则:设计的可见性使检查和除错更容易。

8:Rules 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 nosily and as soon as possible.

修复准则:如果你必须出错,尽可能响亮和快速的出错。

13:Rule of Economy:Programmer time is expensive; conserve it in preferenc 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.

扩展性准则:为未来设计,因为它往往来的比你想得快。

猜你喜欢

转载自blog.csdn.net/u6eQK6e3Q26oQzT1/article/details/79925830
今日推荐