As an EE turned software engineer I missed on on the computer science basics. Are the Donald Knuth "The Art of Computer Programming" books worth buying as a reference for filling in the gaps? Or as a reference in general?
IMHO Knuth's books (though it's been long since I read them) are more of a general reference than an easily-applied textbook. If you are looking for a book that is oriented at someone learning these concepts but without dumbing them down and with sufficient breadth, I would suggest Cormen and Rivest's Introduction to Algorithms.
They are a true classic, and if you need that information, that's an excellent place to get it.
That said, many software engineers these days don't implement those sorts of algorithms much, if at all. Rather, they just use implementations of these things in the libraries. If that's what you intend to be doing for the rest of your career, you may not find learning that sort of stuff so important. You can have a long and profitable career as a programmer without knowing that stuff.
I think it would be overkill for most programmers. Most of the concepts you need could be found in a much more succinct book.
TAOCP is very long and filled with problems that range from easy to PHd material.
The books deliver the theory quite nicely, which is good if (and only if) you actually need to understand the theory of those algorithms. If you are planning on using the algorithms via library methods, but not construct your own, then Knuth's books are likely going to be way more information than you need. The basics of the various algorithms can be found online or in a variety of textbooks, which will provide you with sufficient information for selecting the most appropriate algorithm for your situation.
Are the Donald Knuth "The Art of Computer Programming" books worth buying as a reference for filling in the gaps?
Oh, yes.
As an EE + SE (2 courses crunched into 1) I did get the computer science basics. As an inveterate reader I read TAOCP in the library and discovered just how big the gaps were - Knuth points out gaps in places you don't know there are places. After I graduated I bought my own set (they seemed expensive at the time, but a lot of EE texts put them to shame). He has since revised volumes 1 to 3, and released bits of volume 4 - I haven't read the new editions but expect that some of the mid-'70s-ness of the originals has been updated.
Many questions of the form "How do you calculate/solve X?" can be answered "Knuth did it", although it is pretty heavy going in many places.
You can pretty much get all the algorithms described in the books from web and other sources. But the detail and in depth discussion that Knuth provide is worth reading. It will provide you very good understanding of mathematics involved behind the design and execution of the algorithms.
As an aside they add great value to your personal library :)
you might not need Donald Knuth's books, but do pickup a book or two on data structures and algorithms. try introduction to algorithms: www.introductiontoalgorithms.com. or watch some videos from berkeley/MIT. while you might not really need it to program, the difference between just coding blindly and understanding how things work is night and day. have you ever meet a good/great software engineer who didn't know the basics?
This depends on what kind of programming you are going to be doing.
As academic reference works they are superb, particularly for topics in combinatorics. If you are implementing low-level arithmetic or often finding that you need to know things like the history and theory of algorithms for sorting using tape drives, then you really want these books. If you're a work-a-day programmer maintaining a shopping cart component, then Knuth is overkill. An algorithm book that holds your hand by using Java, or C, or Python is probably going to be a more useful investment.
I've owned the set for almost three decades now, but I've mostly just picked them up from time to time to try to learn about the theory of algorithms in the abstract. Only once did I actually use them to solve a combinatorics problem I ran into at work.
The short answer to whether Knuth's Art of Computer Programming are worth a buy is a definitive yes.
I've read Volume I and some sections from his more recent fascicles; and have the following experience to share:
- The books can be usually read at a relatively normal pace provided one doesn't try too many exercises. The exercises have a tonne of useful stuff, but they take time to complete because of their number and complexity. Even if one cheats and peeks at the answer right away; just understanding Knuth's (sometimes brief) fragments of the answer takes time.
- For many of the algorithms that have a complex analysis or correctness proof associated with them, these are posed as exercises and the details given in the answers; so usually the math doesn't get in the way of reading the main text.
- Certain sections are marked with a star and these can be omitted on the first reading.
- One thing that appears to turn many people off is that the book uses an assembly language for the hypothetical MIX computer (now MMIX). However, most (all?) programs have the corresponding algorithm described in English as well, so if assembly seems to technical to you, you can skip it.
- The math at some places can get a bit hairy at times; but again it is usually related to the analysis of the algorithm (or sometimes correctness). If you're just interested in the action of the algorithm, you can omit it.
- And if you begin to take an interest in algorithms (and the math behind it), then these books are a treasure trove of beautiful exercises. You could systematically start attacking the exercises then.
Some downsides, must, however be mentioned:
- Given the times during which these books were first written and perhaps also Knuth's own preferences, they do not cover algorithms in many important areas -- Computational Geometry, String Searching being major ones that come to mind. Graph & Network Algorithms belong to the volume currently under preparation.
- In the first 3 volumes at least, the chapters/sections are not divided into things like "Greedy Algorithms", "Dynamic Programming", "Branch and Bound" etc. Nevertheless, these techniques almost surely appear implicitly in the design of algorithms.
So, in short, you could get a lot of mileage from these books even if you skip most of the analysis, correctness proofs and exercises.
However, if you're looking for an all-round coverage of all kinds of algorithms (including computational geometry, string searching, graphs and networks, parallel algorithms) and looking for dedicated chapters on design techniques (greedy, dynamic programming, ...), then perhaps Introduction to Algorithms by Cormen et al would be better suited for your needs.
Yes.
It wouldn't give you everything but it would give you a concrete idea why and how of various algorithms which definitely would help you to think better during implememntation phase.
No.
Personally I find TAOCP books too complex and heavy on math. When I see myself and other successful software developers who haven't read it, I seriously think what difference it could have made. If we see around, out of thousands of developers on the face of earth (and the number is increasing on daily basis especially in eastern countries such as India, Pakistan etc), how many software developers have really read it?, I am sure only very few. But isn't software industry still running quite successfully and growing?? Perhaps then the real question is how often developers use/implement advanced data structures and sorting/searching algorithms etc. There remains only little motivation for that especially when everything is available in form of libraries. I therefore think that unless someone is really implementing these concepts or perhaps doing PhD in core computer science disciplines, it wont make much difference if he/she reads it or not.
Whilst my personal answer is an overwhelming yes, I can appreciate that the style, prerequisites and aims of TAOCP do not suit everyone.
I've been reading Knuth's books for almost thirty years so perhaps I'm getting used to them (and I'm on my second or third copy of volumes 1, 2 and 3). An analogy could be made between the teaching of mathematics at school (up to age 18, say) and the approach taken in a University level Mathematics degree: e.g. increased rigour, knowledge of why the rules of thumb and shortcuts work (and when they might not) and understanding the development of the subject.
The comment of looking at one of the more recently-written parts of chapter 4 before committing to the whole work is valid and a couple of these are now available on the O'Reilly Safari service, if you subscribe to that. Some parts of later works can be difficult without having some familiarity with earlier results and conventions but detailed reading of all the earlier material is not needed and there are parts that can be skipped if your aim is later in the work.
Do give TAOCP a try, but be prepared to give it some time and some work to get the best from it.
I have no familiarity or experience of computer programming. In fact, I only understood recently how binary numbers work. But I am an undergraduate of Maths. Wanting to learn computer programming from a good theoretical work, I picked up Knuth. With great difficulty I have crossed 3 pages, and on the 4th page itself he introduces memory and registers with annotations M[0], M[1],...., Loading and Storing etc which I don't grasp.
My question is that given my level of unfamiliarity with computing, even though I understand Math, should I pursue with Knuth, and if so, how?
- A