Live data from Hacker News

Ask HN: Is Knuth's TAOCP worth the time and effort?

news.ycombinator.com

21–30 of 192 posts

Re: Ask HN: Is Knuth's TAOCP worth the time and effort?

#21
post #6

Earlier quoted context omitted.

Thanks for being honest about it. Sad to see that it's downvoted. I guess people spent the time and effort and don't want to admit it might not have been valuable.

Maybe people are still in a denial that all companies want is some LeetCode and funny scripting languages.

That's the only answer; SICP and TAOCP are totally useless in an average modern setting. People just copilot glue drivel all day long. You have to be interested in fundamentals and basically write low level stuff (OS/DB/PLD) to really benefit from these things and most, by a large margin, will never touch that stuff.

Edit: for instance, there is now a SIMD article on HN #1; how many people actually are really interested in that? Those should overlap the people who would enjoy these books.

Re: Ask HN: Is Knuth's TAOCP worth the time and effort?

#23
post #6

Earlier quoted context omitted.

Thanks for being honest about it. Sad to see that it's downvoted. I guess people spent the time and effort and don't want to admit it might not have been valuable.

Maybe people are still in a denial that all companies want is some LeetCode and funny scripting languages.

Or maybe people don't care just about that but instead have a higher ambition in furthering their craft. Be it for joy, some sentiment of "getting better" or whatever. Yeah, sure, most of my days I'm a glorified data converter. I take data in whatever shoddy system and format the customer has it and bang on it long enough so that it fits into our own systems and can be used there.

Does TAOCP help me with that? Well, maybe, mostly no though. I still treasure the parts I've read (I freely admit not having read all of it, but some parts and done some of the exercises) even if from some strict capitalist time = money point of view they probably wouldn't have been worth it.

Re: Ask HN: Is Knuth's TAOCP worth the time and effort?

#24
I've read SICP - loved it until it got into the later object orientation parts - so I'm wondering in if you LOVED X IS Y FOR YOU sort of comparison -

What books if you liked will you like TAOCP

If you hated skip TAOCP.

Me:

Loved SICP

totally wore out Godel, Escher, Bach

Somewhat angry at A New Kind of Science

Re: Ask HN: Is Knuth's TAOCP worth the time and effort?

#25
Does a christian needs to read the bible to a be christian not really. Same with TAOCP and programmers, but the more you read about CS the more complete of a programmer you become.

For example i never thought i would use the basic compiler knowledge i gained during my bachelor. But at one of my first consulting gigs it did helped knowing about abstract syntax tree, where you can add and remove nodes. This knowledge helped me create a highly automated refactoring tool for an old but massive enterprise code base.

This was the only situation in my whole career for now where i needed this knowledge, the rest has all been about creating webpages and rest apis :p

Re: Ask HN: Is Knuth's TAOCP worth the time and effort?

#26
I worked through parts of TAOCP when I was a graduate student (and by parts I mean a very small, tiny fraction of the book). It was highly useful to demonstrate rigorous techniques of how we can analyze algorithms, and I used it a couple times as a reference material. I would only recommend the book to people who want a career in academic CS or are looking for an exhaustive theoretical understanding of the topics covered. A "proper" read of one TAOCP volume would probably take in excess of a year for a well-prepared reader.

TAOCP is extremely rigorous and detailed, the discussion of any topic there will cover every detail. For practical software engineering, it's not useful, you don't deal need that level of theoretical understanding as a software engineer (if you're one of the few who need it, you'd know you are). And you need a very solid mathematical background to actually understand it.

If you want to understand the theory of CS algorithms, I think the CLRS "Introduction to Algorithms" is an excellent textbook. It covers about everything most people are likely to encounter, has comprehensive mathematical analysis but is much easier to follow than TAOCP. For an understanding of the mathematics involved, Concrete Mathematics is a good book, it teaches the mathematical concepts and tools that are the foundation of other, more rigorous books.

Re: Ask HN: Is Knuth's TAOCP worth the time and effort?

#28
post #6

Earlier quoted context omitted.

Thanks for being honest about it. Sad to see that it's downvoted. I guess people spent the time and effort and don't want to admit it might not have been valuable.

Maybe people are still in a denial that all companies want is some LeetCode and funny scripting languages.

I think LeetCode is one of the activities where it is worth reading TAOCP, more than for most coders actual jobs.

Re: Ask HN: Is Knuth's TAOCP worth the time and effort?

#29

Your milage will vary. I got zero value from the books. They do make a good doorstop though.

Same. I bought physical copies years ago but ended up giving them away.

The main problem is that algorithm examples are specified in a fake machine code. It’s not that useful when things can just be Googled now.

Re: Ask HN: Is Knuth's TAOCP worth the time and effort?

#30
A little bit of history about the book series may help understand what is in it.

In 1956, Knuth graduated high school and entered college, where he encountered a computer for the first time (the IBM 650, to which the series of books is dedicated). He took to programming like a fish to water, and by the time he finished college in 1960, he was a legendary programmer, single-handedly writing several compilers on par with or better than professionals (and making good money too). In 1962 when he was a graduate student (and also, on the side, a consultant to Burroughs Corporation), the publisher Addison Wesley approached him with a proposal to write a book about writing compilers (given his reputation), as these techniques were not well-known. He thought about it and decided that the scope ought to be broader: programming techniques were themselves not well-known, so he would write about everything: “the art of computer programming”.

This was a time when programming a computer meant writing in that computer's machine code (or in an assembly language for that machine) — and some of those computers were little more than simple calculators with branches and load/store instructions. The techniques he would have to explain were things like functions/subroutines (a reusable block of assembly code, with some calling conventions), data structures like lists and tries, how to do arithmetic (multiplying integers and floating-point numbers and polynomials), etc. He wrote up a 12-chapter outline (culminating in "compiler techniques" in the final chapter), and wrote a draft against it. When it was realized the draft was too long, the plan became to publish it in 7 volumes.

He had started the work with the idea that he would just be a “journalist” documenting the tricks and techniques of other programmers without any special angle of his own, but unavoidably he came up with his own angle (the analysis of algorithms) — he suggested to the publishers to rename the book to “the analysis of algorithms”, but they said it wouldn't sell so ACP (now abbreviated TAOCP) it remained.

He polished up and published the first three volumes in 1968, 1969, and 1973, and his work was so exhaustive and thorough that he basically created the (sub)field. For example, he won a Turing Award in 1974 (for writing a textbook, in his free time, separate from his research job!). He has been continually polishing these books (e.g. Vols 1 and 2 are in their third edition that came out in 1997, and already nearly the 50th different printing of each), offering rewards for errors and suggestions, and Volume 4A came out in 2011 and Volume 4B in 2023 (late 2022 actually).

Now: what is in these books? You can look at the chapter outlines here: https://en.wikipedia.org/w/index.php?title=The_Art_of_Comput... — the topics are low-level (he is interested in practical algorithms that one could conceivably want to write in machine code and actually run, to get answers) but covered in amazing detail. For example, you may think that there's nothing more to say about the idea of “sequential search” than “look through an array till you find the element”, but he has 10 pages of careful study of it, followed by 6 pages of exercises and solutions in small print. Then follow even more pages devoted to binary search. And so on.

(The new volumes on combinatorial algorithms are also like that: I thought I'd written lots of backtracking programs for programming contests and whatnot, and “knew” backtracking, but Knuth exhausted everything I knew in under a page, and followed it with dozens and dozens of pages.)

If you are a certain sort of person, you will enjoy this a lot. Every page is full of lots of clever and deep ideas: Knuth has basically taken the entire published literature in computer science on each topic he covers, digested it thoroughly, passed it through his personal interestingness filter, added some of his own ideas, and published it in carefully written pages of charming, playful, prose. It does require some mathematical maturity (say at the level of decent college student, or strong high school student) to read the mathematical sections, or you can skim through them and just get the ideas.

But you won't learn about, say, writing a React frontend, or a CRUD app, or how to work with Git, or API design for software-engineering in large teams, or any number of things relevant to computer programmers today.

Some ways you could answer for yourself whether it's worth the time and effort:

• Would you read it even if it wasn't called “The Art of Computer Programming”, but was called “The Analysis of Algorithms” or “Don Knuth's big book of super-deep study of some ideas in computer programming”?

• Take a look at some of the recent “pre-fascicles” online, and see if you enjoy them. (E.g. https://cs.stanford.edu/~knuth/fasc5b.ps.gz is the one about backtracking, and an early draft of part of Volume 4B. https://cs.stanford.edu/~knuth/fasc1a.ps.gz is “Bitwise tricks and techniques” — think “Hacker's Delight” — published as part of Volume 4A. Etc.)

• See what other people got out of the books, e.g. these posts: https://commandlinefanatic.com/cgi-bin/showarticle.cgi?artic... https://commandlinefanatic.com/cgi-bin/showarticle.cgi?artic... https://commandlinefanatic.com/cgi-bin/showarticle.cgi?artic... are by someone who read the first three volumes in 3 years. For a while I attended a reading group (some recordings at https://www.youtube.com/channel/UCHOHy9Rjl3MlEfZ2HI0AD3g but I doubt they'll be useful to anyone who didn't attend), and we read about 0.5–2 pages an hour on average IIRC. And so on.

I find reading these books (even if dipping into only a few pages here and there) a more rewarding use of time than social media or HN, for instance, and wish I could make more time for them. But everyone's tastes will differ.

Post reply on HN