The Art of Unix Programming
On the surface, this book is a gentle introduction to programming; but in reality it is an attempt to explain the Unix aesthetic; at times I felt as if I were reading less a technical guide than an art history book, a chatty account of Gothic Architecture as told by someone who helped build a few churches himself. ESR articulates a set of design principles for Unix, which because of succintness deserve reprinting here.
- Rule of Modularity: Write Simple Parts connected by clean interfaces.
- Rule of Clarity: Clarity is better than cleverness.
- Rule of Separation: Separate policy from mechanism; separate interfaces from engines.
- Rule of Simplicity: Design for simplicity; add complexity only where you must
- Rule of Parsimony: Write a big program only when it is clear by demonstration that nothing else will do.
- Rule of Transparency: Design for visibility to make inspection and debugging easier.
- Rule Of Robustness: Robustness is the child of transparency and simplicity.
- Rule of Representation: Fold Knowledge into data, so program logic can be stupid and robust.
- Rule of Least Surprise: In interface design, always do the least surprising thing.
- Rule of Silence: When a program has nothing surprising to say, it should say nothing.
- Rule of Repair: Repair what you can--but when you must fail, fail noisily and as soon as possible.
- Rule of Economy: Programmer time is expensive; conserve it in preference to machine time.
- Rule of Generation: Avoid hand-hacking; write programs to write programs when you can.
- Rule of Optimization: Prototype before polishing. Get it working before you optimize it.
- Rule of Diversity: Distrust all claims for one true way.
- Rule of Extensibility: Design for the future, because it will be here sooner than you think.
ESR shows how to follow these general principles while writing Unix programs. The central metaphors of Unix (that everything is a file, and data-streams that can be piped and redirected) are intuitive, and maximize transparency and separation. About pipes, he writes:
A subtle but important property of pipes and the other classic Unix IPC (Interprocess Communication) is that they require communication between programs to be held down to a level of simplicity that encourages separation of function. Conversely, the result of having no equivalent of the pipe is that programs can only be designed to cooperate by building in full knowledge of each others' internals (p 81, Chapter 3)
Interestingly, the real opposing aesthetic to the Unix aesthetic is not Microsoft (which really is a hybrid), but Macintosh:
The Macintosh's unifying idea is so strong that most of the other design choices we discussed above are either forced by it or invisible. All programs have GUIs. There is no CLI at all. Scripting facilities are present but much less commonly used than under Unix; many Mac programmers never learn them. Mac OS's captive-interface GUI metaphor (organized around a single main event loop) leads to a weak scheduler without presumption... Mac OS applications are not, however, invariably monster monoliths. The system's GUI support code, which is partly implemented in a ROM shipped with the hardware, and partly implemented in shared libraries, communicates with Mac OS programs through an event interface that has been quite stable since its beginnings. Thus, the design of the operating system encourages a relatively clean separation between application engine and GUI interfaces.
ESR's criticism right here (and throughout the book) is not necessarily condemnation. In fact, ESR recognizes that Macintosh as a competing aesthetic has a lot to offer that Unix does not. For example, Mac file attributes (in which a file has both data and resource "forks") provide mechanism for richer GUI support. Thus, we have (ESR says) developers "who work from the interface inward, rather than the engineer outward." In contrast, the Unix byte-stream metaphor may make it hard to conceptualize the meaning of operations such as Create, Open, Read, Write and Delete.
With Unix, the Rule of Least Surprise suggests that the developer delegate interface functions to a GUI or to another program. Instead of creating a built-in editor inside an application, the developer should allow the user to choose which editor to use. Instead of making a robust and easy-to-use interface, the Unix developer should produce a command line utility first, and then let someone else create a separate and independent GUI layer. (Rule of Separation). Xcdroast is a perfect example of a GUI layer for the command line program, cdrecord.
The Command Line Interface (CLI) may scare off new users, but it offers endless scripting and batching capabilities for programs (and smooth IPC). Also, it offers expressiveness to developers. "The Unix programmer," ESR writes, "is likely to see defaulting away from expressiveness as a sort of cop-out or even betrayal of future users, who will know their own requirements better than the present implementer. Ironically, though the Unix attitude is often construed as a sort of programmer arrogance, it is actually a form of humility -- one often acquired along with years of battle scars" (p.304, "Interfaces,")
ESR distinguishes between interface complexity and implementation complexity. Unix projects often involve tradeoffs on these two. The Unix developer prefers a lean and simple implementation at the expense of a usable interface; ESR writes:
Programs that mediate between the user and the rest of the universe notoriously attract features. This includes not just editors but Web browsers, mail and newsgroup readers, and other communication programs. All tend to evolve in accordance with the Law of Software Envelopment, aka Zawinski's Law. 'Every program attempts to expand until it can read mail. Those programs which cannot so expand are replaced by ones that can'".
The book devotes considerable space to showcasing Unix best practices (which in most cases, means readable config files, limiting the program's scope, providing access to sufficient debug information and making it easy to hack). He offers sensible advice about when to use minilanguages ("don't extend your way to it, one patch and crufty feature at a time"), why to limit the number of available command-line switches (each one increases debug time), why optimization has few payoffs ("Moore's law implies a 26% performance gain just by buying new hardware every six months") and why bottoms-up programming can work better than top down design(because "it gives you time and room to refine a vague specification" when "...you are programming in an exploratory way, trying to get a grasp on hardware or software or real-world phenomena you don't completely understand.").
One of the most instructive chapters was about J. Random Newbie, a fictional programmer fresh out of college who understands basic programming concepts and the value of reuse. ESR presents a scenario of how Newbie nonetheless ends up rewriting rather than reusing, relying more on his own code than that of others. When he changes jobs, "he is likely to discover that he can't take his toolkit with him" and may even find it to be useless at a new job with different proprietary tools, languages and libraries. Thus, ESR writes:
Programmers have reuse (and other good practices that go with it, like modularity and transparency) systematically conditioned out of them by a combination of technical problems, intellectual-property barriers, politics and personal ego needs. Multiply J. Random Newbie by a hundred thousand, age him by decades, and have him grow more cynical and more used to the system year by year. There you have the state of much of the software industry, a recipe for enormous waste of time and capital and human skill -- even before you factor in vendors' market-control tactics, incompetent management, impossible deadlines, and all the other pressures that make doing good work difficult. (p.420, "Reuse")
This book is a good introduction for this newbie programmer (as well as a warning about what to expect). It offers practical advice about which license and language to use, how to set up documentation, how to decipher the standards process, how to check things into CVS and how to submit a patch to an open source project.
The chapter on Unix's history puts the current SCO/IBM controversy into perspective. Unix has always been dogged by exertions of commercial control, and ESR accurately conveys how the software world is constantly swinging back and forth from periods of intensely-creative free-spirited openness to periods of commercial control.
I was struck by several of ESR's observations: that Linus Torvald's "refusal to be a zealot" was a contributing reason why Linux was able to succeed; that both the patch utility and email probably did more to advance the Open Source movement than mere "consciousness raising."
In summary, this book is a great help for the student programmer. It synthesizes a lot of ideas and insights from other programming gurus, and is full of insights, aphorisms and fun digressions (no surprise to readers of ESR's other works). The experienced programmer, on the other hand, might find the book more profound than practical. Invoking the Zen metaphor (and even including Unix koans at the book's end), ESR shows us how the abstract nature of programming provides insight into problem-solving, design and yes, even a kind of enlightenment. The book, available for free on the Net, is probably better to read on vacation or an airplane or as a welcome break when stumped by a programming problem. More practical books on Unix programming exist (I happen to recommend Mark Sobell's), but ESR's book will stay with you long after you have finished reading, providing countless hours for reflection and appreciation of Unix's Unix-nature.
Robert Nagle (aka Idiotprogrammer), believes that plone is the best thing since garage door openers, and is a strong supporter of music sharing. You can purchase The Art of Unix Programming from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
reading it will get you billed by SCO for $699.
I would like to thank ESR for putting this book on the web, free of charge.
----
"Ours was a free culture. It is becoming much less so."-Lawrence Lessig
> I thought ESR was dead already. No, he and his ego are still alive.
...isn't it less diametrically opposed than ESR argues? Those arguments seem more applicable to OS9-...OS X seems to be the best of both worlds.
If you are formless, the most penetrating spies will not be able to discern you, or the wisest counsels will not be able to do calculations against you. ?
With formation, the army achieves victories yet they do not understand how.
No wait, that's the Art of War, not the Art of Unix. Nevermind.
"Learning is not compulsory... neither is survival."
--Dr.W.Edwards Deming
1. Rule of brevity: Keep it short; FP fux0rs would have sufficed, where verbosity earns you a silver or a bronze at best.
tell me more tell me more omgomgomgfg
Yet another book extrolling the virtues of Unix with some additional insights. However I am sure McBribe and his gready band would probably agree with ESR but would add the footnote that this wonderful technology is their IP.
I wonder if I Can get a copy of this book autographed by McBribe?
...instead of for $45 for let's see, any book on the Rational Unified Process, or for any of a dozen other formal development processes.
Geez, will people ever stop repackaging stuff that's been out for ages and claiming it belongs to X, where X is only one of a long line of enterprises that used (but did not invent) it?
Nope, you can read the book, there is nothing wrong with that. However, if you read the comments....
I think in some ways, Windows manages to out-Unix Unix. For example, I find Windows programs to be much more scriptable than their Unix counterparts.
I'm talking mostly about OLE automation. For example, it's pretty easy to write a batch file drives any of the Office suite. Can you drive OpenOffice in a similar fashion?
-ec
That's a good tip, not dressing up in a suit so that you impress and intimidate a CEO.
But, I am wondering if just not taking a bath will give me the aura of a foreign dignitary? I like wearing suits, and don't get to dress up that often.
If tits were wings it'd be flying around.
Its funny because in 2000, he was still worth several million still from I believe the VA Linux IPO, so he was telling all these propreitary guys how stupid they were for not jumping on the sunny open source revolution. Of course we all know how that turned out....
Anyway, I decided to lampoon his dog comments for my hack that year, Doggie-Style Windows. By patching over some of OS 9's window calls, it would take all the windows behind the front window and make them run away into their own "territory""-- a feature now being introduced by Apple in OS X's Panther.
I released the source to Doggie-Style, but I'm still poor.
shut the fuck up you dirty gnu/hippy
Just wanted to point this out: I am half way into the book (online form, downloaded with plucker on my sony clie) and I have seen several quotes by Dennis Ritchie, Ken Thompson and Ken Arnold and lots of other legends in Unix history.
This
First Linuxy and now Unixy?
What is going on? Is there a rule somewhere that says all Operating System nouns must have the -y suffix?
MacOSXy, WinXPy, Solarisy? This does not compute.
-Cyc
/.'s 10 Millionth
What exactly has Eric Raymond done besides write that Cathederal book or attempt to invent his own "jargon"?
A book as high and mighty sounding as "The Art of XXX" should be written by an acknowledged luminary in the art...
Conformity is the jailer of freedom and enemy of growth. -JFK
WTF are you talking about? This is a pretty decent book review. You could probably come up with something better but, of course, you didn't.
Quit bitching and submit something better. Or at least criticize constructively.
83% of UNIX Programmers are Virgins
That's because they are smart enough to avoid getting women pregnant. You think because you're married and had 3 acciden^H^H^H^H^H^H^Hkids, you're somehow better than a virginal UNIX programmer?
I say, leave the promiscuous mode off. Celibacy all the way. Making babies just gets in the way of coding. Of course, this may lead to the extinction of the UNIX programmer, but fortunately there are a few that are foolish enough to leave their keyboards. And also I think it could easilly be argued that UNIX programming is a trait acquired from one's environment, and not necessarilly an inherited trait.
In any case, a little known fact is that some UNIX programmers like to receive blowjobs while coding. While, technically, they remain virgins, they still indulge in pleasures of the flesh, without the stress and responsibility involved in full intercourse. Now what percentage of these are receiving it from women, is a statistic I don't know if we want to address. Lets just say.. umm.. Do we consider Mac OS X programmers to be UNIX programmers?
#!/
Wrong.
The Berkeley TCP/IP implementation wasn't the first for UNIX. Not even close. It was the third. There was TCP/IP for UNIX years before Berkeley. 3COM had their UNET product, and there was a BBN implementation. UNET needed considerable rewriting, (much of which I did) but it ran quite well.
But the Berkeley implementation was free, and the 3COM implementation cost about $2000 per CPU. Because BSD was Government-subsidized, it won out.
masterwebfanclub@aol.com
www.clubplumcrazy.com
there is a message board
Look, I've already read "Zen and the Art of Motorcylce Maintenance" and "The Inner Game of Tennis." Do I really need another watered down screed on half-understood principals of Eastern philosophy crammed down my throat to become a better UNIX programmer? Most of the concepts that books like this borrow from Zen are so painfully obvious that it really serves as little more than padding for a poorly thought-out thesis which would only populate about 50 pages (at best) if not for the endless ramblings about holistic thinking.
Okay, UNIX, like everything else, is all part of the Buddha. Very profound. We all marvel at your wisdom. Now stop wasting our time.
Information wants to be anthropomorphized.
Rule of Parsimony: Write a big program only when it is clear by demonstration that nothing else will do.
.begin FLAMEWAR
ahem, cough cough emacs cough cough
.end
I mean, he's just puking up the usual 'rules' of software development...but tacked on 'Unix' so it would appear to the peoples.
Blar.
I think that the unix hater's handbook had a better perspective on unix, and people who become unix 'gurus' (look, even the TITLE of 'guru' is ego-centric).
It is not about what is the best tool for the job, or uses the best methodology, it's simply about who can put out the most smoke-and-mirrors bullshit to convince people that they know fuck-all when they often times [such as your typical slashdotter] don't.
Why else *DO* you think that we have twenty million editors, cdplayers and other assorted minor apps instead of a wide amount of code-reusal? It's because unimaginative, ego-centric tossers insist on doing the sourceforge version of the aol 'me too' bit.
Unix is ok as a platform, but unixers and IN PARTICULAR ESR are ego-bound jerkoffs of the first order. Otherwise, ESR would have contributed more to OSS other than a feel-good essay [TCaTB] and the right-wingification of the jargon file. [oh, I forgot felchmail...probably because niether I, nor anyone else, uses it in leiu of more modern transport agents]
I'm sorry to rant here, folks, but ESR, OSS, Unix, is so freaking dot-com era that I am baffled at how anyone could still be falling for that outmoded [??? profit!] model after the way it tanked our economy!
Thank you for reading, I will go have coffee now.
The book, available for free on the Net, is probably better to read on vacation or an airplane or as a welcome break when stumped by a programming problem.
Better than what?
Seriously, this is a good review so nitpicking is uncalled for.
Rule of Parsimony: Write a big program only when it is clear by demonstration that nothing else will do.
By writing a whole bunch of failure small programs?
You mean this Unix Hater's Handbook?
Sorry, a sentence was incomplete and left out the URL. More practical books on Unix programming exist (I happen to recommend Mark Sobell's Practical Guide to Red Hat Linux ) , but ESR's book will stay with you long after you have finished reading, providing countless hours for reflection and appreciation of Unix's Unix-nature.
Robert Nagle, Idiotprogrammer, Houston
"and why community-supported software won't put developers out of a job"
sir, all your jobs are belong to india, pakistan, and other third world nations. hope you programmers like pushing brooms
OK, he's familiar with the program, but the effect is, at times it really looks like it's all he's familiar with. I mean, if the design principles it illustrates are so prevalent, it shouldn't be hard to find other examples that avoid this obvious slant, no?
What a delightful and clever retort. Bravo.
Robert Nagle, Idiotprogrammer, Houston
Shut the fuck up. The review was crap, obviously written by yet another ESR ass-licker.
Here are some quotes from TCatB (October '99). ..."
"Microsoft will not have an enterprise ready operating system, because Windows 2000 will not ship in a useable form. (At 60 million lines of code and still bloating, its development is out of control.)"
"Windows 2000 will be either canceled or dead on arrival. Either way it will turn into a horrendous train wreck, the worst strategic disaster in Microsoft's history."
"the most likely scenario for late 2000/early 2001 has Linux in effective control of servers, data centers, ISPs, and the Internet,
Raymond is a true visionary. He can almost see beyond his own nose. Why anyone takes him seriously is beyond me.
This is bogus:
It's just as easy to define and use a serialization format for IPC via shared memory as it is do so for IPC via pipes. Sure, if you just copy objects from the stack or heap to shared memory without any abstraction (such as a vtable), then all programs will have to know about the common representation, but that applies equally to stream-based IPC mechanisms such as pipes or sockets.
Honestly, kids, don't bother with this book. Read K &R, Steele, Stevens, Richter, and Stroustrup instead.
had nothing productive to say (much like some of you) but thought i'd point out that "software" is misspelled in the prompt.
This is a spammer. Check for the amazon link:
1 9/ ccats-2010-20
http://www.amazon.com/exec/obidos/ASIN/01314290
The referres is: ccats-2010-20
Wonder who thinks spam is Informative.
Life isn't like a box of chocolates. It's more like a jar of jalapenos. What you do today, might burn your ass tomorrow.
1. write book full of self-evident crap anyone who knows how to turn on a computer can figure out.
2. ???
3. Profit!
I never published my 'hello world' to sourceforge or expected it to get distributed with the major linux vendors. Yet how many frontends and crappy editors are available just with debian alone?
My point mainly being, because there is no ego gratification in re-using code written by someone else, most people tend to not re-use code. I backed this up by pointing to the overwhelming number of applications and os's written by people hoping to be the next RMS, when there is scads of code just laying around waiting to be reused by someone.
People are too busy reinventing the wheel, though, simply for the sake of putting their name on it. where are the oxcarts?
I have been bitten by this several times over the years on various Unices, where a script that has been running fine will one day break when another file is added to a directory. Of course it can be fixed with xargs etc. but if it is a complex, otherwise stable script written by someone else, finding and fixing it can be time consuming and incurs the risk of introducing bugs.
For example, suppose you have an otherwise stable, reliable a script that processes say nightly invoices on a production machine, one file per invoice. But the script writer forgets to use xargs. It runs successfully for many years, then one day the company is "too" successful - oops.
You can argue that scripts should be written right in the first place to anticipate the problem, but the reality is that many aren't. And there's no easy way to test for it other than tediously analyzing the script line by line and making a judgment whether or not a particular wildcard expansion will ever be a problem in the future.
I simply don't understand why, when the wildcard expansion limit is reached, the underlying software can't just allocate more memory as needed. I don't even care how slow or inefficient it is, I just don't want it to blow up.
I think you've been smoking a little too much "referres".
In general, I have a problem with Raymond's pose as an anthropologist or sociologist of the open-source movement. Sociology and anthropology are supposed to be sciences, and scientists are supposed to try to be impartial and base things on empirical evidence, not preconceived beliefs. To me, Raymond's descriptions of the open-source culture read too much like a utopian fairy tale. The truth is that sometimes open source succeeds and sometimes it fails.
Find free books.
Has anyone found an available .pdf of this book? The new laser printer with duplex unit made me ask.
It's informative because it tells you the price at amazon and info about free shipping. If you are going to buy from Amazon, why not have Amazon give that $1 to commission to your fellow /.er instead of having Amazon keep that $1? If you hate Amazon, just don't buy from them...
Dude, that was fantastic. Looked lovely in IE6, too.
Does anyone else find ESR and the hype around him increasingly annoying?
I admire ESR's ability to write these rules that are concise and profound.
In my real life UNIX world, despite my heavy use of the command line, there's a lot of GUI stuff managed by systems with less philosphical purity.
Put X, KDE and Gnome up agains the list of Rules and it's hard to say they their successes originate in their observance of the rules. Perhaps their failings may be correlated to their deviance from the rules.
"Provided by the management for your protection."
Acquired traits can not be inherited. Otherwise, where do virgins come from?
In theory there is no difference between theory and practice. In practice there is. - Yogi Berra
Try some lateral thinking and remove your assumptions (this is the correct method of "thinking outside of the box" everyone refers to). Why compare Amazon and BN every time there's mention of a book? Look at shopping 'bots; in this case, 'bots which check multiple bookstores. Try:
http://www.bookpool.com
http://www.addall.com
http://www.bestwebbuys.com
Bigger Books: $27.99
free shipping and no tax (except in KY)
While we're looking into 'bots, I'm guessing those who look only at Amazon and BN don't 1) use http://froogle.google.com (or froogle.com) either; 2) don't use http://pricewatch (for hardware and software); and 3) would run out of gas because they're too far away from their favorite gas station and won't stop at the one which is right in front of them.
Another review of the book can be found here.
Anyone who's ever worked with any of Eric's code (and there's a lot less of it than he usually lets on) knows that ESR is the world's LEAST qualified person to write a book about programming as an art. A nice example of ESR's code is fetchmail, one of the most security-hole ridden POP clients ever produced; so poorly coded that it should likely be thrown out since it can't be fixed. Well, it can be fixed about once or twice a month I guess, if history serves.
Mod me down if you wish, but ESR is a blundering fool, and his efforts to promote Linux only make the Linux community look like similar fools. After all, what kind of community would want THAT for its leader?
Customers who bought The Art of UNIX Programming also bought:
History of Classical Music by Britany Spears
Gov't By The People by George W. Bush
Improving Your Golf Swing by Stephen Hawking
Interpreting Modern Dance" by Stevie Wonder
I'm with you 99%.
But I was reffering to the mindset behind the whole dot-com era, which involved vague notions of advertising and half-cocked revenue 'concepts' such as basing businesses on giving away products and services for free [eg. gnu].
It was when the investors saw that they were being scammed by madmen and scammers and pulled out that the economy collapsed.
learn your history, it was only a couple years back, dumbass.
ESR is well known for his Open Source advocacy, but this does not make him authority on software developement. What is the biggest piece of software he developed? fetchmail?!
Buh? How is sending the message to CEOs that you don't share their values/priorities (not to mention that you have no experience in making line-item purchasing decisions, even to the extent of getting yourself a decent suit) supposed to convince them that you're worth listening to? Seems to me that they've taken the time to develop the business plans ... it's up to you to convince them how your product will fit into those plans, not that it hovers around in some everything-is-dandy fantasy land, ignorant of how 90 percent of the world does business.
Seriously, can somebody explain his rationale on this one?
Breakfast served all day!
# Rule of Clarity: Clarity is better than cleverness.
.o # don't try this at home (or work)
This is about Unix???? It'more like Smallness is better than Correctness.
# Rule of Least Surprise: In interface design, always do the least surprising thing.
rm -f *
"I think this line is mostly filler"
It might have been interesting for ESR to have mentioned Plumbing as seem in Plan 9. Arguably (as with much in Plan 9), the idea is a natural evolution of the UNIX model (in this case pipes):
Plumbing is a new mechanism for inter-process communication in Plan 9, specifically the passing of messages between interactive programs as part of the user interface. Although plumbing shares some properties with familiar notions such as cut and paste, it offers a more general data exchange mechanism without imposing a particular user interface.
The core of the plumbing system is a program called the plumber, which handles all messages and dispatches and reformats them according to configuration rules written in a special-purpose language. This approach allows the contents and context of a piece of data to define how it is handled. Unlike with drag and drop or cut and paste, the user doesn't need to deliver the data; the contents of a plumbing message, as interpreted by the plumbing rules, determine its destination.
The plumber has an unusual architecture: it is a language-driven file server. This design has distinct advantages. It makes plumbing easy to add to an existing, Unix-like command environment; it guarantees uniform handling of inter-application messages; it off-loads from those applications most of the work of extracting and dispatching messages; and it works transparently across a network.
i see tons of esr bashing here.. and while i quite frankly dislike him intensely on a personal level, i do recognize that he has made important contributions to the open source movement in the form of code.. via
- bogofilter
- fetchmail
probably others, but i couldn't say their value. what i'm trying to say is even if you dislike the guy, at least give him a chance.
A lot of Perl coders make use of CPAN, because it's hella easier to type "use ;" than reinvent the wheel every damn time. There are 1000's of perl modules on CPAN. Some get used more than others, but so what, they're all useful and I'm glad to have them if I need them. Code reuse is alive and well, despite what some people perceive.
Oh yeah, why have all kinds of programs available on sourceforge? Well, why not have them. After all, it's better than having NONE or being stuck with only one implementation. Because let me tell you, there is no such thing as a perfect program, and I find that in some cases one works better than another, and vice-verse. Heck just right now I'm listening to old Amiga modules, and there's a half-dozen programs on my disk than can play mod files. But some have better support for some formats than other players, and vice-versa. Some have a GUI and some don't. There ain't gonna ever be a program that does everything perfect for everyone. That's fucking impossible. That's why there's so many programs, because everyone has different wants and needs. And don't fucking think yours are more valid than anyone else. OK?!!!
Conversely, the result of having no equivalent of the pipe is that programs can only be designed to cooperate by building in full knowledge of each others' internals
Where does one begin tearing apart bullshit like this?
Speaking as a fledgling OS X programmer, I can say that I strongly support receiving blowjobs while writing code. Therefore, I would argue that OS X programmers are UNIX programmers.
Mike Gancarz covered some of this ground in his "The Unix Philosophy" http://www.amazon.com/exec/obidos/tg/detail/-/1555 581234/qid=1066681099/ It's a little dated now, since it was published in 1995, but still quite interesting.
-- Equity lord of the Trill Consortium
Well worth the read, even if you aren't familiar with / think you don't like Lisp. There's another page with links to followups too.
If ESR cared as much about linux and open source as he claims he does, he would stop talking about it in public.
How come Darl hasn't been shooting off his mouth in the media lately?
How do you get someone to blow you for that long? My girlfriend does it as a favour, not because she enjoys gobbling cock, and she gets tired after about ten minutes. Where do you find these women who will happily crouch under a desk for half an hour while you type and groan?
Or is it, perhaps, MEN who are willing to do this? If so, please count me out.
I quote: "The Unix programmer," ESR writes, "is likely to see defaulting away from expressiveness as a sort of cop-out or even betrayal of future users, who will know their own requirements better than the present implementer. The only time this would apply: your theoretical "future user" is a system coder working on a system tool, or is someone who's willing to pay the money for a coder to come in and do extensive modifications to the app. The fact that he's missing, as do so many Unix (and especially Linux) zealots, is that people don't want to modify the source at a later date. The typical end user wants something that works for their needs now, and when it doesn't work anymore, they'll find another tool. The typical end user, yes even in the Unix world, is *not* a coder. Additionally, he's basically advocating code bloat, creeping featurism, rather than discrete tools for discrete functions, which he claims as a virtue. Inconsistency--it's an ESR hallmark. Ironically, though the Unix attitude is often construed as a sort of programmer arrogance, it is actually a form of humility -- one often acquired along with years of battle scars" (p.304, "Interfaces,") There's nothing to say to this but: Bullshit. The types he's trying to defend here are invariably the ones that are insufferable snots, and never comment their ugly, flea-ridden, hacked-together code. You can't make any case that their attitude is some sort of deference to the "future user". There's no humility to the behavior at all. Totally absurd.
These women are out there. Trust me. They genuinely love sucking dick (and swallowing). And these are hot chicks, not fat ugly bitches. The only problem is they are total whores, and will be sucking off all your friends as well.
As for OS X programmers. Its common knowledge that Mac users are gay.
I quote:
The only time this would apply: your theoretical "future user" is a system coder working on a system tool, or is someone who's willing to pay the money for a coder to come in and do extensive modifications to the app.
The fact that he's missing, as do so many Unix (and especially Linux) zealots, is that people don't want to modify the source at a later date. The typical end user wants something that works for their needs now, and when it doesn't work anymore, they'll find another tool. The typical end user, yes even in the Unix world, is *not* a coder.
Additionally, he's basically advocating code bloat, creeping featurism, rather than discrete tools for discrete functions, which he claims as a virtue. Inconsistency--it's an ESR hallmark.
There's nothing to say to this but: Bullshit. The types he's trying to defend here are invariably the ones that are insufferable snots, and never comment their ugly, flea-ridden, hacked-together code. You can't make any case that their attitude is some sort of deference to the "future user". There's no humility to the behavior at all.
Totally absurd.
discuss.
Here's the entire online version of the book.
peterrenshaw ~ Another Scrappy Startup
...you don't read and purchase this book. Just like your are not a true programmer is can't program in Assembly language. :-D (Mind you, I don't know how to code in assembly.) A must read for users, programers, designers, and coding enthusiast. He is very inspiring. Definately know his shit.
In the Operating Systems Comparison section, ESR fails to take note of the Lisp Machine. It's instructive to note that Lisp Machine hackers were the main contributors to the Unix-Haters Handbook and the Unix-Haters mailing list.
From the hour or two that I've spent reading the online version of this book, the overall conclusion that I've come to is that you can bust summarize it as follows: That's not a bug, that's a feature.
Essentially, ESR's view on most aspects of Unix are overflowingly positive, and that every mechanism exists today because it has been evolutionarily tested and has withstood the tests of time. A lot of unix critics will laugh at this explanation, because it's so simplistic that it cannot possibly fail. "Unix does it this way, and that's good. Why else would unix have survived for so long?"
And all of the common complaints are just completely ignored or turned around on their head, as in "that's not a bad thing, that's a good thing!" For example: the fact that some command line tools have an amazingly mind-boggling set of options is a GOOD thing, because it allows for ultimate flexibility. Well, that may be true if you're a long-bearded Unix wizard, but a lot of people AREN'T, nor do they wish to invest the time to become one. To them the fact that command line tools require careful study and consideration before attempting simple tasks is not a feature, it's a bug. It's almost as if he is taunting everyone that is not as able as him. For example, the fact that programs that produce little or no diagnostic/chatty output is to be commended, according to him. In other words, it comes off as "If you don't know how to use a program (because you haven't spent hours reviewing the handy texinfo <shudder> manual), then that's your problem not the program's. When you know what you're doing, anything and everything is possible, and screw you for wanting simplicity and ease of use. Don't clutter MY tools with your ease of use bullshit."
ANother aspect of this is the notion that all GUIs should be front-ends interfaces to some other independent back-end program, that you should build the command-line first and then build a GUI wrapper. Surely this makes sense for some things, but as a general principle? I just don't buy it. I guess I've used too many crappy front-ends that either omit functions (such that they're only available in the command line version) or don't implement functions correctly, such as failing to escape them for the command line... But the worst example of this type of case is where someone writes a wrapper that has almost zero actual usability -- it's essentially a form where you can fill in command line parameters. Sure, it's got a nice text-area for this and a radio button for that, instead of having to remember what "--foo" or "-i" means. But because it completely fails to go further than the "here are some inputs and option settings, now make an output" it is still not nearly as functional and intuitive as GUI applications that were designed from the ground up from some task rather than being simply a front-end to a bunch of command options. A very exaggerated example of what I'm talking about would be drawing a circle in a drawing program. In a native GUI app, you would select the "circle" tool, move over to the canvas, select a position, then drag to size while getting a preview of what it will look like. If this function had been implemented as a front-end to a command line program you would instead have a tick box next to "Draw circle" that you would select, and then you'd have two more little text boxes appear where you would then enter the coordinates for the center and the radius. To preview, you would run the command and then load the file into a viewer to see if it looks right, and repeat as necessary. (Obviously, this is an unrealistic exaggeration. But I wanted to illustrate my point of how not everything can be mapped to "a frontend to a completely seperate back-end using command lines and pipes" that is advocated.)
Another perfect example is the notion that because the X Window System supplies such a loose framework, that any UI widget toolkit can be used. "The user has ultimate control! ANything's possible! Total freedom a
The web site for TAOUP is actually banned by the web-censor software SurfControl! We have had this inflicted on us at work. I wonder if ESR would like to have words with them about libel ...
http://rocknerd.co.uk
> Maybe not entirely the market but it's at least 50-50. How often have you opened & installed games, apps, etc. (not just rinky-dinky) and you've got a set-up which is different - floopy on "A:", HD named "I:" and other drives labelled otherwise and it won't run. You call "support" (the only guy who still has zits on his face), bounce around the company on the phone for hours as they swear their code runs (see below for "Does it run?") because they banged the hell out of it twenty hours a day for the last three days before they shipped and eventually realize it was only tested for "A:", "C:", and in fact, all HDs must be below "H:" or it'll hit the fan. Now what? > And how many serious IT people are there? gather a department in a room and state, "Everyone who is a serious IT person go to the left, everyone else to the right." One thousand quatloos awarded if 95% of the group doesn't go the left. [Nearly] everyone in the business thinks of themselve as a serious IT person. "You don't have to be good, just good enough." (I wrote that in college twenty years ago) No matter what many PHB claim, "Does it run?" is not the end-all be-all question. "Ship it now, we'll fix it later." is still the watchword for many. Less attention is paid to the underlying architecture. Again, people can claim exceptions based upon their environments, but I think the majority rules (unfortunately). Nothing sucks more than to walk into a client site to fix, modify, or add new features to code which (don't assume I'm going to say COBOL or FORTRAN from the 50s, 60s, 70s - BTDT) has been around within the previous ten years or so ala VB or ABC (Access Basic Code) as many referred to it when it was released in Nov. 1992. Want another example? People who write ASP sites amounting to 20k lines of code processed every time a page is referenced. #includes nested six deep, etc. It amounts to a clusterfuck. I could write a book about the sh%t I've walked into during the twenty years I've graduated. The market expects sh%t because they've always been offered sh%t. If they were given better systems and came to expect it, fewer peoples' work would be tolerated. We still have what we had in the 60s, 70s, and 80s: "one class IT persons." They've taken one class or are self-taught and can't do the work. Now before anyone blows a gasket, I'm not saying anyone self-taught is worthless, I'm merely saying people who don't have a good cross-section of knowledge and experience will often do more harm than good.
Gancarz has come out with an updated version of the book, now titled Linux and the Unix Philosophy. Here's a non-amazon link. If you have the original, there's not much new to recommend it, just updated (mostly Linux-based) examples; but if you're new to either OS, or want to give a book to a friend to explain why you love it/them, this is a good one.
"Hardly used" will not fetch you a better price for your brain.
Mac OS's captive-interface GUI metaphor (organized around a single main event loop) leads to a weak scheduler without presumption...
Uh, I think the phrase you're looking for is "without premption". I'll assume this was the reviewer's typo, and not ESR's original text...
"Freedom means freedom for everybody" -- Dick Cheney
Long live the Windows Command Shell Processor CMD.EXE...
.BAT extension under NT/Win2k/XP then you are not following the correct use. The "*.bat" is for COMMAND.COM scripts. The ".cmd" is for CMD.EXE scripts.
.BAT scripts.
n do wsserver2003/proddocs/server/ntcmds_o.asp
1. CMD.EXE replaced COMMAND.COM as the scripting shell to use under NT as early as v3.51.
2. If you are still using the
3. If you are running COMMAND.COM under NT/2K/XP then DON'T. When you run COMMAND.COM, the kernel automatically fires up the vdm (virtual DOS machine). This is a 16 bit emulator.
4. The advantages to CMD.EXE scripts are numerous...
a. The engine is 32 bit and small. It typically occupies 1 Meg or less of memory.
b. It has backward compatibility for
c. The functionality of most of the internal command set has been greatly expanded.
d. It uses standard Borne shell syntax with pipes and redirection.
e. Has string functions.
f. Has numeric functions.
g. Has buit-in token-izing, no need for AWK/SED type scripts.
h. Has extensive compatibility with the Windows paradigm of Drives/UNC paths. This is why using Cygwin with UNIX type shells is a worse idea as they don't know anything about Windows. (much like using a screwdrive for a hammer).
i. Allows subroutines and functions.
j. Operates directly on environment variable table without the need for variable shuffling.
k. Process execution with little need for escaped arguments.
l. Directory/Tree recursion-enumeration built-in.
m. The 'FOR' capabilities have been greatly expanded, as well as 'SET', 'CALL'. Look into them.
5. Process management without the overhead of exiting the shell for externals like "find", and "ls".
6. When externals are needed, there is an extensive command set provided for just about anything from regular expressions to process control.
In short, the flexability of the Command Processor under 2K/XP is drastically increased to match just about anything you would use sh,csh,tcsh for. If you are a network administrator I would look into using the command shell. It is included standard. There's nothing to add. You can use it for everything from cron scripts to logon script, and even logon authentication. It is so much simpler than using VB scripting, without the overhead of a huge runtime engine. The scripts run, then end very quickly. I use it for just about everything. Our entire network infrastructure is based on this "glue" scripting that sits at the highest level of proecess management. In many ways using command shell scripting is the "right way" to do things because it frees you from sticky vendor lock-in technologies like systems management server, or Zenworks. You are in control.
See...
http://www.microsoft.com/technet/prodtechnol/wi
I could provide so many more compelling reasons to use the command shell that echo Raymonds sentiments, but I'll just stop here.
+5
I haven't read the whole thing, but I've read parts of it. Some of it is quite good, but other parts... Well, I'll just say that he doesn't let the facts stand in the way of the point he's trying to make.
Really, it just blew me away how biased he was in some areas. For example, about two years ago, I was reading the draft edition. In his section where he was discussing various operating systems, he compared Windows to UNIX. He made some very broad, very negative statements about Windows that simply weren't/aren't true. The link at the bottom of the page asked for corrections and suggestions, so I sent him a short email with some additional information. He replied, and admitted that he didn't really know much about Windows since he didn't use it very much, and that the information was all second hand. I pointed out some factual errors, along with references to back up the corrections. The discussion seemed very positive at the time. However, now that the book has gone to print, I have looked over that section to see how it turned out. Not much has really changed -- some of the most blatant mistakes have been corrected, but many factual errors of which he was fully aware remain in the printing edition. Most importantly, the tone of the section is very authoritative and negative towards the technical aspects of Windows, when ESR admits that he really doesn't know much about it.
I guess that tells me what I wanted to know about the book. It may have some wonderful insights about the "UNIX way" (which is actually pretty cool), but the author isn't interested in making me wiser and better informed -- he's pushing an agenda. His statements are heavily slanted towards what he wants people to believe, and he is willing to bend the facts to strengthen his case.
Personally, I think he would have no trouble defending his position with solid facts. There is a lot of good in the "UNIX Way" of doing things. He shouldn't need to twist things to get his point across. This simply discredits him, and by association, discredits the Open Source movement in general.
There are plenty of books out there about UNIX, more than I'll ever be able to read in the limited amount of time I have for bedtime reading. I'm not going to spend my time on one that I can't trust to give me the straight facts.
Time flies like an arrow. Fruit flies like a banana.
I got sick of patching fetchmail for one buffer overrun after another. Unfortunately, there's nothing else out there that will do what it does, so until someone gets fed up with and rewrites it, we're stuck with it.
I especially like how the passwords are stored in cleartext in the various rc files, if you want fetchmail to run as a daemon. Yeah, real secure design there.
Fetchmail is a great victory for how open source can successfully work to rescue old code and turn it into something new and viable. It should not be used as an example of sound design.
You cannot apply a technological solution to a sociological problem. (Edwards' Law)
Thamk you.
Buy that book? To hell with that anyway. I've got higher priority book purchases than this thing. I got the O'Reilly 'Running Weblogs with Slash' book on Thursday at Half-Price books for $4.95. I just used wget to scarf down the HTML version off rayboy's website. The URL is here.
A Good Intro to NetBS
the topic is coding, however.
(I once attended a delightful talk he gave where, among other things, he gave sartorial advice to open source developers, urging them to avoid formal suits at presentations to CEO's as a way to give off the auras of foreign dignitaries unused to local customs).
Main Entry: sartorial
Pronunciation: sar-'tOr-E-&l, s&(r)-, -'tor-
Function: adjective
Etymology: Medieval Latin sartor
Date: 1823
: of or relating to a tailor or tailored clothes; broadly : of or relating to clothes
Big apple, new Yorik, undig it, something's unrotting in Edenmark.
Has extensive compatibility with the Windows paradigm of Drives/UNC paths
C:\>cd \\someserver\c$
'\\someserver\c$'
CMD does not support UNC paths as current directories.
"Compatible" to the extent it actually recognizes them and tells you it's not supported. Maybe that's changed in Win2003.
CMD.EXE replaced COMMAND.COM as the scripting shell to use under NT as early as v3.51
CMD.EXE is actually a relic of OS/2 1.x.
Share and enjoy!
RinkRat
del /s *.bak
Windows 2000 hasn't arrived yet, what is being marketed as w2k and xp now is really just NT5 in in various tarted up configurations.
When ESR said that w2k was going to be what s now being called Longhorn (minus some things they didn't think of back then)
So I'd say that ESR was completely right on that one, except if you count the current w2k (nt5) as an enterprise os...
-- To dream a dream is grand, but to live it is divine. -- Leto ][
I get your point about A: and C: ; However, I am not sure your conclusion is correct.
:)
True, people like icons. I like icons. What if those icons were labeled as so?
System Disk
Option Disk
Floppy Disk
Removable Disk
CD-ROM
My Home Directory
My Pictures
My Settings
My Mail
The market identifies with A: and C: because one company in particular was successful in enough other things to make this acceptable. Users can easily remap these things, particularly when the names make sense and can be associated to common tasks or ideas.
As to having the power, I agree users need know nothing about it. A good OS will have reasonable defaults for the standalone machine, (Mandrake?) but will still have the power under the hood for those that know what they are doing.
Not having drive letters is a good thing --one that users can easily deal with. Having the ability to keep the logical state of things seperate from the physical state of things makes life easier for those doing the heavy lifting at very little cost to the user.
Personally, I have ran into a couple of these users. The names 'A drive' and 'C drive' worked quite nicely
Blogging because I can...
"Moore's law implies a 26% performance gain just by buying new hardware every six months" What about us poor peopke who live in Africa and can only afford to buy new haedware every 2-3 years?
On the other hand, the file system is completely mapped under /cygdrive, there is access to services and the registry. I don't exactly call that being ignorant of Windows.
Personally, I'm more inclined when doing system/network management thingies to go off in the direction of Perl/Win32 which gives me more than CMD and better implemented than WSH or VBS.
See my journal, I write things there
In those days, many people used Unix and VMS or other big systems and had a good idea of the merits of both and the book The Unix Haters Handbook. It is humorous but it makes some valid points. Perhaps it wasn't up to date with all Unix versions at the time, and in the same way can we expect Mr Raymond to be aware of all the goodness lurking somewhere within the Windows code base (there must be some!).
Perhaps Raymond should have reused but praphrased that quote from the forward of The Unix Haters Handbook:
This is a good disclaimer but this was originally written about Unix, meaning specifically closed source versions from vendors like SCO. What 'fixed' Unix, was freeing the programmer from the patents with open sorce versions like BSD and Linux.In the end Raymond is kind of right. Microsoft themselves are having problems getting everyone to upgrade. How many copies of 95 and 98 are out there still? The NT kernel is kind of cool but not everyone has that kind of horsepower.
See my journal, I write things there
Considering that unix time comes to an end in 2038, it is quite unnecessary for unix programmers to procreate. What's more, since unix time then wraps around to 1970, the long beards and unkempt appearance will suddenly be perfectly acceptable. That is the plan, anyway.
This extremely thought-provoking book is similar, in some ways, to Michale Gancarz' book, "Linux and the Unix Philosophy." That work is a little more philosophical than this one, which focusses a little bit more on languages and programming. I found the comparison of scripting languages here quite interesting. Actually, the author might well have included even more on that issue: there are so many scripting languages, and one can hardly learn them all! It is interesting, also, that Emacs Lisp is taken here as a serious alternative to Perl, Tcl et al.
Well and truly said.
Do we consider Mac OS X programmers to be UNIX programmers?
as i type on this ibook some shells are open in other windows in Terminal.app. Yes, I consider myself a UNIX programmer and yes, I've written software for MacOS and Windows.
Lots of the gems in his book work. I like this one, it applies to life:
i started programming "UNIX" using QNX -- a "realtime" UNIX back in 1986. The cool tools in QNX were the C compiler (even though it was buggy at the time.) I've taken that UNIX experience, and knowledge (or lack thereof) and applied it later when writing software for DOS, MacOS, and Windows. There is something cool about writing a UNIXY "filter" in C that will run on Mac and Windows (oh and UNIX too.) And the rush of dragging a couple hundred very large files onto the application icon on MacOS to run the filter on all of them at once!
UNIX tools rant -- i still don't get the allure of grep, awk , sed and their likes. I often need to reread the rather long manual everytime I go to use grep. I just want to do a simple find and replace without all of the hiccups\"/.* of grep. ie. Don't use [a-z] use [[:alpha:]] instead blah blah blah. And these tools tend to work on lines of text when I want to do the "UNIXY" thing and work on the entire stream (blob, bag) of text. The other annoyance is that someone decided (that is a good idea) to truncate lines at 70-80 characters to fit their crappy shell/terminal program. Raymond makes mention of text editor "bobbles" I was fortunate enough to avoid the UNIX editors and use text editors on MacOS and Windows that didn't suffer from these problems. My current choice of text (and programming!) editor: TextEdit (MacOSX), WordPad (Windows) because like ed they are pretty much guaranteed to be installed already. I tried a few "bobbly" text editors on UNIX but they wouldn't be my preference. I once used VMS, briefly in college, and I would love to have that option of version control available in file systems that I use everyday. The most important thing to know about vi is how to quit: (open a shell, find vi's pid and kill it.) After reading all the praise of emacs, I went and fired it up, it seems to me that emacs could live on it's own, emacs is. emacs is the operating system that Stallman dreams of creating. because who needs an os anyways? i could limp along just fine with only a web browser -- but now i am sounding like those old-timers that could be just as happy using ed and nothing else.
\n rant and those pesky newlines: look for \n and accept all of these:
Not-a-Trollback will be archiving your comments for posterity, I can assure you.