Chapter
summary
|
Downloadable
resources
|
Offsite
links referenced in the text
|
Chapter 1. Introduction
The book is about
- how to design good software
- how to program in C++
- data structures and algorithms
- scientific and engineering programming
The Introduction provides an outline of the book, explaining how these
four themes are developed and integrated.
|
|
There are several online versions of Fred Brooks' No Silver Bullet article, but it is
not clear how permanent these will be. A Google search will yield a
currently-available online copy.
|
Chapter 2. Fundamentals
From nine historical perspectives on the nature of software come 13
principles and 21
rules to guide design.
|
|
- http://www.mcmaster.ca/russdocs/russell.htm
Bertrand Russell, page 10.
- http://www.turing.org.uk/turing/
Alan Turing, page 10.
- http://www-groups.dcs.st-and.ac.uk/~history/Mathematicians/Von_Neumann.html
John Von Neumann, page 11.
- http://www-formal.stanford.edu/jmc
John McCarthy's homepage including versions of the original paper on
LISP, page 12.
- http://www.cs.utexas.edu/users/UTCS/notices/dijkstra/ewdobit.html
Edsger Dijkstra's obituary summarizing his many contributions, page 12.
- http://research.microsoft.com/~thoare/
Antony Hoare's homepage, page 12.
- http://www-cs-faculty.stanford.edu/~knuth/
Donald Knuth's homepage, page 16.
- http://www.acm.org/classics/oct95
Online version of Dijkstra's paper, GOTO
statement considered harmful, page 16.
- http://neil.franklin.ch/Jokes_and_Fun/Goto-less_Programming.html
The COMEFROM statement, page 16.
- http://www.cs.unc.edu/~brooks
Fred Brooks' homepage, page 19.
- http://www.acm.org/classics/sep95
Online version of Ken Thompson's paper about a Trojan Horse in the Unix
compiler, page 31.
- http://www.jnd.org
Don Norman, page 33.
- http://pespmc1.vub.ac.be/CYBSYSTH.html
Principa Cybernetica Web, page 42 (see also page 31).
|
Chapter 3. The Craft of Software Design
Six simple practices that will accelerate your
development as a programmer and continue to inform your practice of
software design.
|
|
|
Chapter 4. Beginning Programming in C++
Because programming in a real language is central to Software Design,
this chapter and the next provide a concise introduction to C++, with
many examples and summary reference tables. Complete programs may
be downloaded from here, along with some Java examples that are not in
the book. Code fragments and a few of the early, small programs are not
included.
|
- hello.cpp
The inevitable "Hello
World" first program, page 54.
- sizeof.cpp
A program to print out
the sizes of the basic types, page 61.
- divtest.cpp
Division tester
program, page 67.
- diceroll.cpp
Dice rolling
simulation that illustrates the Central Limit Theorem, page 79.
- readlocs.cpp
A program that reads
a simple database and prints some information, page 94.
- filecopy.cpp
A simple file copy
utility, page 95.
- romanize.cpp
A convertor to and
from Roman numerals, page 98.
- student_average.cpp
Another database program, this time reading students marks and
averaging them, page 106.
- students.dat
A sample database
file for the student_average program.
|
|
Chapter 5. Object-Oriented Programming in C++
The tutorial introduction to C++ continues with discussion of
object-oriented facilities like encapsulation, inheritance and
polymorphism.
|
- stack.cpp
Implementation of a stack
abstract data type as a C++ class, page 123.
- location_zone.cpp
The
location database example from Chapter 4, recast as an Object-Oriented
program. page 126.
- vector.cpp
A vector class, page 129.
- String.cpp
A string class, page 138.
- The set of files for the mountains/cities inheritance
program,
discussed starting on page 145.
- loc.h
Header file for the
location class, page 146.
- loc.cpp
Implementation of
the location class, page 147.
- mountain.h
Header file
for the derived class mountain, page 148.
- tellzone.cpp
The
second (final) version of the main program, page 150.
- mountain_city.dat
A sample database file
- Makefile
A Makefile, not
included in the book
- The set of files for the two-stream student marks
inheritance
example, discussed starting on page 151.
- student.h
Header file for the student class and the derived classes, page 157.
- student.cpp
Implementation file for the member functions not included in the
header, page 158.
- average.cpp
The main program, page 159.
- streamed_students.dat
A sample database file
- Makefile
A Makefile, not included in the book
- trynew.cpp
An illustration of
exception programming. Find out what happens when new can't find any
memory, page 161.
- trydiv.cpp
Another illustration of
exceptions, this time comparing different platforms' behaviour when a
number is divided by zero, page 162.
- stacktemplate.cpp
A stack of
templated data items, page 164.
- addnumbers.cpp
A program to add
line numbers to a file, page 170.
- remnumbers.cpp
A program to
take away line numbers previously added by addnumbers. Not included in
the book.
|
|
Chapter 6. Program style and structure
Advice on defensive programming, finding and eliminating bugs,
structuring programs and style. Most examples in this chapter are of
code with bugs so they are NOT included here.
|
- mkframework.cpp
A program to
make a framework of header, implementation, test and Makefile, page 190.
|
|
Chapter 7. Data structures
The structuring of data within abstract data types.
|
|
|
Chapter 8. Algorithms
Algorithm analysis with a focus on searching and sorting. The code
examples here are functions, not full programs.
|
|
|
Chapter 9. Design Methodology
A sceptical review of methodological alternatives.
|
|
|
Chapter 10. Understanding the Problem
Advice on writing a problem statement, steering design by clear
criteria, researching the problem domain, understanding users and
documentating a specification.
|
|
|
Chapter 11. Researching possible solutions
Analysis, experiment, prototyping and simulation, followed by a
discussion of notations and languages for developing designs. The use
of state diagrams, statecharts and state sketches for event-driven
systems is emphasized and illustrated.
|
|
|
Chapter 12. Modularization
How to divide software into parts to minimize the damage caused by
changes to requirements. Localizing information, information hiding and
object-oriented modularization.
|
|
|
Chapter 13. Detailed design and implementation
The software technology of Chapters 4 - 8 and the design methodology of
Chapters 9 - 12 meet in real programs.
|
- fsm.cpp
Implementation of a finite
state machine solving a real problem showing how the notations of
chapter 11 can be translated into code, page 289.
- table_hashtable.cpp
Implementation of Abstract Data Type Table using a hash table. See
chapter 7 for an alternative implementation. Here in Chapter 13 the
discussion is about how to choose between data structure and algorithm
alternatives like these two depending on the problem to be solved. Page
293.
|
|
Chapter 14. Testing
Traditional testing versus Test Driven Development; static and dynamic
analysis; devising test plans and cases; performance assessment.
|
|
|
Chapter 15. Case Study: Median Filtering
Development of an efficient median filter for signal conditioning and
enhancement. The chapter illustrates rapid prototyping, the search for
relevant prior art, use of a double-linked list data structure,
implementation and testing strategy, the importance of "finishing".
|
|
|
Chapter 16. Multidimensional Minimization - A Case Study in
Numerical Methods
Design and development of a simplex minimizer for multidimensional data.
|
- simplex.h
Header file for
the simplex class, page 340.
- simplex.cpp
Implementation
for the simplex class, page 342.
- rosenbrock.cpp
The
Rosenbrock function test function for the minimizer, page 350.
- vizsimplex.cpp
A
vizualization program used to produce figures 16.9 - 16.15 and the
animation below. Requires CLIP - Class Library for Image Processing.
This program is not in the book.
- Makefile
Makefile, not
included in the book.
- rosewalk.gif
An animated
GIF showing how a simplex minimizes the Rosenbrock function as in
figure 16.15. (Warning: Large file.)
|
|
Chapter 17. stable - Designing a string table class
Illustrates development of a flexible class that allows efficient
processing of 2D arrays of strings.
|
- stable.h
Last version of the
stable class header file, page 380.
- stable.cpp
Last version of
the stable class implementation, page 384.
- test.h
Last version of the test
header file, page 392.
- teststable.cpp
Last
version of the main test program, page 394.
- Makefile
Makefile, not
included in the book.
- As promised in the book, for completeness, here is the
complete
code for the stable class at each step in its development:
- testfile
A test file used by
stable3.cpp and discussed on page 362.
|
|