Derrel R. Blain currently works as a writer for Greenleaf Software. He holds a BA in Computer Science and an MA in English.
If you are familiar with programming and PCs, and you want a thorough grounding in C, you should read The C Tool-box by William James Hunt. This book will lead you from a simple definition of C statements in the first chapter to writing a Control-Break handler and a terminal emulation program in the last chapters.
This is the second edition of The C Toolbox. (The first edition was reviewed by Andrew Binstock in The C Users Journal, Dec/Jan 1988 issue.) If a programming book is worthy of a second edition two years later, you may be sure it is a useful book. Binstock recommended this book without reservation then, and I do the same now. Hunt has updated this edition to make it as useful as ever to beginning and intermediate C programmers.
The author has carefully mapped his instruction so the reader quickly develops useful C programming skills. The concepts and routines of previous chapters provide groundwork for the next. For instance, chapter 2 presents C's storage and data type conventions, but mingles this explanation with a discussion of elementary I/O for C. Chapter 3 elaborates on these concepts into a complete set of modules for displaying ASCII files. The next chapter continues to build on these ideas. By the time readers have worked through chapter 4, they have a sound collection of modules for displaying files. These include a set of simple screen output routines for paging through the displayed file. These programs are not apprentice lessons which, once learned, are only discarded.
In addition to being a very good tutorial on C, this book also provides a collection of essential algorithms. In PC computing, some basic tasks must be performed no matter what the language, like reading and writing files, sorting and displaying data, and communicating via parallel and serial ports. This book provides solid instruction on handling these tasks in C. The results are functional code that the reader can use.
Recreating code from scratch is a waste of time. If you intend to develop a professional application in C, go out and buy a professional library it's well worth your time and money. Of course, many programmers do not need the sophistication of a professional library.
My programming efforts concern research in digitally sampled sound and linguistic data, so I write many routines that only have a one-time use. However, even code meant for a one-time application needs routines for common tasks, such as sorting a collection of data records. In past years, I wrote much of this code in Pascal. When I began using C, its apparently chaotic syntax gave me fits. This book would have saved me time in learning some of C's peculiar traits, while helping me to produce code that was immediately useful. For instance, using the files from the The C Toolbox's companion disk, I had a working C program for sorting text files of words into a lexicon in about 20 minutes.
The companion disk contains all the exercises and examples that appear in the book. The code for each chapter is kept in separate directories, so each of the pieces is easy to find. Hunt even provides project files for Turbo C users, making compilation of all the modules even easier.
The attention to detail of this book is admirable. Hunt includes a chapter on simple optimization for C code and an appendix on the PC memory models. Chapter 7 furnishes a respectable introduction to low-level access of the PC BIOS. If you are learning C, you should read this book. Practically everything you need is here.
The C Toolbox
William James Hunt
Addison-Wesley
$22.95, 501 pages
ISBN 0-201-51815-5