REVIEW - Mastering Algorithms with C

Title:

Mastering Algorithms with C

Author:

Kyle Loudon

ISBN:

1565924533

Publisher:

O'Reilly (1999)

Pages:

540pp

Reviewer:

Francis Glassborow

Reviewed:

February 2000

Rating:

2 out of 5

I like the general structure of this book. Each chapter concludes with two sections. The first consists of questions that might naturally arise out of the material coupled with appropriate answers. The chapter then concludes with brief notes on related topics.

I am less happy with the coding style that the author uses to present his material. In many places he relies on #define to 'simplify' his code. I put simplify in quotes because I need some convincing that such things as:

#define list_size(list) ((list)->size)
offer much advantage to compensate for polluting your global namespace with lowercase pre-processor identifiers. Actually what much of the code does is to help me appreciate the advantages that C++ programmers have in this area.

My next reservation is that more than half this book is about data structures. If I had to do these in C I would first spend time on the subject of implementing abstract data types in C before going onto the detail of those structures I chose to cover.

At the end I was left wondering whether this book helps the reader to master programming algorithms and data-structures or just documents the author's library of implementations. If it were the former I would expect to feel confident (as a result of my reading) that I could design and implement some other algorithm or data- structure. However I have a distinct feeling that if I were not already capable of doing that, I would be struggling (badly) with understanding the author's implementations.

My feeling is that this book is best used as a thoroughly documented library with explanations of the implementations. I very much disagree with the back-cover claim that 'Anyone with a basic understanding of the C language can use this book'. You need to be a better than average C programmer to even use the provided implementations. I wonder just how many potential readers are left now that C++ and Java are so widely used.


Book cover image courtesy of Open Library.