# Unix Philosophy

1. Make each program do one thing well, rather than complicating old programs by adding features. See [[Single Responsibility Principle]].
2. Expect the output of every program to become the input to another, as yet unknown, program. Don't clutter output with extraneous information. Be lenient when accepting inputs, and don't create an interactive interface without cause.
3. The first version of your software should be usable in under two weeks. Reduce the scope of your design until this is feasible. Don't fear iteration.
4. Build tools to accelerate the main programming task, even if you expect to throw some of them out after you've finished using them.
##### Rule 2.

Expect the output of every program to become the input to another, as yet unknown, program. Don't clutter output with extraneous information.

Compatibility in data transfer comes from two practices. The first is to eliminate redundant information. Redundant information can come in the form of the same data being stated twice in output. This often happens when presenting data for users. An important row might be both marked with an asterisk for visibility and labeled in one of its many columns of data, but this asterisk adds one more piece of data for which a secondary program must eliminate, which is unnecessary given the label.

You should also reduce redundancy in the "space" of your output. There should only be one way to convey any particular information. If a pair of empty square brackets [] means the same thing as null, one should be eliminated in favor of the other. The one you keep should relate to the other forms of data in a logical way. If a list is normally represented by comma separated values between square brackets, it makes since to represent an empty list as two empty brackets, rather than introducing a new term, null.

The second practice to boost compatibility in data transfer is to aim for the most minimal way of representing that data. Different programmers might disagree on comma or semicolon separated lists, or the use of single or double quotes to group words into strings, but it's difficult to find nuanced arguments with the newline-separated output of most Unix programs.

item
another item
third item


Minimalism is the path to conformance. All circles are the same shape, as the lack of angles doesn't allow for variation. Different cultures teach different base colors to children, but when aliens land on our planet, they'll recognize what we call a circle.

Be lenient when accepting inputs.

You should always [[Prioritize Leniency over Error Detection]]. Error detection should only be used for ambiguous or impossible inputs.

#software #complexity