Skip to main content

The Art of Unix Programming

· 2 min read

"Unix has a culture; it has a distinctive art of programming; and it carries with it a powerful design philosophy. Understanding these traditions will help you build better software, even if you're developing for a non-Unix platform."

So true. The book The Art of Unix Programming sums up the Unix philosophy as:

  1. Modularity: Write simple parts connected by clean interfaces.
  2. Clarity: Clarity is better than cleverness.
  3. Composition: Design programs to be connected to other programs.
  4. Separation: Separate policy from mechanism; separate interfaces from engines.
  5. Simplicity: Design for simplicity; add complexity only where you must.
  6. Parsimony: Write a big program only when it is clear by demonstration that nothing else will do.
  7. Transparency: Design for visibility to make inspection and debugging easier.
  8. Robustness: Robustness is the child of transparency and simplicity.
  9. Representation: Fold knowledge into data so program logic can be stupid and robust.
  10. Least Surprise: always do the least surprising thing.
  11. Silence: When a program has nothing surprising to say, it should say nothing.
  12. Repair: When you must fail, fail noisily and as soon as possible.
  13. Economy: Programmer time is expensive; conserve it in preference to machine time.
  14. Generation: write programs to write.
  15. Optimization: Get it working before you optimise it.
  16. Diversity: Distrust all claims for “one true way”.
  17. Rule of Extensibility: Design for the future, but YAGNI!

Many of which are reflected in the Coding Challenges I present on this site. All of which will help you be a better software engineer.

You can read The Art of Unix Programming online.