Top critical review
Good attempt, but beware. Not what it seems
April 3, 2018
This was a good attempt at something marvelous, unfortunately it is only that: an attempt; the book falls rather short. I dearly wanted to give a very positive review for this book as the premise of it was incredibly promising. I purchased it, and it sat on my bookshelf several months before I opened it beyond a quick peruse of a few pages. Those brief glances at the opening pages only added to my excitement about sitting down with the book later.
However, once I actually did get the time to read this book cover to cover, I was immensely disappointed. The three stars given are primarily because the book starts off very strong; the coverage of binary search and the intro to Big-O provides precisely what was promised. Yet, these are only about the first 20 pages. After this beginning, the book becomes somewhat erratic, I cannot for the life of me understand why more of the sorting algorithms were not covered. The only sorts covered are quicksort and selection sort. There is a section titled 'Mergesort vs Quicksort' in which merge sort is only mentioned, not described or explained at all, and this is only a single paragraph; insertion sort gets only a sentence.
The book's treatment of recursion is fantastic, but gets at my worst frustration with this book: the author discusses and thoroughly describes basic recursion, providing excellent illustrations of the call stack during execution and tracing the entire execution of a recursive function. At the end of this exercise, he mentions tail recursion (a critical aspect of recursion that more than merited the explanation, which would not have taken much more considering he’d already explained the call stack) and says it's beyond the scope of the book. However, the second half of the book is then dedicated to advanced topics like K-nearest neighbors (solid explanation) and just mentioning things that one would end up studying elsewhere on one's own. A whole chapter is dedicated to Dijkstra's Algorithm (again, solid coverage), which is a somewhat advanced algorithm that benefits from his illustrations and descriptions, but leaves to question, who made the decision to leave out a more complete description of recursion and thorough coverage of searches and sorts in lieu of what at the end seems like filler chapters? Anyone who is at the point of needing to understand those two algorithms likely won't read an illustrated book on the topic; to me, these topics supplant those someone intrigued by the idea of this book might've come seeking.
There are errors, but they're no biggie. The very first piece of code in the book contains an omission that causes it to malfunction (setting of the variable 'mid' should divide the sum of 'high' and 'low' by 2). I came to realize it may have been due to a page layout or typesetting issue as I found the same problem in several chapters. It seems the edges of the code are partially covered by images. The coverage of Big-O beyond the intro chapter is a little weak, and only helped because I had some previous knowledge of the concepts surrounding it, and the fact that much of the explanation is repeated several times, so some bits finally sink in. I could see how someone coming to this book hoping to have 'aha' moments about algorithms would be left very lost.
The author also uses the technique of describing how something works in a simple way and then a section later taking it all back and saying 'this is really how it works'. I've seen this before, and it can be effective, but a writer must take care the manner in which he simplifies the initial example. This happens rather confusingly in the explanation of hash tables (associative arrays) in relation to their performance. If you're following his description of them, its clear that him saying they return values 'instantly' is somewhat odd particularly when you understand what O(1) actually means. When he follows up to clarify, which he does by describing how hash tables can be slow in some cases, the clarification isn't really satisfying as you didn't really absorb the chapter wondering if perhaps you missed something before since hash tables were glowingly described as the data structure to end all data structures. He then goes into discussing (incompletely) the implementation of hash tables, which he keeps saying 'you'll never have to do'. He then trails off with a brief description of things to consider when using them without really implementing a hash table in code as suggested (examples 'using' hash tables are given, but the mention of 'implementing' them comes after this and indicates an upcoming example which never materializes).
I wrote this review only as a warning. The implementation of the book is a solid 2 stars considering the price; the first half gets it to 3. The book is about 50% as described, 50% the author seemingly trying to prove he has a CS degree. Perhaps friends told him the book was too simplistic. Unfortunate. The heavy appearance of 5 star reviews here greatly misled me. Reading them afterward, it seems most are praising the idea of the book and not its actual execution. Had I read it during the return period, I would have returned it. I am a intermediate-level programmer. I understood most of these topics at a basic level beforehand. I ordered this book because I had been recommending it to others, who wanted to learn about algorithms from scratch, as the premise of it sounded excellent. I finally decided to read it myself since I've been raving about it for the last year; I wish I had read it first. It's a fun read, but don't expect any epiphanies. If you're a beginner, you're actually better off searching "basic sorting/searching algorithms" online and learning from YouTube videos until you can grasp the content of a college textbook (or one of the programming interview prep books which cover algorithms very thoroughly without the math of a university text). This book starts off great, but finishes more like a set of blog posts written over the course of a year, by a person who couldn't wait to prove to you how smart he was becoming day by day. I know many times a project can start off as one thing, and then after input by many people and via your own desires to do something great, lose its way; it seems that may have happened here with the author deciding that the basic algorithms were too mundane, and choosing to try and explain more impressive concepts which somewhat ironically, are ‘beyond the scope of this book’.