Computing Reviews

Intermediate C programming
Lu Y., CRC Press, Inc.,Boca Raton, FL,2015. 498 pp.Type:Book
Date Reviewed: 09/30/15

Software development, especially development in the large, is a demanding, multi-faceted endeavor: designing, coding, testing, debugging--each task demands strict attention along the way. Even after software systems are delivered, hidden bugs have a nasty tendency to show up. Testing is known to uncover errors, but cannot guarantee their absence. The best solution is, of course, not to introduce bugs in the first place, but that is easier said than done. Many programmers pick up useful strategies and bits of wisdom along the way, ad hoc and at a heavy price. Yung-Hsiang Lu’s laudable intention is to impart some of this knowledge to students immediately after their first programming course, before other courses that will most likely concentrate on things such as algorithms and data structures.

This book deals with designing, coding, and testing C programs using the gcc compiler, the make utility, and the Linux operating system. Lu mentions selected Linux commands and utilities--ddd, trench, uniq, ddb, grep, gcov, gprof--as needed. Most of these are dealt with in passing; the exception (see below) is the make utility. And while Lu highlights the critical role of testing, he also mentions its limitations and acknowledges that this book does not deal with it at length.

Two features are notable. First, a crucial element of the book, elaborated early and in great detail, is the description of the program calling stack. This is an excellent pedagogical approach: a thorough understanding of how the calling stack is built and used goes a long way in ensuring that the programmer has a firm grasp of the design process, and it also plays a crucial role in tracing the location of errors. And second, many topics are accompanied by discussions of potential pitfalls and remedial strategies.

Part 1, “Computer Storage: Memory and File,” contains 11 chapters. These chapters cover the essentials of the software development process. Topics include stack memory; strategies to prevent, detect, and remove bugs; pointers; strings; testing and debugging; heap memory; and using files.

In Part 1, I especially liked sections 4.9 and 4.10. First, the reader is asked to identify potential problems in five different variations of a function that swaps two values. Next, the reader is given a detailed analysis of the errors present in each variation and is told why this problem can be structured in 15,552 different ways, only one of which is correct. And chapter 5, an excellent chapter, shows the progressive development of a makefile to compile and test a program using four different test cases.

Part 2, “Recursion,” spans chapters 12 through 15. This section includes mathematical analysis and coding of several variations of counting problems (selecting colored balls from an unlimited source) and integer partitions. Binary search, combinations, permutations, stack sort, quicksort, and the Tower of Hanoi problem also make an appearance.

Part 3, “Structure” (chapters 16 through 21), deals with user-defined types, linked lists, binary search trees, and an introduction to parallel programming using threads.

Part 4, “Applications,” chapters 22 through 24, deals with finding an exit to a maze, image processing, and Huffman compression.

The book ends with three appendices on installing Linux and Linux tools, version control using Github, and the Eclipse integrated development environment (IDE).

Surprisingly, Lu does not mention the bounds-checking capabilities of the current C standard nor the excellent guidelines provided by the SEI CERT C Coding Standard (https://www.securecoding.cert.org/confluence/display/c/SEI+CERT+C+Coding+Standard), a truly valuable set of rules and recommendations for the C programmer. In fact, the book does not include any references or recommended reading.

The next edition of the book, if there is one, could use a rather firm editing hand. The presentation could be made sharper, clearer, and more concise; at times, the grammar could be improved. Obvious errors--such as one or more lines of text missing on page 90, or an ambiguous program specification on page 147--should be corrected. The index is missing a surprising number of entries.

Nevertheless, the book can be quite beneficial to novice programmers, the intended audience. It could also be used for professional development in class or by the independent reader.

More reviews about this item: Amazon

Reviewer:  Edgar R. Chavez Review #: CR143813 (1512-1003)

Reproduction in whole or in part without permission is prohibited.   Copyright 2024 ComputingReviews.com™
Terms of Use
| Privacy Policy