Live data from Hacker News

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

news.ycombinator.com

11–20 of 141 posts

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

#11
pipeline stalls, designing for cache performance, branch prediction, multithreading, etc.

Those are issues for a subset of computer hardware. Embedded computing is still huge and has drastically different performance requirements. TAOCP is designed to stand the test of time, not focus on micro-optimizations that generally have limited performance impact and are a waste of time 99% of the time.

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

#12
Disclaimer, I only read the first book.

Depends what you want from it. I used the first book to study for my Bachelor's degree final state examinations, and it served me well :-)

In other words, yes it is very academical, in the truest sense of the word.

From what you say, that you want it to "mention of pipeline stalls, designing for cache performance, branch prediction, multithreading, etc.", you might find better use of Andrew S. Tanenbaum books. I have only read his Computer Networks [1], but it has saved me at least 14 hours of boring lectures at uni, and helped me with some protocols work. He still does research in distributed OS-es, so would hope, that rest of his books would have same amount of readability and usefulness as the one I have read :)

Back to Knuth, if think you have no use in mathematical formalism, or college math in general, you will probably find it little more than intellectual entertainment.

There are of course areas where having formal theory of a thing is beneficial when programming, even if you yourself don't apply it (i.e. the chapter on random numbers seems like something everybody touching any code related to security should read, i.m.o)

But even then, if you suddenly need to learn more math theory, there are probably better sources than Knuth.

As somebody who finished my Msc already, I like it as my intellectual entertainment just fine :)

[1] http://www.mypearsonstore.com/bookstore/computer-networks-97...

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

#14
TAOCP is a fundamental work teaching fundamental techniques. If you can master it, pipeline stalls, designing for cache performance, branch prediction, multi-threading, etc., are easily understood problems and you have the tools to then attack most any other computational problems that are likely to come along.

Sounds like what you want is a prescriptive tutorial addressing a set of specific computing problems. That's not what TAOCP is.

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

#16
Some people read it cover to cover, and the few I know also happen to be the best computer scientists I know of. It is hard to come by a comparable compilation of best algorithms in one place, so I occasionally have to refer to it. I wouldn't think of reading all of it, because I don't think I have the time, but it is a page turner if you are into algorithms.

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

#17
There would be better ways to spend your time than TAOCP.

If you want to scratch that itch, a better way would be Cormen, Leiserson, Rivest, and Stein's Intro to Algorithms (https://mitpress.mit.edu/books/introduction-algorithms).

I'm not aware of such a universal reference for the interaction between algorithms and architecture ("...pipeline stalls, cache performance, ...").

Until that day comes...TAOCP sure looks nice on the bookshelf.

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

#18
post #5

The term programming here is used with the same semantic definition as "dynamic programming" or "linear programming". Don't expect the book to touch on how to code fast algorithms, rather expect Knuth to teach you the inner workings of the algorithms regardless of their implementations. Computer science and software development are usually thought to be the same by non computer scientists, but in reality computer sci…

Umm, no. "Programming" in "TAOCP" actually refers to "making step by step recipes for a computer" to execute (and is prefixed by the word "Computer" to make this clear). In "linear programming" it refers to something completely different, namely the planning of the use of resources or optimization. "Dynamic programming" is yet something else: a narrow cluster of techniques having to do with memoization in order to help an algorithm identify overlapping subproblems and avoid re-computing them.

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

#19

> based on its stellar reputation as one of the indispensible, foundational computer science books that every programmer should read. A while back, I was joking with some friends that TAoCP is to the programming world what Finnegans Wake is to English literature: you're not supposed to read it, nobody's ever actually read it. We all just say we've read it, talk about how brilliant it is, and place it prominently on o…

And this shows a huge folly in our industry.

Short answer, is the book easy? Of course not. Is it dated in approach? Yes. Sorta. What would make it better? A modern language? Why?

Consider, just yesterday there was someone designing an elevator system using python. That is literally one of the first examples in TAoCP.

Not long ago, there was an article about how linear search with sentinel values is actually faster than binary search for many data sets. This is, again, one of the first treatments of searches in this text.

I'm waiting for someone to rediscover that you can make a tree for depth first traversal, such that you do not need to use a stack. Again, one of the early topics in these books. Curious about different characteristics of Tries/Trees/Lists/Hashes?...

Is it worth the time to read end to end? Almost certainly not. The math heavy sections are definitely going to scare off a lot of people. Myself included. This mainly means to skim the exercises.

But, there is a lot to offer in the industry of programming. Knuth picked an order to offer this information and is going in that order. The latest topics he is just now getting to are hugely relevant in many endeavors and I recommend people at least be aware of them.

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

#20
So long as you don't spill coffee on it, you can always resell it.

I got a set when a coworker jumped ship with no forwarding address and left all his books. It seems useful for people implementing languages and standard libraries, less useful for people using them.

Post reply on HN