Slashdot Mirror


Linux and the Unix Philosophy

limbo_14 writes "Mike Gancarz takes his oft'-quoted original book, The Unix Philosophy and spruces it up for the Brave New World of Linux with Linux and the Unix Philosophy. Since The Unix Philosophy was written, Unix has undergone many changes and evolutions. Now with Linux emerging as the new face of Unix, he has updated his book with the same philosophy and tenets that were in the first, but updated the book to include considerations for the Open Source community and the new world of Operating Systems in which we live." Even the old version of The Unix Philosophy is worth finding; it may remind you of Neil Stephenson's In the Beginning Was the Command Line. Read on for the rest of limbo_14's review. Linux and the Unix Philosophy author Mike Gancarz pages 200 publisher Butterworth-Heinemann rating Recommended reviewer limbo_14 ISBN 1555582737 summary An updated and expanded version of Gancarz's original book, The Unix Philosophy.

The good stuff... I enjoyed Mike Gancarz' first book The Unix Philosophy greatly when I was first getting into the Unix world, and was hoping for an updated version. The thing that makes this book stand out in the shelves full of How-To, Dummy, and Administrator guides is the fact that it covers the What and Why of Unix/Linux rather than the How's. I am constantly amazed at Unix books that are mostly printed man files, and things that can easily be googled. This book explains with great precision why Unix is the way it is, and what separates it from other OS paradigms.

I realized the importance of this book after reading it, and being forced to do interviews for a Unix Engineer at my office. Of the 7 candidates, 6 of them seemed to know the textbook stuff. They knew the commands, they knew vi and a handful of scripting languages to a degree of proficiency. Alas, this is what it takes to become a Unix Administrator, not an Engineer that needs to see the whole picture. In this world of "puppy mill" Unix admins who have certifications and know one or two flavors of Unix/Linux, this book really teaches people the core of why Unix/Linux is the way it is, and why it is so attractive to those who really care about which OS to use.

The last chapter -- "Brave New (Unix) World)" -- is the real kicker. Gancarz really drives it home, and shows how the Unix/Linux philosophy has made it into other aspects of technology, and in the world we live in.

The not-so-good stuff ... With every good book, there must be some bad, although this one's errors are quite forgivable. Although I appreciate any book that loosens the RFC style nature of so many technical books, sometimes it can go a little too far. This, however, is for each reader to judge. Some of the puns made me squirm, but for the most part they added a nice touch of levity to the book. So, depending on your threshold for python-esque puns or corny Elvis jokes, the book may not be for you, but knowing the /. Crowd, I don't think it will cause anything more than some groans and giggles. All in All... This is a quality book. It is one that should be re-read every now and then to make sure you do not stray from the Tenets that Gancarz drives home throughout the book via anecdotal evidence.This book can and should be read by anyone from a newbie hacker to a Corporate CEO. It is just technical enough not to make one feel patronized, and eases you into it with general concepts just enough to make it not feel like reading IETF standards. Here are the chapters, which give a good overview of what each is about:
  • Table of Contents
  • The Unix Philosophy: A Cast of Thousand
  • One Small Step for Humankind
  • Rapid Prototyping for Fun and Profit
  • The Portability Priority
  • Now THAT'S Leverage!
  • The Perils of Interactive Programs
  • More Unix Philosophy: Ten Lesser Tenets
  • Making Unix Do One Thing Well
  • Unix and Other Operating System Philosophies
  • Through the Glass Darkly: Linux vs. Windows
  • A Cathedral? How Bizarre!
  • Brave New (Unix) World

Although this is not the cheapest book in the rack, it packs more of a punch than half of the books on my shelf, so I think it is worth it. I found it a great read on the metro on the way to work in the morning, and found myself finishing it well within a week. With 200 pages, and by making it fun to read, Linux and the Unix Philosophy breezes by and makes for a great read.

You can purchase Linux and the Unix Philosophy from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

19 of 234 comments (clear)

  1. Philosophy how??? by Serapth · · Score: 1, Insightful

    I still fail to understand how Unix and Philosophy relate at all?

    To a lesser degree I can understand why you might relate Linux and Philosophy together... even then I think you would be making a mistake. Now, open source... to a certain degree there is a philosophy aspect there, and even still I think its a bit of a stretch.

    Design principles... sure... Philosophy... um... no.

    Then again, a few years back... it was the Zen of Whatever... maybe Zen was used up, and the publishing world needs a new catch phrase.

  2. Something I've never been able to figure out. by Anonymous Coward · · Score: 5, Insightful

    Some of the major tenets of the original UNIX philosophy were:

    - Small is beautiful.

    - Make each program do one thing well.

    Why is it then that there are people out there who spend their entire lives with UNIX/Linux, and who ignore this?

    Some of the best examples are sendmail and emacs. And no, this isn't a troll. But I just don't understand why such people just don't get it. Clearly it isn't a lack of intelligence.

    But this paradox is something which I've never been able to figure out.

    1. Re:Something I've never been able to figure out. by Anonymous Coward · · Score: 1, Insightful

      You think sendmail and emacs are big, bloated and don't conform to the UNIX philosophy? Try KDE and gnome... CORBA WTF, we had files and pipes in my day, and gee they worked fine.

      Seriously, I think that KDE, gnome, and even CDE are perversions of the UNIX philosophy.

    2. Re:Something I've never been able to figure out. by aussersterne · · Score: 3, Insightful

      when they want to do something slightly different, they wind up using a bunch of differenet tools

      Ah-ha! A light bulb has gone off over your head. That is th point of the Unix philosophy.

      Thanks to the Unix philosophy, when someone wants to do something slightly different, they won't need to install a new, slightly different application; they can select different arrangements of tools from their existing collection to solve almost any problem imaginable.

      With the "one complete tool, one complete problem" philosophy, every I have a new problem, I must acquire an entirely new tool. If I have a problem no one else has ever had before, no tool will exist yet, and I must either create it myself or pay someone to create it for me. I must then learn and/or be trained to use it.

      By attacking problems with small, specialized tools that I am very familiar with, (i.e. by splitting a problem into many smaller, more specialized sub-problems), I can use the same basic Unix toolset to solve arbitrary problems of almost arbitrary complexity.

      Almost anything can be accomplished with bash, perl, awk, and the collection of shell tools and command-line networking tools on a Linux/Unix system. And if you need some functionality that the tools can't provide, you don't need to install a 100% beginning-to-end solution complete with duplicate functionality and learning curve, you install a new small, specialized tool (i.e. gphoto2 to fetch photos from a camera) to solve the 1% of the problem that needed a new tool and use the tools you already know and have for the other 99% of the problem.

      Efficiency and flexibility are key in Unix.

      Some people argue (as you have) that these come at the expense of ease of use, but that is only true for small (admittedly often consumer-oriented) problems. Without doubt, however, past certain threshold values of problem size and complexity, efficiency and flexibility (i.e. small and specialized teams of scriptable tools) drastically increase ease of use relative to other methods, not to mention time and expense to deployment.

      --
      STOP . AMERICA . NOW
    3. Re:Something I've never been able to figure out. by Cato · · Score: 2, Insightful

      Actually, virtually anything can be done using just Perl - the whole point of creating it was to have a single tool that could do what people did with awk, shell, sed, and many C programs, without the impedance mismatch problem. Shell scripting is great for whipping up a very quick solution, but you usually reach a point at which Perl/Python would be better. I once wrote a simple 4GL compiler entirely in shell and sed, so I think I went well beyond that point - my only defence is that Perl wasn't available then ...

    4. Re:Something I've never been able to figure out. by crucini · · Score: 3, Insightful
      One only has to look at GNOME and KDE to see how much the Unix landscape has been infiltrated by people that just don't get it.

      While I understand where you're coming from, that isn't quite fair. KDE and Gnome appear to be attempts to produce a Windows-style GUI atop Linux. This doesn't mean the developers don't get it - it could mean that they get it and yet prefer a Windows-style GUI for some or all tasks. Or that they see a need for such a GUI to let "normal" people use Linux.

      Subjectively, I feel the same alienation you are expressing from KDE and Gnome.
    5. Re:Something I've never been able to figure out. by javamutt · · Score: 2, Insightful

      While I do agree that there has been a lot of infiltration of people who "don't get it" in the *NIX space, I don't agree with you when this argument is applied to the desktop space.

      I find that having a desktop that works in an intuitive way, unifies commonly used utilities, and makes common tasks (DnD) more efficient enhances my productivity and acts as a "blanket" around the normal activities I do.

      I don't think any one philosophy dominates in ALL situations. CHOICE dominates in my opinion. In other words, on my GNOME linux box I can use a terminal to create a really efficient set of logins where I automate things and pipe lots of small tools together. BUT I can also run Evolution to read mail instead of using Perl scripts to parse my mail spool.

      Of course, I can do nearly the same things on WindowMaker instead of GNOME/KDE, but I think the two are close enough in this context not to kill my point.

      What's important in mastering an OS is learning its strengths and weaknesses. I think this is Linux's strength - it's like the OS Borg - assimilating the cool features of all platforms. From your statement I would suggest that you may have taken too much of an extremist stance to objectively review the pros/cons.

  3. Submission guidelines? by garcia · · Score: 2, Insightful

    Some of the puns made me squirm, but for the most part they added a nice touch of levity to the book. So, depending on your threshold for python-esque puns or corny Elvis jokes, the book may not be for you, but knowing the /. Crowd, I don't think it will cause anything more than some groans and giggles.

    This is a quality book. It is one that should be re-read every now and then to make sure you do not stray from the Tenets that Gancarz drives home throughout the book via anecdotal evidence.

    Are these two items REQUIRED for book reviews on Slashdot? The word "andecdotal" and "puns"?

    Doesn't seem like it. :)

  4. Re:Tragically, by JimPooley · · Score: 3, Insightful

    Tragically, if Slashdot is still around in 10 years, and SCO is not, people will STILL be doing fucking lame jokes about SCO.
    Funny, my arse...

    --

    "Information wants to be paid"
  5. The Unix Philosophy by cperciva · · Score: 4, Insightful

    The Unix Philosophy can be stated in several ways:

    "Small interconnecting components"
    "Never use one program where you could use several"
    "Plumbing is good"

    If is a continual source of amazement to me that GNU tools (eg, tar -AcdrtuxbBCfFGhijykKlLmMnNoOpPRsSTIUvVwWXZz7) are widely used despite this.

    1. Re:The Unix Philosophy by AveryT · · Score: 2, Insightful

      Tell me about it. I remember practically being flamed on a mailing list for proposing the use of find and grep to recursively search for a pattern in a hierarchy of files. Sure grep -r would have done the job in that particular case but once you add the slightest variation you have to go to find.

      I definitely feel that GNU/Linux has moved away from the "true" Unix philosophy with this kitchen sink mentality.

  6. Re:Philosophy my arse by fruey · · Score: 2, Insightful
    Mission statements are wanky, I'll agree with that.

    However, in creating 'just a fucking operating system' you do need to have some guiding principles, which become a philosophy. Nothing to do with wanky paragraphs of a few words which cost millions to 'brainstorm'.

    --
    Conversion Rate Optimisation French / English consultant
  7. Philosophies no longer apply by Junks+Jerzey · · Score: 3, Insightful

    One of the core tenets of UNIX was that you have small, simple tools and you glue them together. But now the popular programming languages under Linux are C++, Python, and Perl, none of which follow this philosophy. And to get to the point where Linux is a true alternative to Windows on the desktop, you have to put a massive X server on top of the kernel, and put a massive window manager and desktop environment on top of that. In the end, "Linux" is not a simple thing (and arguably even the kernel is not simple, but the API is), because you are looking at the combination of X+Qt+KDE, and that pretty much throws all philosophy out the Window. (Yes, I know you can use Blackbox or something else instead, but then don't go arguing that it's a suitable replacement for Windows.)

    Have you ever read code from some of the original UNIX team, such as Kernhigan's Software Tools? Wow, can that man write clean and clear code. The original C compiler is similarly concise. But then look at the sources to just about any Open Source project and see that (1) there's a massive amount of code, and (2) it's mostly very ugly. Unfortunately, even though it's illogical, "open source" and "simplicity" aren't as intimately tied together as one would expect.

  8. Re:I'll take a shot at it by Tragedy4u · · Score: 2, Insightful

    I don't feel that Unix will ever "die" as you state, despite all the Oracle propaganda Linux is the still the new kid on the block in the *nix sector and has a long way to go in terms of enterprise features which commercial UNIX variants have. Not to mention, some business managers only feel safe with a product if they've paid good money for it (the whole you get what you pay for philosophy and having a vendor to point the finger at) I know that sounds odd but its often true as I've worked for a few very large companies that refuse to adopt UNIX because it's free.

    There's nothing wrong with using commercial closed business model's, it all depends on your particular situation, you need to use whichever philosophy and technology is best in your situation. Sometimes having something that is open to the world can be a bad thing.

  9. Re:Is the Unix philosophy real? by Ed+Avis · · Score: 3, Insightful

    Your post sounds a lot like Miguel's 'Unix sucks' talk where he explains that Unix does not (or did not) have much reusable code and components at a level finer than whole processes - apart from a few libraries like libc and libX11 which are mostly static. Microsoft Office, sometimes the canonical Slashdot example of an ugly monolithic application, is in fact built from many small components (though for legal reasons it is hard to reuse them). The GNOME project set out to change this, although nowadays the emphasis is more on the GUI than on the component architecture.

    Part of the problem is that nobody can agree on anything. So a MIME parsing library has to be written one in Emacs Lisp for Emacs, once as a Perl module, once in Python, as a C library (probably several C libraries), in Java, etc etc. Nobody can agree to write a reusable component once to a common interface (the implementation could be in any language, as long as the interface is usable from others) and just wrap that. On the other hand some libraries, often those coming later in Unix history, do have a single shared implementation, eg libpng.

    --
    -- Ed Avis ed@membled.com
  10. Works too well for its own good... by Dr.+Zowie · · Score: 2, Insightful
    All those little pipeline shell one-liners are inconsequential precisely because the UNIX philosophy works. Some applications (the monolithic ones) don't fit that ideal very well, but many others (all those little one-liners you use, without thinking much about it) do.

    If text manipulation and piping didn't work well in UNIX, you'd know about it -- all those tasks would be a real thorn in your side. As it is, you have the right tools, so they're no big deal.

  11. Re:Philosophy my arse by harrkev · · Score: 3, Insightful
    So Unix has a 'philosophy' then? And I thought it was just a fucking operating system.


    Everything that is designed has a philosophy. For example, imaging a bunch of guys standing around trying to design a four-wheeled vehicle. Here are examples of different philosophies:

    1) The car should become a part of the driver. Getting into the car should feel like putting on a running shoe.

    2) The car should be functional, yet inexpensive.

    3) The car should haul lots of stuff.

    4) The car should haul.

    Each "philosophy" will produce a very different result. *NIX DOES have a very different feel from Windows.

    In Windows, everything is centralized. This is why there is a registry -- one place to keep all data. The web browser is also tightly integrated into the core OS.

    In Linux, everything is a little piece. If you want to build your own system, you can pick and choose which packages to install. No GUI, no problem. Every program sticks its configuration into separate little text files.

    Which is better is a matter of opinion, and both have their strengths and weaknesses. Both Linux and Microsoft have managed to make some rather good operating systems. In fact, I kind of like Windows (at times). All you have to do is get rid of all Microsoft management and lawyers, and you could have a pretty good company. Then, hire some programmers who know something about security, and you could have the perfect desktop OS. Install a *NIX kernel, and you would have something perfect for the server market ;)
    --
    "-1 Troll" is the apparently the same as "-1 I disagree with you."
  12. Re:I'll take a shot at it by qtp · · Score: 4, Insightful

    UNIX = Commercial way of thinking

    The UNIX philosophy has nothing to do with commercial vs Free, or closed vs open and has everything to do with design and problem solving. The comercial aspects of UNIX culture were imposed upon UNIX by shareholders and corporations with little or no regard for who had designed the product, whether they had been compensated, or how future maintainance and development would be accomplished. The development of the EMACS editor, the GNU project, and the GPL license were a reaction to these changes in UNIX development. The GPL was not created as an economic "weapon", nor was it created with money in mind at all. It was motivated by a desire to have the source code available to anybody with an idea and the know-how to implement it.

    Many posters here seem to be obsessed with money, and it can't be good for thier thinking. Whether they are dogmatic about giving away for free or about charging for every last thought, it betrays an unwillingness to view subjects and viewpoints as other than economically based. I admit that the economics of software development need be considered in any project, but my opinion is that making design decisions based on monetary arguments is putting the cart before the horse and will often result in poorly designed and inferior software.

    The UNIX philosophy is not incompatible with the GPL, nor is it incompatible with comercial licensing In fact, the GPL has very little to do wih money in any way whatsoever. In other words, read the book, come back and discuss philosophy when you're prepared.

    --
    Read, L
  13. Re:I'll take a shot at it by Arandir · · Score: 2, Insightful

    There were two main branches of UNIX. The first was the commercialized AT&T/USL UNIX, which SCO know apparently owns. The other branch of BSD UNIX. From day one this was noncommercial. It was BSD UNIX that made UNIX a success. Without BSD, UNIX would be down and out in the gutter sharing a bottle of Ripple with Multics and cursing its fortunes.

    BSD might not be allowed to call itself a "UNIX" today, but the fact remains that it is still UNIX and it is Free Software.

    --
    A Government Is a Body of People, Usually Notably Ungoverned