UNIX 的特点:

Everything (including hardware) is a file.
所有的事物(甚至硬件本身)都是一个的文件。

Configuration data stored in text.
以文本形式储存配置数据。

Small, single-purpose program.
程序尽量朝向小而单一的目标设计。

Avoid captive user interfaces.
避免过于复杂花哨的界面。

Ability to chain program together to perform complex tasks.
将几个程序连结起来,处理大而复杂的工作。


Doug McIlroy(UNIX 管道的发明人、UNIX 传统的奠基人之一) 认为 UNIX 的哲学是这样的:

Write programs that do one thing and do it well.

写一次只做一件事,并能把这件事做好的程序。

Write programs to work together.

写互相协作(调用)的程序。

Write programs to handle text streams, because that is a universal interface.

写处理文件流的程序。因为这(处理文件流)是一个通用接口。


The Art of Unix Programming》 总结了下面这些哲学:

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.

扩展原则:为未来设计,因为未来来的比你想象的要早。


Mike Gancarz (X Windows 的设计者)给出了下面九条哲学思想:

Small is beautiful.

小即是美。

Make each program do one thing well.

让每个程序(方法)只做一件事情,并把它做好。

Build a prototype as soon as possible.

尽早建立原型。

Choose portability over efficiency.

注重可移植性,而非效率。

Store data in flat text files.

将数据存储在存文本文件中。

Use software leverage to your advantage.

利用软件来发挥你的优势。

Use shell scripts to increase leverage and portability.

使用Shell脚本提高编程的手段和程序的可移植性。

Avoid captive user interfaces.

避免过于复杂花哨的界面。

Make every program a filter.

使每个程序(方法)称为一个过滤器(筛选器)


源自:https://www.cnblogs.com/memory4young/p/unix-rules.html

UNIX哲理名言(中英文对照)的更多相关文章

  1. linux 命令中英文对照,收集

    linux 命令中英文对照,收集   linux 命令英文全文 Is Linux CLI case-sensitive? The answer is, yes. If you try to run L ...

  2. FFMpeg ver 20160219-git-98a0053 滤镜中英文对照 2016.02.21 by 1CM

    FFMpeg ver 20160219-git-98a0053 滤镜中英文对照 2016.02.21 by 1CM T.. = Timeline support 支持时间轴 .S. = Slice t ...

  3. FFMpeg ver 20160213-git-588e2e3 滤镜中英文对照

    1 FFMpeg ver 20160213-git-588e2e3 滤镜中英文对照 2016.02.18 by 1CM 2 T.. = Timeline support 3 支持时间轴 4 .S. = ...

  4. FFMpeg 滤镜中英文对照

    FFMpeg ver 20160213-git-588e2e3 滤镜中英文对照 2016.02.17 by 1CM T.. = Timeline support 支持时间轴 .S. = Slice t ...

  5. (原创)LAMP搭建之二:apache配置文件详解(中英文对照版)

    LAMP搭建之二:apache配置文件详解(中英文对照版) # This is the main Apache server configuration file. It contains the # ...

  6. css font-family常用的黑体宋体等字体中英文对照

    资料来源: https://www.cnblogs.com/EnSnail/p/6792853.html 在实现网页效果时,细节很重要,字体也不例外,CSS:font-family常用字体中英文对照如 ...

  7. CSS:font-family常用字体中英文对照

    CSS:font-family常用字体中英文对照如下: 推荐网址:https://www.cnblogs.com/EnSnail/p/6792853.html 微软雅黑: Microsoft YaHe ...

  8. [DT] 数据结构术语中英文对照

    数据结构术语中英文对照 数据 Data 数据元素 Data element 数据项 Data item 数据结构 Data structure 逻辑结构 Logical structure 数据类型 ...

  9. 布斯(Steve Jobs)在斯坦福大学的演讲稿,中英文对照版

    2005年6月14日,苹果CEO史蒂夫·乔布斯(Steve Jobs)在他的母校斯坦福大学的毕业典礼发表了著名的演讲,关于这段演讲,你会看到N多人的推荐(比如同样喜欢在大学演讲的李开复先生).此前曾经 ...

随机推荐

  1. hdu-4635(tarjan缩点)

    题意:先给你一个n个点,m条边的有向图,问你最多能够增加多少条边,使得这个图不是一个强连通图 解题思路:考虑最多要添加的边数,所以如果能把初始图划分成两个部分,每个部分都是完全图,这两个部分分别用单向 ...

  2. Linux 下 fcitx 崩溃

    killall fcitx killall sogou-qimpanel fcitx & 输入以上命令

  3. 阿里云ECS服务器部署Node.js项目全过程详解

    本文详细介绍如何部署NodeJS项目到阿里云ECS上,以及本人在部署过程中所遇到的问题.坑点和解决办法,可以说是全网最全最详细的教程了.同时讲解了如何申请阿里云免费SSL证书,以及一台ECS服务器配置 ...

  4. 实验二 Java面向对象程序设计实验报告

    实验二 Java面向对象程序设计 实验内容 1.初步掌握单元测试和TDD 2.理解并掌握面向对象三要素:封装.继承.多态 3.初步掌握UML建模 4.熟悉S.O.L.I.D原则 5.了解设计模式 实验 ...

  5. locate命令

    locate命令介绍 locate(locate) 命令用来查找文件或目录. locate命令要比find -name快得多,原因在于它不搜索具体目录,而是搜索一个数据库/var/lib/mlocat ...

  6. Android studio Error: Modules no specified解决和真机调试

    如何配置SDK百度一大堆: 前言:Android Studio很完善,如果SDK配置好,理论上就是 创建项目->创建个APP(名字自己随便起)->打开手机开发者模式运行即可:如果出了问题, ...

  7. DirectX11--HLSL编译着色器的三种方法

    前言 本教程不考虑Effects11(FX11),而是基于原始的HLSL. 目前编译与加载着色器的方法如下: 使用Visual Studio中的HLSL编译器,随项目编译期间一同编译,并生成.cso( ...

  8. DB2读取CLOB字段-was报错:操作无效:已关闭 Lob。 ERRORCODE=-4470, SQLSTATE=null

    DB2读取CLOB字段-was报错:操作无效:已关闭 Lob. ERRORCODE=-4470, SQLSTATE=null 解决方法,在WAS中要用的数据源里面配置连个定制属性: progressi ...

  9. mysql8用户管理

    查看当前登录用户: 创建用户: create user '用户名'@'主机地址' identified with mysql_native_password by '密码'; 修改密码: alter ...

  10. jquery实现点击页面空白处,弹框消失

    要求:点击1,弹框2显示,点击空白处,弹框2消失 $("#AddDevices"):按钮1 $(".addDeviceBox")弹框2 //点击添加设备弹框 $ ...