D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Nice little Linux based media player device

 

On Fri, 6 Nov 2009, Paul Sutton wrote:

Go back to the original unix philosophy: Do one thing and do it well.
Haven't got that many pockets.

Unless you interpret the above as,  each unix command does 1 thing,

Yes

 but
it does it really well, with lots of parameters,

No. Very few parameters.

add that to lots of
unix commands, each of which do 1 thing, but again with lots of
parameters, and the ability to pipe output / input around, you end up
with a powerful system.

Each unix command used to do just one thing - with very few parameters and the did it very well. You made complex commands by piping simple commands together.

Unix pipes and input/output redirection are what made it all powerfull in the early days. Modern lazy programmers are now to blame for the current state of bloat.

In the begining, commands were simple and had few parameters. So you want to list your files - use the ls command. You want them sorted? ls | sort. Sorted by filesize? ls -l | sort -nk 5 ... (or du -s | sort -n) (You want to Convert and Copy a tape? use the dd command becuase cc was already taken)

and so on.

Users got lazy and programers bloated ls by giving it sort code.

Well - that's maybe not a good example, but that's the general point. Why add the -S option to ls when there's a perfecly good sort command already there..

It's all creep, slowly slowly, but over the years most commands have gotten bigger and bigger as the use of the command-line has diminished. Users get lazy - or worse, never taught these things in the first place, so they never learn about the beauty of simplicity and the power of stdio redirection.

When I wur a lad, the first Unix system I play with had 128Kwords of 16-bit core memory (ie 256KB) on a 16-bit processor (pdp11) and that supported half a dozen users on glass teletypes doing editing, document preparation, program compiling (Pascal & C) and so on. I'm not after going back to those days, but an example of how far we've come is that todays ls command occupies 96KB on disk - that would have been unthinkable back then. (and that's just the half of it - we didn't have dynamic library linking then either!)

but maybe it's just me... :)

Gordon


--
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html