REVIEW - Applied C++ - Practical Techniques for Building Better Software


Title:

Applied C++

Practical Techniques for Building Better Software

Author:

Philip Romanik, Amy Muntz

ISBN:

Publisher:

Addison-Wesley Professional (2003)

Pages:

330pp

Reviewer:

Giles Moran

Reviewed:

December 2003

Rating:

★☆☆☆☆


This book is the latest addition to the popular and well-received "C++ In-Depth" series. The introduction states that this is a practical guide to maintaining and developing high quality software. Looking through the book, initial impressions are that the production values of the book are very good. A CD is supplied and has source code listings and some third party software used in the book. Class diagrams use the format used in 'Large Scale C++ Software Design' by Lakos rather than UML. This is odd as the notation in that book was developed in 1996 and the world has moved on since then.

The first chapter details some thoughts on the software design process and an introduction to some basic image processing ideas.

Chapter two moves onto the development of a simple application that turns large images into a thumbprint image.

Chapter three details the development of a custom memory handling class for the imaging system. Allocators and memory alignment are discussed.

A review of templates is included (templates in six pages!) The authors seem unclear on the use of typename vs class in template specification. If you didn't already understand the differences, it's unlikely this will help.

A prototype is developed and a discussion on why prototypes are useful follows. It would have been more readable if these sections were in reverse order. Two further prototypes are developed.

Chapter four covers naming conventions, code reuse and a debugging output class

Threads, exceptions, assertions and internationalisation are discussed in chapter five. This is probably the most useful chapter in the book.

Chapter six is concerned with implementation details for the imaging software example. Some imaging techniques and filters are then covered in detail.

Unit testing and performance issues are covered in chapter seven before advanced topics (use of explicit and const) are discussed. I'm not sure why the authors consider use of explicit and const as advanced topics.

The book suffers from having too much code on display. Entire header and implementation files are listed and only a few functions are discussed. The source code is provided so it's not necessary. The class naming convention is unclear, an ap prefix is used so an Image object is referred to as an apImage object which reduces readability.

Templates are heavily used and it's not uncommon to have five templated parameters in example code. Template parameter names are short and make the code unreadable. Common sense and typedefs would have helped.

Modern C++ is mainly absent. Namespaces warrant seven lines.

The STL is briefly discussed, string, map, vector and list are mentioned but little discussion is given. Algorithms are not discussed. The author's advice is to learn a small subset of the STL and just use that. This is dubious advice.

Design patterns discussion centre around the use of the singleton pattern. They are heavily used. No discussion is given to the disadvantages and no alternatives given.

There is just too much in this book; it covers templates, allocators, C++ idioms (reference counting and handle class), the singleton pattern, exceptions, internationalisation, threads, profiling, performance improvements, XML parsing, image formats, image processing and more in only 300 pages. What is discussed is tightly focused on the given application, such that it's hard to see how it's of any use to you. Comments such as 'Use iterators to access all of the pixels in the image' are given, this comment is only in context with respect to the class given in chapter six of the book. I got the distinct feeling that the application code led to the book's creation and that I was reading a software manual at times. The sections on imaging processing are ok, but there's not enough detail to learn much about the subject.

The introduction mentions development and maintenance of software, if you remove the section on debugging, then there is little on software maintenance or writing maintainable code.

This is a disappointing book, given the quality of other books in this series. It didn't help that the last software book I read was ' Agile Software Development: Principles, Patterns and Practices ', which is a much better book for intermediate programmers to invest in.


Book cover image courtesy of Open Library.





Your Privacy

By clicking "Accept Non-Essential Cookies" you agree ACCU can store non-essential cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

Current Setting: Non-Essential Cookies REJECTED


By clicking "Include Third Party Content" you agree ACCU can forward your IP address to third-party sites (such as YouTube) to enhance the information presented on this site, and that third-party sites may store cookies on your device.

Current Setting: Third Party Content EXCLUDED



Settings can be changed at any time from the Cookie Policy page.