The UNIX Way

To put this as simply as possible, software sucks. I do not mean to say that we should all quit using software, that would be non-sense. I simply mean that all software is poorly written, overly complex, and riddled with zero days.

We can see this in the number of exploits discovered recently. We can see this in the tendency of Microsoft Windows to be plagued with bugs and viruses. We can see in the bugs that plague desktop Linux. We can see this in how frequently Apple has to issue patches to OSX and iOS.

Software has gotten to a point where no one can actually fully understand the largest projects. This also means that maintainability of those projects is effectively null. What is worse is that because software is impossible to understand and therefore impossible to maintain and secure, we now have massively complex and impossible to understand programming tools.

There was a very nice and simple way to avoid this. People could have listened to those of us who spoke of UNIX.

The idea in UNIX was that you would have tools which did one thing, and did that one thing exceedingly well. This made software simple to understand, which in turn made software more stable, more secure, and infinitely more maintainable.

To gain advanced functionality, these tools would accept string input and produce string output. This meant that you could use the tools together to achieve things no one tool could do on its own.

To further increase the utility of these tools, all configuration data was to be stored in plain text files, all log data was to be stored in plain text files, and where possible all other types of data were to be stored in plain text files. This made it possible to use those tools on that data to turn that data into information.

So, a MySQL database got injected with a JS inclusion?

for i in ${cat list}; do
  mysqldump $i wp_posts > /tmp/dump1234 &&
  rpl -iq \
  '' \
  '' /tmp/dump1234;
  mysql $i < /tmp/dump1234;

Or maybe you want a list of all IPs connected to port 80?

netstat -anlp | grep "\:80" | \
'[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}' | \
awk '{print $5}' | cut -f 1 -d ":" | sort | uniq -c | sort -g

So, this is clearly quite nice.

Another part of the UNIX philosophy is the idea that everything should be a file. There are numerous reasons for this. Some of these are good for disaster recovery, just put the files back in place. Some of these allow you to change root. Some of these allow you to change power states of certain devices or the machine itself using echo.

When some of us get angry at things that break the UNIX philosophy, it is because we are wanting to protect this design. Increasingly, more and more applications break this philosophy. Systemd has come around and is breaking this, and many UNIX die-hards hate it. The trend is ever increasing and the number of security breaches are increasing as well. While I acknowledge that social engineering is more dangerous than software security, both are important to acknowledge.

I know that many of the young and hip programmers lament the idea of UNIX tools. I know that the UNIX tool idea is not sexy. I know that the UNIX tool idea is old. I know that people think that new problems require new solutions.

PROTIP: no problem you are facing is new, and in fact, it has likely already been solved by someone else.

I know that people say: "no one does that anymore". This is a false argument. The fact that an idea is widespread does not make the idea itself true. As an example, most people still think that Linux is difficult to use. Linux users know that that is not true. Most people also think that when Orson Welles read The War Of The Worlds over the radio, there was a panic. There wasn't. Few people (by radio's standards) were even listening to the radio show. Newspapers reported that it caused panic as a way to discredit radio as a competing medium for advertising.

If you value the things that made UNIX and its siblings what they are, then you need to stand against the tide of bad ideas, poor implementations, and the very ideas and practices that made Windows what it is.

UNIX and its siblings are not Windows and we shouldn't change them to make them more Windows like.

Licentiam Absurdum