
TL:DR (I don’t want to read everything, but I want to get the basics)
- Programs should do only one thing, and do it well.
- Programs should work well with other programs.
- Programs should be stupidly simple.
- A single program should have very few features.
- Write programs that handle text streams, because that is the universal interface.
Unix Philosophy
There is no standard statement that defines the Unix philosophy. But if I had to pick one word, it would be modularity, which refers to a system composed of several components (modules) that work together, and can also be replaced by other modules — simpler or more complex — depending on the need.
Modularity is common in nature, and its application to man-made products (goods and services) is a key factor in the development and advancement of industrial societies. However, it was relatively little used for computer software before the development of UNIX, and even today its great benefits are not fully exploited by other operating systems, especially (Microsoft) Windows.
A slightly longer and more conventional statement of the Unix philosophy, but which says essentially the same thing, would be: design programs to do only one thing, but do it well, and to work well together with other programs.
Many programmers feel proud when their code reaches many lines of code, because they believe that the more lines of code they write, the more progress they have made. Therefore, the greater the progress, the more skilled they become.
Many programmers don’t care about code quality. So, if they can get something to work and it appears to solve the problem, they stick with that solution.
If this line of thinking is used throughout a project’s entire development cycle, we end up with a huge amount of code, broken code, and a completely vulnerable system.
This comes from a total lack of conceptual clarity and consistency during the development process.
Simplicity is at the heart of the Unix philosophy.
The fewer lines of code your code has, the more skilled you have become, and the less your code is shit bad.
