Skip to content

Basics of the Unix Philosophy

Metadata

  • Author:
  • Full Title: Basics of the Unix Philosophy
  • Category: #Type/Highlight/Article
  • URL: https://homepage.cs.uri.edu/~thenry/resources/unix_art/ch01s06.html

Highlights

  • (i) Make each program do one thing well. To do a new job, build afresh rather than complicate old programs by adding new features.
  • Tags: favorite
  • (ii) Expect the output of every program to become the input to another, as yet unknown, program. Don’t clutter output with extraneous information. Avoid stringently columnar or binary input formats. Don’t insist on interactive input.
  • (iii) Design and build software, even operating systems, to be tried early, ideally within weeks. Don’t hesitate to throw away the clumsy parts and rebuild them.
  • (iv) Use tools in preference to unskilled help to lighten a programming task, even if you have to detour to build the tools and expect to throw some of them out after you’ve finished using them.
  • Tags: favorite
  • This is the Unix philosophy: 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.
  • don’t try to second guess and put in a speed hack until you’ve proven that’s where the bottleneck is.
  • Debugging dominates development time, and getting a working system out the door is usually less a result of brilliant design than it is of managing not to trip over your own feet too many times.
  • The only way to write complex software that won’t fall on its face is to hold its global complexity down
  • to build it out of simple parts connected by well-defined interfaces, so that most problems are local and you can have some hope of upgrading a part without breaking the whole.
  • Tags: favorite
  • Never struggle to decipher subtle code three times. Once might be a one-shot fluke, but if you find yourself having to figure it out a second time — because the first was too long ago and you’ve forgotten details — it is time to comment the code so that the third time will be relatively painless.