UNIX Philosophy

From Wikipedia:

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.

I’d like to think of UNIX Philosophy in terms of three things in the context of Eric Raymond’s Unix Rules.

  1. Data Plane
  2. Interface
  3. Control Plane

Data Plane

  • do one thing
  • do it well
  • Rule of Simplicity: Design for simplicity; add complexity only where you must.
  • Rule of Modularity: Write simple parts connected by clean interfaces.
  • Rule of Representation: Fold knowledge into data so program logic can be stupid and robust
  • small is beautiful
  • think of domain-specific language but no loops, conditionals or program logic

Interface

  • Rule of Separation: Separate policy from mechanism; separate interfaces from engines
  • Rule of Composition: Design programs to be connected to other programs
  • Rule of Extensibility: Design for the future, because it will be here sooner than you think

Control Plane

  • Write programs to work together
  • 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.
  • Orchestration logic – sequence, loop and conditionals (Turing-complete)

Now here is my interpretation of UNIX philosophy with respect to my Anchor configuration management tool (https://github.com/ibmendoza/anchor)

Anchor CM essentially belongs to the data plane in the grand scheme of things. It only configures a single machine. It is just a tool that does one thing and do it well (no more, no less).

When you need to manage a fleet of machines, that is the responsibility of a separate tool. This is the point where the Rule of Parsimony kicks in since it belongs to control plane.

But then everything is subjective. To each according to one’s subjectivity.

Advertisements

Subjectivity aside, leave a reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s