首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 操作系统 > Linux > Unix哲学
【标  题】:Unix哲学
【关键字】:Unix
【来  源】:http://www.cublog.cn/u/27708/showart.php?id=217966

Unix哲学


   断断续续地翻阅完了《Unix编程艺术》,可能因为自己在Unix世界里还是个newbie,其中很多地方不甚理解,然而也不乏共鸣之处。整本书读完后,再回过头来看第一章总结的Unix哲学基础,此时理解更为清晰、深刻。
   下文对Unix哲学的概括,节选自《Unix编程艺术》,原书名为《The Art of Unix Programming》。
More of the Unix philosophy was implied not by what these elders said but by what they did and the example Unix itself set. Looking at the whole, we can abstract the following ideas:
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.
   生成原则:避免手工hack;尽量编写程序来生成程序。
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.
   扩展原则:设计着眼未来,未来总比预想来得快。

注:文中提到的透明性与我们通常所理解的“摸不着的,不可见的”的意思正好相反,表示“可见的”;因此对于透明的理解很多时候要根据上下文来理解。
CentOS安装 xfce 窗口管理器:【上一篇】
awstat 显示IP来源--插件安装:【下一篇】
【相关文章】
  • Unix/Linux平台下JDK 1.2 中Swing的中文显示
  • shell学习笔记 NO.15(《UNIX和shell程序设计权威教程》)
  • 在线阅读Unix源码地址
  • HPUNIX上安装WebLogic的问题
  • unix系统命令大全
  • sco unix安装说明 收藏
  • shell学习笔记 NO.14(《UNIX和shell程序设计权威教程》)
  • 超级好开源链接(美国站点linux and unix)
  • Practical UNIX and Network Security Training Note
  • Chapter 1 : unix shell 介绍
  • 【随机文章】
  • ERP实施的战略—是“推”还是“拉”
  • ASP.NET对象
  • vimrc文件的配置
  • 一个高效的数据分页的存储过程
  • IE的IFRAME漏洞
  • Workflow 问题 & 互联网三化
  • 全国中文核心期刊《机械工程材料》简介
  • 对象链接与嵌入(OLE)
  • 对比两个公司的CMMI实施
  • Visual C#组件技巧之ComboBox美容
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 软讯网络 All Rigths Reserved.