Single Responsibility Principle (SRP) – 职责单一原则:一个类,只作一件事,并把这件事作好web
Open/Closed Principle (OCP) – 开闭原则:模块对扩展是开放的,而对修改是封闭的shell
Liskov substitution principle (LSP) – 里氏替换原则:子类能替换基类ui
Interface Segregation Principle (ISP) – 接口隔离原则:功能实如今接口,不一样功能不一样接口彼此隔离spa
Dependency Inversion Principle (DIP) – 依赖倒置原则:高层模块不该该依赖于低层模块的实现,而是依赖于高层抽象。prototype
UNIX的哲学:debug
Write programs that do one thing and do it well.设计
Write programs to work together.orm
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.
X Window的哲学:
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.
Avoid captive user interfaces.
Make every program a filter.