Copyright (c) 2013 John L. Jerz

The Practice of Programming (Kernighan, Pike, 1999)

Home
A Proposed Heuristic for a Computer Chess Program (John L. Jerz)
Problem Solving and the Gathering of Diagnostic Information (John L. Jerz)
A Concept of Strategy (John L. Jerz)
Books/Articles I am Reading
Quotes from References of Interest
Satire/ Play
Viva La Vida
Quotes on Thinking
Quotes on Planning
Quotes on Strategy
Quotes Concerning Problem Solving
Computer Chess
Chess Analysis
Early Computers/ New Computers
Problem Solving/ Creativity
Game Theory
Favorite Links
About Me
Additional Notes
The Case for Using Probabilistic Knowledge in a Computer Chess Program (John L. Jerz)
Resilience in Man and Machine

KernighanPike.jpg

 Coauthored by Brian Kernighan, one of the pioneers of the C programming language, The Practice of Programming is a manual of good programming style that will help any C/C++ or Java developer create faster, more maintainable code.

Early sections look at some of the pitfalls of C/C++, with numerous real-world excerpts of confusing or incorrect code. The authors offer many tips and solutions, including a guide for variable names and commenting styles. Next, they cover algorithms, such as binary and quick sorting. Here, the authors show how to take advantage of the built-in functions in standard C/C++. When it comes to data structures, such as arrays, linked lists, and trees, the authors compare the options available to C, C++, Java, and even Perl developers with a random-text-generation program (using a sophisticated Markov chain algorithm) written for each language.

Subsequent sections cover debugging tips (including how to isolate errors with debugging statements) and testing strategies (both white-box and black-box testing) for verifying the correctness of code. Final sections offer tips on creating more portable C/C++ code, with the last chapter suggesting that programmers can take advantage of interpreters (and regular expressions) to gain better control over their code. A handy appendix summarizes the dozens of tips offered throughout the book.

With its commonsense expertise and range of examples drawn from C, C++, and Java, The Practice of Programming is an excellent resource for improving the style and performance of your code base. --Richard Dragan

p.61 the design of data structures is the central decision in the creation of a program. Once the data structures are laid out, the algorithms tend to fall into place, and the coding is comparatively easy... We will show how the problem influences the data structures, and how the code that follows is straightforward once we have the data structures mapped out.
 
p.82 The design of a program is rooted in the layout of its data. The data structures don't define every detail, but they do shape the overall solution.
 
p.83 It's hard to deign a program completely and then to build it; constructing real programs involves iteration and experimentation. The act of building forces one to clarify decisions that had previously been glossed over.
 

Enter supporting content here