Fog Creek Software
Discussion Board




Unix hater's handbook online

http://research.microsoft.com/~daniel/unix-haters.html

Been looking for this for a long time.  Thanks to Gabe Garza for pointing it out on usenet.  This was all "before my time" and it's oddly like wisdom of the ancients.

(Offtopic: I'm really willing to pay people for putting outofprint books online.  Anyone else?)

das gringo
Thursday, April 24, 2003

Thanks.  I have been looking for this for a long time.

Mike
Thursday, April 24, 2003

That's really made my day - superb stuff!


Thursday, April 24, 2003

Hate is just another word for limited understranding :)

"Unix for people with limited understanding of UNIX handbook" sounds like a pretty accurate, but less selling title of this book.

Patrik
Thursday, April 24, 2003

patrik obviously didn't read the unix hater's handbook. it is written by a bunch of old heavyweights and is really, really funny. especially if you remember unix from 10 years ago.

choppy
Thursday, April 24, 2003

Does anyone find it richly humorous that Donald A. Normal (writer of the Forward) went to work at Apple to escape Unix? :-p

Brad Wilson (dotnetguy.techieswithcats.com)
Thursday, April 24, 2003

Patrik, I welcome you to read the book and tell me which parts are wrong.

Pay special attention to the quoted usenet posts from experienced Unix sysadmins detailing how Unix just helped them lose a lot of work.

BTW, the reason I dumped LInux wasn't the difficulty of the material, it was the arrogance of the much-touted Linux community that made actually learning anything impossible.

Philo

Philo
Thursday, April 24, 2003

Generally there is a certain class of *nix people that tend to be a bit haughty.  I use the word "bit" here in the same sense that Jeffrey Dammer was a "bit" quirky

Mike
Thursday, April 24, 2003

Great book.
Perverse...


Does anyone know a place where I can take a look at the 'mythical man month'?

Panna
Friday, April 25, 2003

Great find, thanks! I love the chapter on C++, too:

"That’s because C++ misses the point of what being object-oriented was all about. Instead of simplifying things, C++ sets a new world record for complexity. Like Unix, C++ was never designed, it _mutated_ as one goofy mistake after another became obvious. It’s just one big mess of afterthoughts."

Classic stuff.

Chris Nahr
Friday, April 25, 2003

Hmm, but it doesn't apply to the ISO C++ standard that we enjoy now. If you read Stroustrups latest book, you'll see that it is actually quite sensibly designed.

Frederik Slijkerman
Friday, April 25, 2003

Panna - please buy a copy so it stays in print. In the long term it'll be one of the most read books in your library.

Philo

Philo
Friday, April 25, 2003

I did read Stroustrup's classic book, and Scott Meyers' books, and Josuttis, and "Accelerated C++", and Stroustrup's "History and Evolution", and I wrote tens of thousands of lines of C++ code, too.

How anyone can use the words "C++", "sensibly", and "designed" in the same sentence is beyond me.  The 1994 indictment still holds up. C++ was not "designed" at all, it's just kludges upon kludges in a dishonest attempt to combine incompatible features for the sake of creating the mythical "all-in-one" language.

The best thing that came out of the disaster called C++ is the beautifully designed C# language, by way of Java.

Chris Nahr
Friday, April 25, 2003

So... it should be easy to give an example?

Frederik Slijkerman
Friday, April 25, 2003

No garbage collector, declarations in separate header files, preprocessor macros that circumvent type checking and can make source code unreadable, no support for packages or libraries, auto-conversion of anything to boolean, no dedicated character type, no dedicated string type, string length is not stored with string (hence: zero cannot be a string character!), primitive Unix-centric I/O library, switch/case fall-through, longjmp, no finally clause for exceptions, no true multidimensional arrays, no arrays with nonzero starting indices, no array bounds checking, array dimensions are not stored with array, multiple inheritance (virtually useless!) but no interfaces, overpowered operator overloading that is hard to use and allows write-only code (and was abused by the C++ standard itself to turn << and >> into I/O operations, of all things!). I probably missed another dozen things that I can't think of right now.

The template mechanism and the STL based on it are designed to fix a number of these problems but they result in ultra-slow compilation, extreme code bloat, difficult debugging, and incomprehensible error messages. Basically it's like going back from a native C++ compiler to cfront -- just another kludge to fix a broken language.

Chris Nahr
Friday, April 25, 2003

funny how some people can see all those things as advantages to C++ instead of problems with it.  C++ has/doesn't have those features so you can choose not to use them when it's appropriate.  When you write for limited memory and/or embedded systems or performance critical projects is when you are glad the language doesn't force bloated slow solutions on you even if in general they make it easier to program some subset of programs.

Gregg Tavares
Friday, April 25, 2003

I actually have a copy of "The Unix Hater's Handbook" in print. They shipped it with a Unix barf bag in the back. Very funny.

As far as the C++ language discussion is concerned: I *do* think that the language has a fairly decent design. However, the design operated within severe constraints that directly resulted in the complexities we all deal with today.

For example: C++ must be link compatible with C libraries. This means zero terminated strings, arrays as just a chunk of memory, etc.

C++ must have no runtime: That means no garbage collector, among other things.

C++ must work with existing system linkers: result: name mangling, no language level modules, etc.

I applaud Stroustrup for building a system that works marvellously within the constraints set before him. However, I, and many others, choose to no longer be bound by those constraints.

Chris Tavares
Friday, April 25, 2003

Gregg,

Sure, for the micro-percentage of people who have limited memory constraints (i.e., measured in kilobytes instead of megabytes), then they get to revel in their C happiness (you don't think they'd waste bytes on object headers and vtables do you!?).

For everybody else, well, we've all moved on. :)

Brad Wilson (dotnetguy.techieswithcats.com)
Friday, April 25, 2003

“The Unix Hater’s Handbook” is must reading.  This book, in spite of its provocative title, presents some very fundamental information that all Unix users should know.

An example of the information you should know is the wildcard expansion performed by the Unix shell.  A simple command:

    tar xv /mydir/*.c

This tar command behaves differently than you probably expect.  This command (I left out the f option and the device for brevity) will not extract from the tape all .c files that belong in the /mydir directory!  The tar command will not even be told that you wish to extract using a wildcard.  Instead, this command looks into the /mydir directory, builds a string that is composed of all files that are already there, and tells tar to extract just those files.  If you wanted to extract just a file that you had inadvertently deleted, that command would not get it back.  The Unix shell does all of the wildcard expansion, not the individual commands, unless you escape the wildcard.

I was puzzled about this in Unix until I read “The Unix Hater’s Handbook”.  This is only one short example of the very important Unix details from the book that any serious Unix user or programmer must know.

XYZZY
Friday, April 25, 2003

*  Recent Topics

*  Fog Creek Home