5 ms·
Ask HN: Is "The Art of Computer Programming" worth investing in?
I am considering buying Knuth's signature computer science textbook, 'The Art of Computer Programming'. While the book is expensive and quite extensive, I'm wondering if it's worth the investment, especially as a full stack web developer. Can you provide some insights on whether this level of computer science is valuable for my career development?
- adastra22 4y agoArt of Computer Programming is one of those voluminous tomes you buy to put on your bookshelf and never actually read. Why don’t you check it out from the library and decide for yourself?
- xupybd 4y agoThanks that's a great idea. I'm more worried about the time investment than the cost of the book. But giving it a go is probably the best way to find out.
- adastra22 4y agoJust skim it and read a section or two to see for yourself. It's been more than a decade since I read any of it, but IIRC it's a from-first-principles build up of theoretical computer science. Basic algorithms, stuff like that. It is foundational, but it is also common knowledge and covered in tons of other very good textbooks. I usually recommend people read "Algorithms" by Sedgewick instead.
- slavapestov 4y ago> I usually recommend people read "Algorithms" by Sedgewick instead. I mean, they’re not really comparable. One will teach you computer science and algorithms. The other will tell you about Bernoulli numbers and the Gamma function, with a historical aside about the solution to the cubic equation, and then show you a neat trick for encoding some linked list manipulation in a handful of instructions on a fantasy CPU.
- adastra22 4y agoYou are correct. Let me rephrase: if, like OP, you are a working professional wondering if you should get a firmer foundation in your field by reading Knuth, my recommendation would be to read Sedgewick first. (Or one of many other comparable works; Sedgwick is just the one I used.) The useful, practical knowledge is roughly the same in both works. But Knuth comes at it from a very unique, principled, ab initio perspective that is perhaps more valuable if you want to go into academic research.
- antoineMoPa 4y agoI also successfully used it to raise my monitors by a few inches for comfort. Sometimes I did try to read a few pages but I was mostly admiring the typography.
- adastra22 4y agoYou got more use out of it than most.
- bell-cot 4y agoHow often do you find yourself needing to deeply understand the sort of "low-level" algorithms that "The Art" is about? How interested are you in pivoting your career toward roles which would benefit more from such understanding? How often would having such fancy volumes on your bookshelf boost your professional cred or self-esteem?
- xupybd 4y ago> How often do you find yourself needing to deeply understand the sort of "low-level" algorithms that "The Art" is about? I rarely find myself needing to understand the "low-level" algorithms that "The Art" book talks about. This is because I don't typically work at that level in my professional or personal projects. In fact, most of my personal projects involve functional languages, where I prefer to work at the highest level possible. While understanding low-level algorithms can be useful in certain contexts, it's not a priority for me in my day-to-day work. > How interested are you in pivoting your career toward roles which would benefit more from such understanding? I'm not particularly interested in pivoting my career towards roles that require a deep understanding of low-level algorithms. Instead, my focus is on improving my current role. I believe that my lack of understanding in this area may be hindering my ability to excel in my current role, so I am more concerned with addressing that than pursuing a career pivot. By gaining a better understanding of these concepts, I hope to improve my performance and advance in my current role. >How often would having such fancy volumes on your bookshelf boost your professional cred or self-esteem? I personally don't believe it would achieve either of those goals for me. In fact, I prefer E-books over physical books because I don't have to worry about storing them. Additionally, I enjoy being able to read on my phone and multitask while traveling or waiting at the dentist. For me, the convenience of E-books far outweighs any potential benefits of having physical books on display. In my experience, investing time to grasp the fundamentals of my work has had the greatest long-term impact on my abilities. Certain concepts have universal applications, such as a basic understanding of sets. This has helped me not only in SQL, but also in various other domains. By having a solid foundation in these fundamental concepts, I have been able to improve my overall proficiency and excel in my work.
- 4y ago
- h2odragon 4y agoIts a great set of books to have in the bathroom. Crack it open anywhere and there's something interesting.
- smegsicle 4y agono thanks ill just put it on my cell phone
- inasio 4y agoI recently had to work on SAT problems (and SAT solvers), the relatively recent material he wrote on them (section 7.2.2.2, close to 300 pages!) has been amazing, I sometimes just open a random section and go through it, super readable and informative. I'd highly recommend it, especially if you can have direct use of it.
- simon_acca 4y agoI use it as a reference, perhaps 4/5 times a year. Usually I reach for TAOCP with a reasonably clear idea of what specific problem I’m trying to solve and what class of algorithm I’ll try to find in there. So if you find yourself in this position at times, then might he worth the investment, otherwise I’d perhaps go for something like the Cormen instead, which can actually be pleasantly read cover to cover to get a better sense of the landscape, so to speak. Personally I wouldn’t read TAOCP from cover to cover, the uncompromising rigor makes it quite the tough read.
- kevviiinn 4y ago>Personally I wouldn’t read TAOCP from cover to cover, the uncompromising rigor makes it quite the tough read Seconded. I tried, it hurt
- _madmax_ 4y agoI agree. It hurts. It hurts bad.
- anta40 4y ago+1. For practical use, Introduction to Algorithms may be a overall better reference. Probably TAOCP is only useful if you are doing CS research, where heavy mathematical analysis is often needed.
- Turing_Machine 4y agoEven the CLRS Introduction to Algorithms is maybe a little heavy if you just want to use the algorithms. If you're in that category, the Sedgewick "Algorithms in (language of your choice)" books are probably the best bang for the buck. There's also Jeff Erickson's Algorithms book, which is available free online. http://jeffe.cs.illinois.edu/teaching/algorithms/ http://jeffe.cs.illinois.edu/teaching/algorithms/ Disclaimer: I had Erickson as a professor many years ago (though I strongly doubt he remembers me).
- jamestimmins 4y agoI have my copy bc my brother bought it, didn't read it, and realized he hadn't bought me a Christmas gift. It'll remain unopened on my shelf until December 25, 20XX, when I also realize I need a gift for a young programmer.
- dev_0 4y ago[dead]
- slavapestov 4y agoThey’re great books, beautifully typeset, but they’re not for everyone. Meant for people who appreciate math, they go pretty hard. Personally I’ve owned the first three volumes for 20 years now and I still learn something new every time I open them. It will take me another 20 years to work through Volume 4A and 4B. While I can’t say that anything in there has been directly relevant to my work, they’re just fun to read.
- TexanFeller 4y agoZero applicability to your career as a full stack developer. Read it if you truly love computer science, or appreciate it like a work of art, or for the beauty in its mathematical rigor.
- spyremeown 4y agoI used it as a reference for the Welford's method of calculating the mean and variance, and for other random things throughout the years. If you need a solid /reference/ for some mathematical-computerish thing, it's probably there.
- brudgers 4y agoArt of Computer Programming is cheaper than good concert tickets. About half the price of the cheapest iPad. Less than a cattle class round trip flight to Las Vegas. But it will give you a lifetime of intellectual engagement, if that matters to you and there’s nothing wrong with you if doesn’t. My recommendation is it is a great way to practice at reading things you don’t understand and learning something from the experience. But if being ignorant and afraid of its content feels like a badge of honor, ok by me. I ain’t your mom. Good luck.
- xupybd 4y agoWow you really took a good swipe. I'm not sure what triggered that. It's the time cost I'm worried about. There is significant opportunity cost in reading a big text book. Especially with a young family on top.
- brudgers 4y agoI am disinclined to give you another excuse not to engage with the foundational text of computer science. It's not as if there's a midterm in three weeks and a final grade at the end of the semester. You have the rest of your life to take stabs at it. Or to fear it. Reading it has tradeoffs. So does not reading it. So does asking for opinions about reading it. As does expressing an opinion. Do you want to be the kind of parent who engages in lifelong learning?
- boonsuan 4y agoa love letter to the art you can roughly split the art of computer programming as currently written into ten major arcs, each around 300–400 pages (including the answers to exercises): 1 introduction (math prerequisites, assembly programming) 2 data structures (lists, stacks, queues, trees, memory allocation, etc.) 3 random numbers (generating random numbers, testing for randomness) 4 arithmetic (floating points, polynomial arithmetic, etc.) 5 sorting 6 searching (comparisons, hashing, etc.) 7.1 binary tricks (includes binary decision diagrams) 7.2.1 generating combinatorial structures (combinations, permutations, partitions, etc.) 7.2.2.1 the exact cover problem 7.2.2.2 satisfiability now, in any other book, each of these parts would maybe be 50 pages or so, and the whole thing would fit in one 500 page book. but don knuth is interested in the art, and the art is in part about understanding things as clearly as possible. that means understanding at an instruction by instruction level what is happening in the machine, and finding the appropriate mathematical structures that give insight into what algorithms are really doing. don is interested in thinking and writing as clearly as possible, but without sacrificing detail and resorting to handwaving. this is a difficult balance, because the material itself is hard. this means that when don wants to understand sorting, he devotes 50 pages to the mathematics of permutations (section 5.1), and that he creates an idealized RISC-V architecture (MMIX) with a meta-simulator that supports all sorts of pipelining, caching, virtual address translation, etc. systems, so that he can count the exact number of memory accesses made at the machine level, so as to analyze a sorting algorithm. this means that when he wants to investigate combinatorial structures like graphs, but lacks a good class of test cases, he goes off and writes a 600-page book (The Stanford GraphBase) so that he can have consistent example data for writing about graph algorithms. another part of the art is to gain an appreciation of the tapestry of human thought as it is woven through the centuries and millennia. don does his best to trace the roots of ideas, carefully studying all sorts of manuscripts from the past, in German, Latin, French, and really anything he can get his hands on. he traces the full names in their original languages of all people mentioned in the art, with the index of volume 4A spanning 50 pages. section 7.2.1.7 explores the history of combinatorial generation through old Chinese manuscripts, Sanskrit prose, the meter of Greek poetry, and so much more, showcasing the spirit of the programmer as it goes back hundreds of years before the advent of the program. much of the art lives in the exercises. there are more than 4000 of these exercises throughout the art; many sections ending with at least 50 of them. many of these exercises are an entire research paper, where don has digested it, as well as the papers surrounding it, and provides in the exercise a skeleton of essential ideas that gave life to the paper, leaving you to coat those bones with flesh. he reads a hundred papers or so before writing each section, working in what he calls “batch processing”, and studying in chronological order the papers that form the lineage of a topic from genesis to present day. the art is a living work. the third edition of volume 1 has gone through 52 printings since 1997, and many more printings if we count from the first edition of 1968. since 1968, don has read through thousands upon thousands of letters from readers, with comments ranging from suggestions for new material, to petty remarks like “i think this comma here should be a semicolon instead.” he will read it all and think it through, because he wants to get it right. he then scribbles his reply in pencil to your email printed out, and you get it back by snail mail half a year later, with a reward ‘check’ if he used your suggestion. every printing incorporates many little changes all over the place, and no two printings of the art are the same. just last week he inserted a new exercise into section 1.3.3 for the 53rd printing of volume 1, to anticipate new material in 7.2.2.8 he just wrote on decoding the Enigma machine (https://www-cs-faculty.stanford.edu/~knuth/fasc9b.ps.gz https://www-cs-faculty.stanford.edu/~knuth/fasc9b.ps.gz), as an example of applying backtracking. the art is the pursuit of beauty. after the galley proofs for the second edition came back in 1977 with shoddy typesetting, he spent a decade on TeX, because, well, the letters have to look right in the words, the words have to look right in the paragraphs, and the paragraphs have to look right on the page. and part of beauty is fun, without the search for applications. volume 4b is full of puzzles with little attempt to justify their utility — master the art, follow the beauty, and utility will come along naturally later. the art is a love letter to the spirit of computation, written with the nothing less than the entire life and force of don knuth. and that’s a lot — don knuth works really, really hard, and he continues to write the art at the age of 85 today (he’s now writing 7.2.2.3). so you ask, should you read the art? i say: if you are longing to find, to understand the beauty in these ideas, and to really come to see the very pulse of the machine. goals of utility and efficiency will not be best served here — there are many better books for such purposes — for to view through this lens the art, it would perhaps amount to mere diminishing returns. (that said, you will certainly be a better programmer if you read his book! it might just take a while.) don wants to get it perfect, as perfect as a human work can be, and has spent his life seeking this beauty. the art is his adventure logs, and thank God he should have chosen to share them with the world.
- jhp123 4y agoif you like a more functional POV then I would highly recommend Pearls of Functional Algorithm Design (Bird) and Purely Functional Data Structures (Okasaki)
- xupybd 4y agoThanks, I'll take a look.
- dyingkneepad 4y agoI read pieces of it during CS University that were applicable to whatever we were studying/implementing at the time. Got it form the library. Was worth it. A decade later I bought it because I wanted to understand something about the selection of a specific hash function for a hash table that every book was using and no one was explaining, everybody was just referencing Knuth. That function was used in my job (in fact, the hash table at work was exactly the one Knuth had proposed). While Knuth had an explanation for it, I was not happy with it. After a ton of online researching and even reading some papers from the 70's I found an understandable explanation in a blog post by a random not-famous programmer. One day I'll read it. But my Comic Book collection and Video Game backlog has been taking the priority for a while.
- danwee 4y agoNever got that kind of perspective. You read a book if you think you'll like its content. Period. Knuth's books are no different. You probably know many colleagues of yours that have never read a technical book in their lifes and still manage to be successful with their careers. Just read the book if you like CS. Period.
- MattPalmer1086 4y agoI would say not worth the investment unless you know you will be working on very computer sciencey things. Having said that, I have the first 3 volumes in my shelf and I do look at them occasionally. But I mostly like having them just because they are so iconic. Shallow yes, but makes me happy.
- warrenm 4y agoI've always wanted to buy a copy .. but other books end up getting my attentio instead
- flashgordon 4y agoWithout answering the rest "this level of investment in CS" is something always worth absorbing. You don't have to do it as a full time course. But having the passion for that learning and having those tools in your toolbox is always worthwhile IMO. You never know when the next problem you solve will have an answer in CS theory and algos etc. Now do you need this particular set of books to get you to that goal? Like many others who have never even to touched these master pieces - Hell yeah (if you can afford it). It's like the War and Peace of cs books - may be just much less dry!
- swah 4y agoI'd love to give away mine if anyone in Brazil wants it. Couldn't sell it... I just bought it cheap because of the beautiful edition and paper. Love that old paper they used to use.