coreutils: Toolbox introduction

1 
1 Toolbox Introduction
1 ====================
1 
1 This month’s column is only peripherally related to the GNU Project, in
1 that it describes a number of the GNU tools on your GNU/Linux system and
1 how they might be used.  What it’s really about is the “Software Tools”
1 philosophy of program development and usage.
1 
1    The software tools philosophy was an important and integral concept
1 in the initial design and development of Unix (of which Linux and GNU
1 are essentially clones).  Unfortunately, in the modern day press of
1 Internetworking and flashy GUIs, it seems to have fallen by the wayside.
1 This is a shame, since it provides a powerful mental model for solving
1 many kinds of problems.
1 
1    Many people carry a Swiss Army knife around in their pants pockets
1 (or purse).  A Swiss Army knife is a handy tool to have: it has several
1 knife blades, a screwdriver, tweezers, toothpick, nail file, corkscrew,
1 and perhaps a number of other things on it.  For the everyday, small
1 miscellaneous jobs where you need a simple, general purpose tool, it’s
1 just the thing.
1 
1    On the other hand, an experienced carpenter doesn’t build a house
1 using a Swiss Army knife.  Instead, he has a toolbox chock full of
1 specialized tools—a saw, a hammer, a screwdriver, a plane, and so on.
1 And he knows exactly when and where to use each tool; you won’t catch
1 him hammering nails with the handle of his screwdriver.
1 
1    The Unix developers at Bell Labs were all professional programmers
1 and trained computer scientists.  They had found that while a
1 one-size-fits-all program might appeal to a user because there’s only
1 one program to use, in practice such programs are
1 
1   a. difficult to write,
1 
1   b. difficult to maintain and debug, and
1 
1   c. difficult to extend to meet new situations.
1 
1    Instead, they felt that programs should be specialized tools.  In
1 short, each program “should do one thing well.” No more and no less.
1 Such programs are simpler to design, write, and get right—they only do
1 one thing.
1 
1    Furthermore, they found that with the right machinery for hooking
1 programs together, that the whole was greater than the sum of the parts.
1 By combining several special purpose programs, you could accomplish a
1 specific task that none of the programs was designed for, and accomplish
1 it much more quickly and easily than if you had to write a special
1 purpose program.  We will see some (classic) examples of this further on
1 in the column.  (An important additional point was that, if necessary,
1 take a detour and build any software tools you may need first, if you
1 don’t already have something appropriate in the toolbox.)
1