Home Page -------------------
[Home Page] - [Reviews Main]
-------------------

Book Review
C Elements of Style by Oualline
Recommended
ISBN: 0-13-148222-X       Publisher: Prentice Hall       Pages: 265pp       Price: £17-50
Categories:   style     advanced c     advanced c++    
Reviewed by Adrian Wontroba in C Vu 6-2 (Jan 1994)
This book sets out a C and C++ programming style with two aims:

  1. To make programs readable, both to the author and to others
  2. To make programs reliable

Like his earlier 'Practical C Programming', it is based upon his own experience. Some of the text from the earlier book has been recycled in this one.

This attractive and readable book is divided into two parts and a couple of appendices. It could have been packed into far fewer pages.

In Part 1 (160 pages - the bulk of the book) he covers program organisation, commenting techniques, module design, variable names, format (i.e. where to put white space, but with no mention of formatters such as cb or indent), the preprocessor, C++ style, makefile design and user-friendly programming. His general approach is to discuss a topic, give examples and the possible consequences of good and bad style and derive some rules, such as 'Rule 4-13: Avoid side effects'. Each chapter ends with a summary of the rules. In general his advice is good. However, I do have some qualms about ensuring uniqueness of common names by prefixing them with an underscore.

Part 2 is a style manual - a 30 page ready reference precis of Part 1.

The appendices contain example programs and the rules again (what I tell you three times is true?). Like all good books, it also has a table of contents and an index.

Overall, a worthwhile book which should help to reduce the incidence of 2 am debugging sessions. It does however have much more cost effective (i.e. free) competitors, such as the Indian Hill Style Guide in its various incarnations and Rob Pike's 10 page collection of short essays. Yes, more candidates for the issue disc.


Other Authors with the same surname

Oualline
Advanced C Programming by Steve Oualline  (Reviewed Jul 1993)
Practical C Programming 3rd Edition by Steve Oualline [Not Recommended]  (Reviewed Nov 1998)
Practical C++ Programming by Steve Oualline [Not Recommended]  (Reviewed Nov 1995)


Last Update - 13 May 2001.

To link to this review, please use the URL: http://www.accu.org/bookreviews/public/reviews/c/c000262.htm

Copyright © The Association of C & C++ Users 1998-2000. All rights reserved.

Mirrored from http://www.accu.org/