Unix Philosophy

Before we get started with UNIX philosophy, let’s figure out what UNIX is. First things first.

What is Unix?

Unix is a family of multitasking, multi user computer operating systems. The current Unix is derived from the original AT&T Unix. The development for the original UNIX started in the 1970s at the Bell Labs research centre by Ken Thompson, Dennis Ritchie, and others. The basic building blocks of Unix includes a hierarchical file system. i.e, the concepts of processes and a command-line interpreter for the PDP-7. Now, multiple generations of Unix are developed for various machines.

What is the Unix Philosophy

Unix programs are designed around some core philosophies. This includes requirements like single purpose, interoperable, and working with a standardized text interface. Originated by Ken Thompson, Unix philosophy is a set of cultural norms and philosophical approaches to minimalist, modular software development. The philosophy is based on the experience of leading developers of the Unix operating system

Courtesy Wiki

The Predecessor

Keep It Simple and Stupid (KISS)

This philosophy is the predecessor of the Unix philosophy.  The KISS philosophy was coined by Kelly Johnson, lead engineer at the Lockheed Skunk Works, the creator of the fastest airplane ever. Johnson used to handle a team of design engineers, with the challenge that the jet aircraft they were designing must be repairable by an average mechanic in the field, thus giving rise to the concept. He believed that most systems work best if they are kept simple rather than complicated. Simplicity should be the key to any successful design, rather than over complicating things.

The Unix Philosophy

The Bell System Technical Journal

The Bell System technical journal has published an article by Douglas McIlroy in 1978 which specified certain guidelines to programming. He is best known for having originally developed Unix pipelines, software componentry and several Unix tools, such as spell, diff, sort, join, graph, speak, and tr. The philosophy emphasized on starting afresh for a new job rather than adding new features to the existing program. The output of one program used to be the input for another. The article also specified not to insist on interactive input. They specified to design and build software ideally within weeks, without hesitating to throw away clumsy codes. The philosophy also emphasised to 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.

Peter H Salus’s philosophy

Peter H. Salus put forward this “A Quarter-Century of Unix” philosophy in 1994. The philosophy stated to write programs that do one thing and do it well, to work together and to handle text streams, because that is a universal interface.

17 Rules of Unix programming by Eric Raymond

Eric Raymond, an American software developer and open-source advocate put forward 17 rules to be followed in Unix programming in 2003. The rules are the following:

  • Rule of Modularity: Write simple parts connected by clean interfaces.
  • Rule of Clarity: Clarity is better than cleverness. Most important communication they do is not to the computer that executes them but to human beings.
  • Rule of Composition: Design programs to be connected with other programs.
  • Rule of Separation: Separate policy from mechanism; separate interfaces from engines.
  • Rule of Simplicity: Design for simplicity; add complexity only where you must.
  • 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.
  • Rule of Robustness: Robustness is the child of transparency and simplicity.
  • Rule of Representation: Fold knowledge into data, so program logic can be stupid and robust.
  • Rule of Least Surprise: In interface design, always do the least surprising thing.
  • Rule of Silence: When a program has nothing surprising to say, it should say nothing.
  • Rule of Repair: Repair what you can — but when you must fail, fail noisily and as soon as possible.
  • Rule of Economy: Programmer time is expensive; conserve it in preference to machine time.
  • Rule of Generation: Avoid hand-hacking; write programs to write programs when you can.
  • Rule of Optimization: Prototype before polishing. Get it working before you optimize it.
  • Rule of Diversity: Distrust all claims for “one true way”.
  • Rule of Extensibility: Design for the future, because it will be here sooner than you think.

Why is the Unix philosophy relevant today?

The Unix Philosophy is an important part of what makes Unix unique and powerful. Operating Systems like Linux is derived from Unix, thus the values are still important. The Unix philosophy strongly believes in one point. “Programs should do one thing, and do it well, and elegantly. If you need more functionality, bring more programs, interconnected to each other through a seamless functional path.” And this states how relevant the philosophy is.

Posts created 1

Related Posts

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top