Fog Creek Software
Discussion Board




Donald Knuth - The Art Of Programming Series


I've read somewhere that the Knuth books have got to be part of the bookshelf of any serious software engineer.

So I purchase volume 1 (Fundamental Algorithms)

And I find the book not very accessible,
it's seems that you need to have a really strong mathematical background to learn anything from that stuffs.

Can anyone give me some technics, tools, tips to apprehend such material.

I would love to be able to understand the book at some point

Waiting for your advices :-)

Codex

Codex
Sunday, April 27, 2003

"it's seems that you need to have a really strong mathematical background to learn anything from that stuffs."

it's seems that you need to have a really strong mathematical background to excel at a high level in a computer related field.

That's just the way it is.  Some can do it, some can't.  There is no shame.

Mike
Sunday, April 27, 2003

Hm. Anyone can do math, it just requires practice. The Knuth books are probably not the best place to start.

The Knuth books are really hard. Basically, anyone recommending those books to you is lying; they did not read them. They are on many a wannabe's bookshelf though. (here's a tip for ersatz math/CS wannabes: you'll get further in life with art and photography books on your bookshelf; women won't think you are such a bore).

You can get a PhD in computer science from a top school without ever opening one of those books...the example code is in ASSEMBLER, for god's sake. 

In any case, if you want to get hot and heavy with algorithms, I recommend typing in the code from the sedgewick "algorithms in C" books to get a practical understanding of common algorithms, and getting the big fat Cormen/Leiserson/Rivest book as a reference. 

If you get through those two books you'll probably know more than most people with a "BS" in CS.

choppy
Sunday, April 27, 2003

I've read the entire Cormen/Leiserson/Rivest book, and major chucks of The Art of Programming, but it hasn't been very helpful in my work. A thorough understanding of the Java Collection classes, or the equivalent in whatever language you're using, provides a lot more practical value. Few programmers have any reason to write their own sorting, searching, or arithmetic routines from scratch.

Julian
Sunday, April 27, 2003

Codex,

As someone else already mentioned you would be better off purchasing an algorithm book that uses a particular high-level programming language.

Theory vs. Practice
You seem to have mistaken computer science with software engineering.

Donald Knuth is a well-known computer scientist. Most computer scientists are researchers who study theorectical computer software/hardware related topics rather than practical topics. For example, computer science came up with the notion of formal specifications, a very mathematical way of representing software requirements. This mathematical approach is rarely used in practice because software requirements have this nasty habit of changing a lot during the lifespan of a software project. Even though most software developers find formal specifications to be useless this subject is still being taught and advocated within academia.

One Programmer's Opinion
Sunday, April 27, 2003

The importance in understanding the core data-types and algorithms today isn't so much so that you can write them, but so that you can select the right one to use (i.e., when to choose an array vs. a list vs. a set vs. a queue vs. a stack vs. ...).

Brad Wilson (dotnetguy.techieswithcats.com)
Sunday, April 27, 2003

One Programmer's Opinion :

I did read in a sofware enginering book that the formal method has been extensively used for some projects at NASA.

Dont know if they're still using it though ...

Codex
Sunday, April 27, 2003

I've got all 3, and I have to say that I haven't done an in-depth read of them, but I have 'skimmed' all three to some degree and I can say they are helpful. I think of them more as a reference than a read (though I would like to read them when I have more time). I've skimmed the sorting/searching book completely, the others I delve into when I need them (I've gotten into the randomness testing stuff a couple of times, as well as some other stuff).

I also find them an occasionally useful as 'give me an idea' books - I flip through the TOC and index when I'm stuck and things will leap out and 'unstick' my brain.

As to them being Computer Science texts, not Software Engineering books: Well, yes. And our field (Software Engineering) is derived from academic research conduced by Computer Science types. While I wouldn't want to be an academic, I realize that if I don't have a good understanding of the underlying concepts, I'm NEVER going to do my best work. So I read O'Reilly books as well as computer science texts.

To put it more simply:
Everything we work with is an abstraction.
As Joel put it, abstractions leak (some more than others).
If you don't understand the underlying stuff, or how the abstraction is built, you can't understand the failures.

Michael Kohne
Sunday, April 27, 2003

"choppy": There are plenty of people around who
have read the "Art of Computer Programming"
books fairly completely. Me, for instance. I
wouldn't recommend them to a beginner, though.

Cormen/Leiserson/Rivest is superb, and probably
more useful in practice than Knuth for most
programmers. It's also quite mathematical,
though.

Mike: No, it isn't true that you need a strong
mathematical background to excel in any
computer-related field. It *is* true, I think,
that to be a really good programmer you need
quite a mathematical brain, but that's a very
different matter from having a strong mathematical
background.

Codex: If you want to get to grips with TAOCP,
start with Cormen/Leiserson/Rivest. Don't be
ashamed if you need to read it *really* slowly
sometimes; there's a lot of material there.

The other thing you'd be well advised to do if you
want to read TAOCP is to learn at least one real
assembly language. Not ia32 (x86), if you value
your sanity. ARM would be a much better choice;
its architecture is beautifully elegant. Doing this
will be good for you even if you never open a
volume of Knuth again, by the way.

Gareth McCaughan
Monday, April 28, 2003

My copy of Knuth has a quote from Bill Gates on the back that says that if you can read through all three of these books and understand the contents you should definitely send him a resume.

They really are amazing books, but very hard.  I was really struck by the authors love for mathematics, which comes through on every page.  Most of the CS examples are in a made-up assembly language called MIX, and the explanation of MIX will be very difficult for someone without any assembly experience to understand. 

I second the Sedgewick recommendation.  Knuth Vol. 1 sits on my shelf and from time to time I will wrestle with parts of it, but it remains largely over my head.  It will take me years to finish it.  TAOCP is a book that you study, rather than read.

Ran
Monday, April 28, 2003

I have the Knuth books on my shelf, but frankly, I could not read them. Too much theory, too much mathematics, too many things expressed as maths.

Just find some good books about algorithms and data structures - preferably books written using high level languages examples (C, Pascal, etc).

If you read and understand these, you won't need the Knuth books.

Also, after understanding algorithms and data structures AND doing some work with them (the books should contain exercises), go and learn about container objects in Java, C# or Delphi. Or, if you like C++, go learn STL.

These container & algorithms libraries will help you a lot while programming.

Learning the data structures & algorithms is not necessary in itself, BUT it is a great mental exercise. This exercise will help you a lot.

The other great mental exercise needed in order to be a good programmer is understanding how to do Object Oriented Design (OOD). But, that's another topic, entirely.

Riciu Agariciu
Monday, April 28, 2003

Another problem is that Knuth is simply a poor writer. He's an old school professor -- "what, I'm supposed to EXPLAIN things? Your're too lazy to WORK through my books?"  Same thing with his TeX books which are equally unreadable.

I agree with many of the previous suggestions: ignore Knuth and get some other algorithms books.  You won't miss him.  I bought one of his AOP books in my youthful ignorance, despaired when I looked at it, but then found that I never actually needed it -- neither for getting my CS grade nor in actual programming.

Chris Nahr
Monday, April 28, 2003

I also bought TAOCP when I was youthful and ignorant. My copies of all three volumes still contain $21.95 price stickers from "The Computer Store," which was somewhere in Connecticut. I don't remember exactly where it was, but it was about an hour's drive from New London, and was the closest computer store at the time.

I have, however, used them, particularly volume 2. It's definitely a reference book, but I've found it quite useful professionally. Then again, I've implemented multi-precision arithmetic routines (integer and float) more than once for language runtimes, which appears to be less common than web/business development among the denizens of these discussions.

Steve Wheeler
Tuesday, April 29, 2003

Might be also useful when you do low level programming,
like optimizing routine in assembler when you
do video game programming on the Game Boy for instance.

Codex
Tuesday, April 29, 2003

No, for that I'd recommend one of Michael Abrash's books, such as his "Zen of Code Optimization" or his "Graphics Programming Black Book."

TAOCP is great for what it is, but as far as it addresses efficiency, it's more about the algorithms than about the code that implements them.

Steve Wheeler
Wednesday, April 30, 2003

*  Recent Topics

*  Fog Creek Home