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.

2
  • I want to read it, but it's expensive as hell, so I'll get it when I've finished uni and started to earn som money. Also, I need a large bookshelf.
    – gablin
    Commented Nov 5, 2010 at 23:16
  • I made it to page 3 and dog-eared it. Sold the set on Amazon 6 months later. Commented Jan 6, 2011 at 0:18

15 Answers 15

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.

8
  • 38
    +1 for kids - computers are notoriously good for waiting. They can wait to the kids are older.
    – user1249
    Commented Nov 5, 2010 at 20:36
  • 4
    +1 for kids, while you will be able to read the book at any time of your life, you will be able to play with your 4 years old kid only for 1 year. And with your 5 years old kid for only 1 year too...
    – user2567
    Commented Nov 6, 2010 at 11:14
  • 3
    Great answer. There are a load of things which would make us better programmers but we need to be smart about where we invest our time and also remember there's more to life than being a great programmer. Commented Nov 24, 2010 at 9:30
  • 7
    I don't have kids yet and I really wanna finish reading it before I die. Shall I not have kids?
    – bisarch
    Commented Dec 15, 2012 at 18:32
  • 2
    @sank you are thinking like a programmer ... :) Commented Dec 27, 2018 at 15:05
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

4
  • 1
    The encyclopedia has an immense amount of things in it, mostly not all that interesting or relevant to people with even a wide range of interests. TAOCP's contents are at least somewhat relevant to any software developer. Commented Nov 5, 2010 at 21:05
  • 7
    Re: the Jobs story: It is an apocryphal story. Knuth said as much at Randall Munroe's Google tech talk.
    – greyfade
    Commented Nov 5, 2010 at 21:32
  • 6
    The "story" nevertheless made me smile. :) Commented Nov 24, 2010 at 11:33
  • 2
    I can attest to Dr. Knuth's humor. I sent an email to his published address. I was surprised that he responded. His response was a marked up hard copy of my email, were he politely told me to read the rest of the section in TAOCP. My email signature is about being from Missouri(show me), to which he made a remark about a foolish MO politician. He then concluded by saying, "Just joking, don't blame me for Gov. Schwarzenegger".
    – dbasnett
    Commented Feb 26, 2011 at 16:40
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.

1
  • 2
    You hit the nail on the head. Commented Jan 6, 2011 at 0:16
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.

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.

1
  • I think this is the most sensible answer. Commented Dec 27, 2021 at 7:49
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.

7

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

4
  • 4
    It's like Hawking's "A Brief History of Time" for programmers. Commented Nov 24, 2010 at 9:32
  • 2
    Bit I did read ABHIT. Hawking radiation seems weird to me. A black hole shrinks because some more stuff falls into it? I get the conservation of mass and the two-halves-of-each-virtual-pair-can-never-meet-to-destruct thing, but the idea is still just freaky.
    – user8709
    Commented Feb 26, 2011 at 2:33
  • 1
    @Steve314: what's even wierder is that very tiny black holes violently explode. Theoretically. Commented Feb 26, 2011 at 4:56
  • 4
    ABHOT Is short and intended for the general public. TAOCP is neither of those things. Commented Jan 18, 2012 at 13:20
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.

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.

1
  • 1
    Read a full chapter? That's about half a volume, and they aren't small volumes. I think you might mean a smaller unit of text. Commented Jan 5, 2011 at 23:02
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.

2
  • 2
    "so completing the books would be probably better than a university course" -- Volumes 1-3 were used as textbooks in several courses back when I got my CS degree, and we would spend an entire course on just half of one of the volumes e.g. "Volume 3 Sorting and Searching" was taught as two separate courses.
    – tcrosley
    Commented Nov 5, 2010 at 20:57
  • 3
    Minor point, but right now there are only three published volumes with the fourth in progress. The fascicles are a pre-print of what will become the fourth volume. www-cs-faculty.stanford.edu/~uno/taocp.html
    – rjzii
    Commented Nov 6, 2010 at 18:32
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...

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.).

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
  • 1
    Unfortunately (in this case - VERY fortunate otherwise) I telecommute, so that's not an option. Commented Nov 5, 2010 at 20:46
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!

2
  • 3
    Would it help if had used the actual assembler for IBM360 or PDP8? Commented Feb 26, 2011 at 5:11
  • 1
    It could never have endured these 50 years with a nonfictional assembly language. It puts everyone at an equal disadvantage! Commented Dec 13, 2011 at 6:31

Not the answer you're looking for? Browse other questions tagged or ask your own question.