Katana VentraIP

Unix philosophy

The Unix philosophy, originated by Ken Thompson, is a set of cultural norms and philosophical approaches to minimalist, modular software development. It is based on the experience of leading developers of the Unix operating system. Early Unix developers were important in bringing the concepts of modularity and reusability into software engineering practice, spawning a "software tools" movement. Over time, the leading developers of Unix (and programs that ran on it) established a set of cultural norms for developing software; these norms became as important and influential as the technology of Unix itself, and have been termed the "Unix philosophy."

The Unix philosophy emphasizes building simple, compact, clear, modular, and extensible code that can be easily maintained and repurposed by developers other than its creators. The Unix philosophy favors composability as opposed to monolithic design.

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.

The Unix philosophy is documented by Doug McIlroy[1] in the Bell System Technical Journal from 1978:[2]


It was later summarized by Peter H. Salus in A Quarter-Century of Unix (1994):[1]


In their Unix paper of 1974, Ritchie and Thompson quote the following design considerations:[3]

Do One Thing and Do It Well[edit]

As stated by McIlroy, and generally accepted throughout the Unix community, Unix programs have always been expected to follow the concept of DOTADIW, or "Do One Thing And Do It Well." There are limited sources for the acronym DOTADIW on the Internet, but it is discussed at length during the development and packaging of new operating systems, especially in the Linux community.


Patrick Volkerding, the project lead of Slackware Linux, invoked this design principle in a criticism of the systemd architecture, stating that, "attempting to control services, sockets, devices, mounts, etc., all within one daemon flies in the face of the Unix concept of doing one thing and doing it well."[10]

Build programs

modular

Write readable programs

Use composition

Separate mechanisms from policy

Write simple programs

Write small programs

Write transparent programs

Write robust programs

Make data complicated when required, not the program

Build on potential users' expected knowledge

Avoid unnecessary output

Write programs which fail in a way that is easy to diagnose

Value developer time over machine time

Write instead of writing code by hand

abstract programs that generate code

software before polishing it

Prototype

Write flexible and open programs

Make the program and protocols extensible.

In his book The Art of Unix Programming that was first published in 2003,[11] Eric S. Raymond (open source advocate and programmer) summarizes the Unix philosophy as KISS Principle of "Keep it Simple, Stupid."[12] He provides a series of design rules:[1]

Criticism[edit]

In a 1981 article entitled "The truth about Unix: The user interface is horrid"[13] published in Datamation, Don Norman criticized the design philosophy of Unix for its lack of concern for the user interface. Writing from his background in cognitive science and from the perspective of the then-current philosophy of cognitive engineering,[14] he focused on how end-users comprehend and form a personal cognitive model of systems—or, in the case of Unix, fail to understand, with the result that disastrous mistakes (such as losing an hour's worth of work) are all too easy.


In the podcast On the Metal, Jonathan Blow criticised UNIX philosophy as being outdated.[15] He argued that tying together modular tools results in very inefficient programs. He says that UNIX philosophy suffers from similar problems to microservices: without overall supervision, big architectures end up ineffective and inefficient.

Cognitive engineering

Unix architecture

Minimalism (computing)

Software engineering

KISS principle

Hacker ethic

List of software development philosophies

Everything is a file

Worse is better

Archived 2011-10-21 at the Wayback Machine by Brian Kernighan and Rob Pike, 1984

The Unix Programming Environment

– The paper by Pike and Kernighan that preceded the book.

Program Design in the UNIX Environment

Rob Pike, September 21, 1989

Notes on Programming in C

A Quarter Century of Unix, Peter H. Salus, Addison-Wesley, May 31, 1994 ( 0-201-54777-5)

ISBN

Archived 2008-05-12 at the Wayback Machine — from The Art of Unix Programming, Eric S. Raymond, Addison-Wesley, September 17, 2003 (ISBN 0-13-142901-9)

Philosophy

by M. D. Schroeder, D. D. Clark, J. H. Saltzer, and D. H. Wells, 1977.

Final Report of the Multics Kernel Design Project

The UNIX Philosophy, Mike Gancarz,  1-55558-123-4

ISBN

– by Catb.org

Basics of the Unix Philosophy

– by The Linux Information Project (LINFO)

The Unix Philosophy: A Brief Introduction

Why the Unix Philosophy still matters