71

There are lots of books about programming out there, and it seems Code Complete is pretty much at the top of most people's list of "must-read programming books", but what about The Art of Computer Programming by Donald Knuth? I'm a busy person, between work and a young family I don't have a ton of free time, so I have to be picky about how I use it.

I'm wondering - has anybody here read 'TAOCP'? If so, is it worth making time to read or would some other book or more on-the-side programming like pet projects or contributing to open source be a better use of my time in terms of professional development?

DISCLAIMER - For those of you who sport "Knuth is my homeboy" t-shirts, don't get me wrong - I want to read it, but I'm just wondering if it should be right at the top of my priority list or if something else should come first.

15 Answers15

84

TAOCP is an utterly invaluable reference for understanding how the data structures and algorithms that we use every day work and why they work, but undertaking to read it cover-to-cover would be an extraordinary investment of your time.

As one family man to another, spend the time with your kids.

28

Substitute "the encyclopedia" in your question for every reference to TAOCP, and I think the answer should be obvious. Because in a lot of respects, that's what TAOCP is.

There's a (possibly apocryphal) story about Steve Jobs meeting Knuth. The first thing Jobs said to him was "It's a pleasure to meet you Dr. Knuth. I've read all your works!". Knuth's response was "You're full of shit": http://www.folklore.org/StoryView.py?project=Macintosh&story=Close_Encounters_of_the_Steve_Kind.txt

Jason Baker
  • 9,653
27

No, it should not be at the top of your priority list. I've got a full set and I have NOT read the whole thing. I've used it (so far) as a good reference on certain problems (it was invaluable in my understanding of randomness and the testing of random generators, for instance). Whenever a CS topic comes up that I don't have a REALLY good handle on, I tend to grab the relevant bit of TAOCP as a good step in my understanding.

If you do decide to read it, more power to you, and I definitely recommend taking it in small chunks. Don't be afraid to skip around and look at whatever is most interesting first.

Michael Kohne
  • 10,146
9

TOACP is an essential read -- at some point. Depending on what you do daily, it may not be your most urgent one.

It's one of those books (well, collections of books) that is good to read early in your career because it really gives you good insights you normally wouldn't get to until later, but it's not essential to survival until you graduate to that part of your career where you don't just code, you choose the toolbox. This is the point where you really want to study algorithms, hopefully already understand language design a bit, and have a very broad understanding of what tools, languages, and systems are out there, and how each one fits into the ecosystem of things you can draw on for a particular project.

In other words: it's big-picture learning, so if you are obsessive like me read it now, if you aren't, it's okay to put it off until you start yearning to move up the ladder and become a big picture guy.

HedgeMage
  • 4,303
9

TAOCP is a great work, but reading it would be a terrible time investment for a practicing software developer. If you do it you will be sacrificing couple of years (thats how long will it takes) of your professional self-improvement budget to learn too much about too little.

I would recommend to work through one or several less "ultimate" books about algorithms, my favorite in this area is The Algorithm Design Manual by Steven S. Skiena

Then if you feel that you need/want more move up to the Knuth.

At the same time you can buy one or several volumes of TAOCP, look it through to understand what areas does Knuth covers in it, and keep it in your library in case you will actually need some information from it in your day-to-day work. My educated guess is that you wouldn't and that is another reason why I do not advise trying to read. But if you will find yourself referencing it often enough, then you will know that it is well worth your time to read it cover to cover.

kdubinets
  • 731
8

Having recently undertaken this very task, I can say that the way he writes is very enjoyable and the problems are labeled (according to difficulty) very aptly. Get the first volume and read chapters 1 and 2 and see how you like it.

sova
  • 1,422
  • 3
  • 14
  • 17
7

Knuth's seminal work is the most popular reference that programmers intend to read, or finish reading. Someday.

4

+10 on the family/children comment. I try and do most reading whilst enduring on red-eye flights to customers.

But...yes, very much worth the read. No reason to read linearly, instead skim and choose a few topics of interest.

Jé Queue
  • 3,917
4

I'm firmly in the camp of folks that feel that every developer should make the investment in getting the books at some point (and it's getting easier now that it looks like they are being reprinted in paperback) but on the same token, I would also be hard pressed to believe that someone would sit down and read them all from cover to cover.

The best approach to them - if you don't have a commute to work where you have free time to sit and read - is to read enough of them to know where to find things in them and then to read a full chapter when ever you find yourself using them as reference books for a given problem. With Google and Stack Overflow it's not as common to be reaching for reference books, but in some cases you may find that the books provide some insight that you would have to send some extra time looking for on the internet.

rjzii
  • 11,304
3

It's probably more important that you do that problems in the book than you just read it. That will require a lot of time.

He's up to like 4 volumes and 5 fascicles (whatever those are) so completing the books would be probably better than a university course in the fundamentals of computer science and make you nearly the best programmer ever.

Since you've got a young family, like me, you gave me a pretty swell idea. I'd buy the books one at a time and teach through'em to your kids.

Peter Turner
  • 6,955
3

Don't forget that at the beginning, Knuth wanted to write something about how to write a compiler.

You can get a lot of information on the net with wikipedia for example, but if you are not some kind of researcher, just read the summary, you will get satisfaction.

You can still get the first tome so you can read it when you're bored though...

jokoon
  • 2,280
2

It's not something most people will want to sit down and read cover-to-cover, no. It is an incredibly invaluable reference, and it's certainly good to pick it up, pick an interesting section, read over it, and do some exercises. But the encyclopedia comparisons made above are pretty apt... it's big, extensive, and detailed. And some of the "exercises" are research problems that might take years to solve.

If you just want a better knowledge of low-level algorithms, it might be better to start with the Robert Sedgewick books (eg, "Algorithms in C," "Algorithms in Java," etc.).

mindcrime
  • 530
1

If you are curious, then do it, but it takes quite some time to digest so you need to take your time.

Do you have a commute where you can read - that would be perfect.


EDIT: You might find this preview of a small part of Volume 4 interesting: http://www-cs-faculty.stanford.edu/~uno/fasc1a.ps.gz

(note: compressed postscript)

1

If you want to change the world, then read it. If you want to learn new hacks, then don't read it.

1

Knuth's TAOCP is a masterpiece. But, just like any masterpiece (like "Illiad","War and Peace" or Proust's "In Search of Lost Time") , it's not for everyone or evertime.

The book is very well written and very well-researched. The problems are great and explanation of the algorithms is well done.

The great problem of the book is the fact that Knuth show code for a fictional assembly language for a fictional computer. I understand why he did it, but the fact is it sucks.

I recommend to use this book as a bible. When in need, look for it. You will find the answer. It happened to me more than once!

Eduardo
  • 31