Book review: Data Structures and Algorithms For Game Developers

It’s not the first time I start a book and I lay it down a few pages latter because the quality was low. I had to do this, because it was really a waste of time.

Content and opinions

Even if I had a bad feeling about this book, I tried to remain impartial. But as soon as the first chapter started, I knew that it would be hard. At the beginning, the author gives code for the bubble sort algorithm in C++, C# and Java. I don’t know about the C# and Java versions, but the C++ one is badly written, without good use of the C++ standard library. It goes on with hash_* containers claiming to be part of the STL when they are not (they are in the SGI STL, but they didn’t make it in the C++ standard last time I checked).

Array definition seems to be unknown, as the author claims that inserting elements in an unordered array is done in constant time. It depends, inserting anywhere or at the end? Anywhere is O(N), and at the end can be made in amortized constant time, not O(1). It seems that inserting is pushing for him (two different operations!), and according to the code he provides for his custom array class, the insertion is clearly in O(N) (worst case scenario). Strangely, he forgets to give the performance of the different methods for removing and expanding. There is a mention of Amortized constant time, but it is connected to nothing, so you don’t know how to make use of this.

Conclusion

I only managed to read the first and an half chapter of this book. I could not get further, the low code quality, bad knowledge and shortcuts were overflowing. It’s not the first time this author writes such a bad book, and I don’t know why editors keep on asking him to write articles for websites or books.