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