Book Reviews »

 

C: A Software Engineering Approach, Peter A.Darnell; Philip E. Margolis. Springer-Verlag.

 

This is one of my favorites. It might be due to the fact that it was one of the first programming books that I ever bought, but it has since then been a constant reference.

The book starts to describe the development and the process how source code is compiled to object code and then linked into executables. It continuous with how to divide the programs into functions and then step by step introduces new levels of types, control flow, operators and expressions.  When the basics are explained user defined data structures are introduced. All aspects of pointers are thoroughly explained. The standard C library is also described. The authors even added a chapter about good practices in software engineering. This is a big topic and there are many books that only try to attack this discipline. But I think that most of their advices are still relevant after 19 years.

It is intended for beginners and intermediates and explains all relevant C conventions I can think of. I really recommend it for anybody that wants to start with C or need an easy to read reference. (If it is possible to still by it)

 

The C++ Programming Language, Third edition, Bjarne Stroustrup, ADDISON-WESLEY.


I finally made it. Almost thousand pages of condensed information about C++. And I must say I liked it. The humble tone about the language, it's history as well as pros and cons with some language constructs was an impressive reading. As Bjarne mentions in the in the end of the initial chapter, A tour of C++, “No language is perfect.” … “Thus C++ was designed to be a good tool for building a variety of systems...” and I fully agree.

The way the reader is brought in to the world of C++ is through a quick a tour of C++ and the standard libraries were the main language features are motivated with clear examples. It is on a high level that communicates the main topics of what will be explained in detail in later chapters.

The detailed part begins with about 150 pages discussing basic facilities like types, expressions, functions, source files and programs. Some space here is used to show how to decouple software modules from each other. This is a very important topic, that is hard to get right, and in my experience seldom mentioned in other literature.

The next part deals with abstraction. About 200 pages that contains everything there is to know about classes, hierarchies, templates and other associated features like operator overloading and exception handling. Now I started to feel more confident in my believe that I ever should be able to create some decent C++ system. If not yet a new part had followed.

Part 3 is dedicated to the standard library. This part is even longer and is covered in 260 pages. It is written in the same convincing way like all the other parts. Strings are straight forward and solves many of the annoying C string issues. I fully realize the power of the standard containers and iterators to loop through containers but as an old C programmer I start to feel slightly uncomfortable. But I guess this is more a matter of habit and it should not be that hard to convert to a better approach. At least not for systems that not have very limited resources. Also the streams library is well motivated and clearly explained, but I am a little bit reluctant to rely on it due to bad experiences in cross compiling old legacy systems with mixed C/C++ code were both C and C++ libraries needed to be included. But this is of course not a shortcoming of C++, it is just an environment issue.

The last part treats the very delicate task of how to design and develop a piece of software that is maintainable and does what it is meant to. It is covered in about 100 pages and has armed me with a set of advices of how to try think and create code in a better way and realise how different C++ constructs are available to enable it.

This was the last part of the book, but 175 pages appendix about grammar, compatibility, technicalities, locales and exception safety in the standard library are also appended. They are extensive and must be considered as an integral part of the book.


When I try to sum up my impression I think that the number of pages for the parts gives some guidance. The first 150 pages deal with C++ constructs that are similar to C. The next 200 pages are about C++ extensions and finally the 260 pages about the C++ standard library features. This clearly indicates the increase in complexity but also the power that C++ has got compared to C. I have not read a more comprehensive book about any other language before.


If you are serious to work with C++ I can't give any other rating than the highest available. This book is a must in your reference library.