Encompassing the Whole World Front Page /// Categories /// Site Index

Unix Philosophy

Built on the principle of lots of little tools being put together to do big jobs, this philosophy allows lots of the system to get faster every time someone improves any part of it.

Due to a very good decision right at the start, you already have standards for source code, as the entire system is designed to be source code compatible, so that you can just compile code on a different system, and it will work with hardly any modification.

The whole system is built on a number of simple principles:

  1. Modularity - write simple parts connected by clean interfaces
  2. Clarity - being clear is better than being clever
  3. Composition - design your programs to be connected to other programs
  4. Seperation - seperate the engine from the interface, and the policy from the mechanism
  5. Simplicity - as Hume pointed out years ago, don't make things more complex than they need to be
  6. Parsimony - only write big programs when a smaller one won't do the job
  7. Transparency - design to make debugging and code inspection easier
  8. Robustness - if it is simple and transparent, it is much less likely to break
  9. Representation - move knowledge from the program to the data where it makes the program logic simpler
  10. Least Surprise - if there is already a standard way of doing the interface, don't reinvent the wheel unnecessarily
  11. Silence - If you don't have anything to say, then say nothing, as generations of mothers have tried to get their children to behave
  12. Repair - if you must have something fail, then do so, but make it fail as early and as loudly as possible
  13. Economy - computers have more time to do things than programmers, so don't have programmers wasting time if the computer can instead
  14. Generation - don't do things by hand unless you have to, especially when you can write a program to do it for you
  15. Optimisation - get it to work first, then polish it up
  16. Diversity - distrust claims of being the only way of doing things
  17. Extensibility - design to expand, because it is much harder to build this capability in as an afterthought

For more about this, see the book "the art of unix programming by Eric Raymond".

last modified 01:25 2006/12/17