|
W
hen
you browse the technical section of an arbitrary bookstore you typically
find countless titles that teach you programming languages but only very
few, if any, that talk about the general aspects of programming itself.
The Practice of Programming by Kernighan & Pike is one of these extremely
rare exceptions. It's focus is exclusively on programming and related topics,
independently of any specific programming language.
The authors, Brian Kernighan and
Rob Pike, are two software veterans. Brian Kernighan is perhaps best known
as co-author of The C-Programming Language -the classic C text book - which
he published together with Dennis Ritchie. Together with Rob Pike he wrote
the almost equally famous The Unix Programming Environment. The authors'
outstanding reputation naturally raises the expectations for this book.
They did not disappoint us: Although the paperback is relatively thin (only
250+ pages) it yet meets all expectations. It contains a lot of dense and
important information about software programming and related topics providing
insights that clearly stem from the authors? long term experience in this
field.
The titles of the nine chapters give
a good overview of the book?s scope. It covers:
Chapter 1: Style
Chapter 2: Algorithms and
Data Structures
Chapter 3: Design and Implementation
Chapter 4: Interfaces
Chapter 5: Debugging
Chapter 6: Testing
Chapter 7: Performance
Chapter 8: Portability
Chapter 9: Notation
While you find thorough discussions
of these aspects in the nine chapter, the appendix wraps it all up and
contains the essence from each of the chapters in the condensed form of
short and precise rules. Examples for such rules (taken form the Debugging
chapter) are for instance: Look for familiar patterns. and: Examine the
most recent change.
Besides explaining the theoretical
background the book shows numerous code examples that illustrate the reasoning.
These examples are implemented in either one of the general programming
languages C, C++, Java or one of the scripting languages Awk or Perl. A
major example (in the Design and Implementation chapter) is implemented
in all five languages and is used to compare the levels of abstraction
that the languages C, C++, and Java support. The five implementations also
demonstrate the significantly different approaches that general purpose
languages as opposed to scripting languages take.
Experienced programmers might already
have extracted many insights presented in the book from their own work.
Yet the book can be interesting and entertaining reading: Compare the rules
gained by own experience with those of Kernighan and Pike! For a novice
programmer this book is a ?must have? because it provides a sound knowledge
base of all aspects of programming without distracting by any buzzwords
or hype.
Angelika Langer
develops
and teaches classes on advanced C++, STL, multithreading, internationalization,
and Java. She has served on the ANSI/ISO C++ Committee since 1993.
Klaus
Kreft
is a software architect and consultant with more than a decade
of experience in industrial software development. He works for Siemens
Business Services in Germany. Langer and Kreft are working on a book about
standard C++ iostreams and locales and are columnists for
C++
Report
.
|