Accessor function, 31
ACM, see Association for Computing Machinery
Active code generator, 104
Activity diagram, 150
Advanced C++ Programming Styles and Idioms, 265
Advanced Programming in the Unix Environment, 264
Aegis transaction-based configuration management, 246, 271
Algorithm
binary chop, 180
choosing, 182
combinatoric, 180
divide-and-conquer, 180
linear, 177
quicksort, 180
runtime, 181
sublinear, 177
Allocations, nesting, 131
Analysis Patterns, 264
Anonymity, 258
AOP, see Aspect-Oriented Programming
Architecture
deployment, 156
flexibility, 46
prototyping, 55
temporal decoupling, 152
Art of Computer Programming, 183
Artificial intelligence, marauding, 26
Aspect-Oriented Programming (AOP), 39, 273
side effects, 124
turning off, 123
Association for Computing Machinery (ACM), 262
Communications of the ACM, 263
SIGPLAN, 263
Assumptions, testing, 175
“at” command, 231
Audience, 21
needs, 19
auto_ptr, 134
Automation, 230
approval procedures, 235
compiling, 232
cron, 231
documentation, 251
scripts, 234
team, 229
Web site generation, 235
awk, 99
Backus-Naur Form (BNF), 59n
Base class, 112
Bean, see Enterprise Java Beans (EJB)
Beowulf project, 268
“Big O” notation, 177
“Big picture”, 8
Binary format, 73
problems parsing, 75
BIST, see Built-In Self Test
Blackboard system, 165
partitioning, 168
workflow, 169
regression test jig, 305
workflow, 151
BNF, see Backus-Naur Form (BNF)
Brain, Marshall, 265
Branding, 226
Brant, John, 268
“Broken Window Theory”, 5
vs. stone soup, 9
Brooks, Fred, 264
Browser, class, 187
Browser, refactoring, 187, 268
Bug, 90
failed contract as, 111
see also Debugging; Error
Build
dependencies, 233
final, 234
nightly, 231
refactoring, 187
Built-In Self Test (BIST), 189
Business logic, 146
Business policy, 203
C language
assertions, 122
DBC, 114
duplication, 29
error handling, 121
error messages, 115
macros, 121
Object Pascal interface, 101
C++ language, 46
assertions, 122
auto_ptr, 134
books, 265
DBC, 114
decoupling, 142
duplication, 29
error messages, 115
exceptions, 132
unit tests, 193
Caching, 31
Cascading Style Sheets (CSS), 253
Cat
blaming, 3
herding, 224
Schrödinger’s, 47
Catalyzing change, 8
Cathedrals, xx
Cetus links, 265
Change, catalyzing, 8
Christiansen, Tom, 81
Class
assertions, 113
base, 112
coupling ratios, 242
encapsulating resource, 132
number of states, 245
resource allocation, 132
subclass, 112
Class browser, 187
ClearCase, 271
Cockburn, Alistair, xxiii, 205, 264, 272
active, 104
makefiles, 232
parsers, 105
passive, 103
Code profiler, 182
Coding
algorithm speed, 177
coupled, 130
coverage analysis, 245
database schema, 104
defensive, 107
estimating, 68
exceptions, 125
implementation, 173
iterative, 69
“lazy”, 111
metrics, 242
modules, 138
multiple representations, 28
ownership, 258
prototypes, 55
server code, 196
specifications, 219
tracer bullets, 49–51
see also Coupled code; Decoupled code; Metadata; Source code control system (SCCS)
Cohesion, 35
COM, see Component Object Model
Combinatorial explosion, 140, 167
Combinatoric algorithm, 180
Command shell, 77
bash, 80
Cygwin, 80
vs. GUI, 78
UWIN, 81
Windows, 80
avoiding duplication, 29
DBC, 113
parameters, 250
types of, 249
unnecessary, 250
see also Documentation
Common Object Request Broker (CORBA), 29, 39, 46
Event Service, 160
Communicating, 18
duplication, 32
e-mail, 22
and formal methods, 221
presentation, 20
style, 20
teams, 225
users, 256
writing, 18
Communications of the ACM, 263
Comp.object FAQ, 272
Compiling, 232
compilers, 267
DBC, 113
warnings and debugging, 92
Component Object Model (COM), 55
Component-based systems, see Modular system
Concurrency, 150
design, 154
interfaces, 155
and Programming by Coincidence, 154
requirements analysis of, 150
workflow, 150
Concurrent Version System (CVS), 271
Configuration
cooperative, 148
dynamic, 144
metadata, 147
Configuration management, 86, 271
Constantine, Larry L., 35
Constraint management, 213
Constructor, 132
initialization, 155
Contact, authors’ e-mail, xxiii
Context, use instead of globals, 40
see also Design by contract (DBC)
Controller (MVC), 162
Coplien, Jim, 265
CORBA, see Common Object Request Broker
Coupled code, 130
coupling ratios, 242
performance, 142
temporal coupling, 150
see also Decoupled code
Coverage analysis, 245
Cox, Brad J., 189n
Crash, 120
Critical thinking, 16
cron, 231
CSS, see Cascading Style Sheets
CVS, see Concurrent Version System
Data
blackboard system, 169
caching, 31
dictionary, 144
dynamic data structures, 135
global, 40
language, 60
normalizing, 30
readable vs. understandable, 75
views, 160
visualizing, 93
see also Metadata
Data Display Debugger (DDD), 93, 268
Database
active code generator, 104
schema maintenance, 100
DBC, see Design by contract
DDD, see Data Display Debugger
Deadlock, 131
Debugging, 90
assertions, 123
binary search, 97
bug location, 96
bug reproduction, 93
checklist, 98
compiler warnings and, 92
corrupt variables, 95
“Heisenbug”, 124
rubber ducking, 95
and source code branching, 87
surprise bug, 97
time bomb, 192
tracing, 94
view, 164
visualizing data, 93
Decision making, 46
architecture, 152
blackboard system, 166
Law of Demeter, 140
metadata, 145
minimizing coupling, 138
modular testing, 244
physical decoupling, 142
temporal coupling, 150
workflow, 150
see also Coupled code
Defensive coding, 107
Delegation, 304
Delphi, 55
see also Object Pascal
Demeter project, 274
Demeter, Law of, 140
Dependency, reducing, see Modular system; Orthogonality
Deployment, 156
Deployment descriptor, 148
Design
accessor functions, 31
concurrency, 154
context, 174
deployment, 156
design/methodology testing, 242
metadata, 145
physical, 142
refactoring, 186
using services, 154
Design by contract (DBC), 109, 155
and agents, 117
assertions, 113
class invariant, 110
as comments, 113
dynamic contracts, 117
iContract, 268
language support, 114
list insertion example, 110
pre- and postcondition, 110, 113, 114
predicates, 110
unit testing, 190
Design Patterns, 264
observer, 158
singleton, 41
strategy, 41
Destructor, 132
Detectives, 165
Development tree, 87
Development, iterative, 69
Divide-and-conquer algorithm, 180
DOC++ documentation generator, 251, 269
DocBook, 254
Documentation
automatic updating, 251
executable, 251
formats, 253
HTML, 101
hypertext, 210
internal/external, 248
invariant, 117
mark-up languages, 254
orthogonality, 42
outline, 18
requirements, 204
technical writers, 252
writing specifications, 218
see also Comment; Web documentation
Dodo, 148
Don’t repeat yourself, see DRY principle
Downloading source code, see Example code
Dr. Dobbs Journal, 263
see also Duplication
Duck, rubber, see Rubber duck
Duplication, 26
code generators avoid, 28
and code reviews, 33
design errors, 30
documentation and code, 29
interdeveloper, 32
in languages, 29
multiple representations, 28
teams, 226
under time pressure, 32
types of, 27
Dynamic configuration, 144
Dynamic data structure, 135
Dynamics of Software Development, 264
E-mail, 22
address for feedback, xxiii
Editor, 82
auto-indenting, 85
cursor movement, 84
features, 83
generating code, 103
how many to learn, 82
template, 84
types of, 266
Windows notepad, 84
Effective C++, 265
EJB, see Enterprise Java Beans
elvis editor, 267
Viper vi emulator, 267
Embedded mini-language, 62, 145
Embellishment, 11
Encapsulation, object, 127, 158
Eno, Brian, 205
Enterprise Java Beans (EJB), 39, 147
Entropy, 4
Error
DBC messages, 115
design, 30
domain-specific, 59
early crash, 120
log messages, 196
orthogonality, 41
see also Exception
Error handler, 127
Estimating, 64
accuracy, 64
iterative, 69
models, 66
problem domain, 66
project schedules, 68
records, 68
testing, 182
Eton College, xxi
Event, 157
Event channel, 160
Example code
add logging, 40
airline reservations, 164, 296
assert macro, 122
auto_ptr example, 134
bad resource balancing, 129, 130
downloading, xxiii
exception error handling, 125
good resource balancing, 131
JavaDoc example, 250
method chaining, 139
normalized class, 31
open password file, 126
open user file, 127
resources and exceptions, 132, 133
side effect, 124
spaghetti error handling, 125
square root, 190
string parsing with StringTokenizer, 156
string parsing with strtok, 155
unnormalized class, 30
Example code by name
AOP, 40
Misc.java, 156
assert, 122
balance.cc, 134
balance.c, 131–133
exception, 125
findPeak, 250
misc.c, 155
openpasswd.java, 126
openuserfile.java, 127
plotDate, 139
side_effect, 124
spaghetti, 125
sqrt, 190
Exception, 121
effects of, 127
and error handlers, 127
missing files, 126
resource balancing, 132
when to use, 125
Excuses, 3
Executable document, 251
expect, 269
Expert, see Guru
Expiring asset, 12
eXtensible Style Language (XSL), 253
Extinction, 148
eXtreme Programming, 238n, 258, 272
Feature creep, 10
Feedback, e-mail address, xxiii
File
exception, 126
header, 29
implementation, 29
log, 196
makefile, 232
source, 103
Final build, 234
Fish, dangers of, 34
Flexibility, 46
Four Posts Puzzle, 213
Fowler, Martin, xxiii, 186, 273
Free Software Foundation, see GNU Project
Frog, boiled, see Boiled frog
Function
accessor, 31
Law of Demeter for ~s, 140
similar, 41
Gamma, Erich, 194
Garbage collection, 134
Gardening metaphor, 184
Gehrke, Peter, xxiv
Global variables, 40, 130, 154
Glossary, project, 210
GNU Project, 274
C/C++ compiler, 267
General Public License (GPL), 80
GNU Image Manipulation Program (GIMP), 274
SmallEiffel, 267
“Good-enough software”, see Software, quality
Gordian knot, 212
Goto, 127
GUI system
vs. command shell, 78
interface, 78
testing, 244
Hash, secure, 74
Header file, 29
Helicopter, 34n
“Hot-key” sequence, 196
HTTP Web server, 196
Human factors, 241
Hungarian notation, 249
Hungry consumer model, 153
Hypertext document, 210
IDE, see Integrated Development Environment
IEEE Computer Society, 262
IEEE Computer, 262
IEEE Software, 263
Imperative language, 60
Implementation
accidents, 173
coding, 173
specifications, 219
Imposed duplication, 28
Inadvertent duplication, 30
Indentation, automatic, 85
Independence, see Orthogonality
Infrastructure, 37
Inheritance, 111
assertions, 113
fan-in/fan-out, 242
Inner tennis, 215
Inspection, code, see Code reviews
Insure++, 136
Integrated circuit, 189n
Integrated Development Environment (IDE), 72, 232
Integration platform, 50
Integration testing, 239
Interface
blackboard system, 168
C/Object Pascal, 101
concurrency, 155
error handler, 128
GUI, 78
prototyping, 55
user, 203
loop, 116
ISO9660 format, 233n
Iterative development, 69
Jacobson, Ivar, 204
Jargon file, 273
code generation, 232
DBC, 114
Enterprise Java Beans, 39, 147
error messages, 115
exceptions, 121
JUnit, 195
multithreaded programming, 154
property access, 100
property files, 145
resource balancing, 134
RMI, 128
string parser, 156
tree view, 161
unit tests, 193
and Windows shells, 81
JavaDoc, see Java
K Desktop Environment, 273
see also Knowledge portfolio
Kernighan, Brian, 99
Keybinding, 82
Kirk, James T., 26
Knowledge
producers and consumers, 166
Knowledge portfolio, 12
building, 13
critical thinking, 16
learning and reading, 14
researching, 15
Korn, David, 81
Kramer, Reto, xxiv
Kruchten, Phillipe, 227n
Lakos, John, xxiv, 9, 142, 265
Lame excuses, 3
DBC, 114
domain, 57
duplication in, 29
learning, 14
prototypes, 55
text manipulation, 99
see also Mini-language
Large-Scale C++ Software Design, 142, 265
LATEX system, 103
Law of Demeter, 140
Lawns, care of, xxi
Layered design, 37
Layered system, see Modular system
“lazy” code, 111
Lex and Yacc, 59
Librarian, see Project librarian
Library code, 39
Linda model, 167
Linear algorithms, 177
Liskov Substitution Principle, 111
Listening, 21
Literate programming, 248
see also Tracing
Lookup table, 104
Loop
nested, 180
simple, 180
Loop invariant, 116
assertions, 122
documentation, 252
error handling, 121
Maintenance, 26
imperative languages, 61
Makefile, 232
recursive, 233
Managing expectations, 256
Mark-up language, 254
Martin, Robert C., 273
McCabe Cyclomatic Complexity Metric, 242
Member variables, see Accessor functions
Memory allocation, 135
business logic, 146
configuration, 147
controlling transactions, 39
decoupled code, 145
and formal methods, 221
in plain text, 74
Metric, 242
Meyer, Bertrand, 31n, 109, 184, 264
Meyer, Scott, 265
Microsoft Visual C++, 198
Microsoft Windows, 46
Mini-language, 59
data language, 60
embedded, 62
imperative, 60
parsing, 62
stand-alone, 62
Mixing board, 205
MKS Source Integrity, 271
Model, 160
calculations, 67
components and parameters, 66
and estimating, 66
executable documents, 251
view, 162
Model-view-controller (MVC), 38, 160
Modular system, 37
coding, 138
prototyping, 55
resource allocation, 135
reversibility, 45
More Effective C++, 265
Mozilla, 273
Multithreaded programming, 154
MVC, see Model-view-controller
The Mythical Man Month, 264
Name, variable, 249
Nest allocations, 131
Nested loop, 180
Nonorthogonal system, 34
Normalize, 30
Novobilski, Andrew J., 189n
Object
coupling, 140n
persistence, 39
publish/subscribe protocol, 158
singleton, 41
valid/invalid state, 154
viewer, 163
Object Management Group (OMG), 270
Object Pascal, 29
C interface, 101
Object-Oriented Programming, 189n
Object-Oriented Software Construction, 264
Obsolescence, 74
OLTP, see On-Line Transaction Processing system
OMG, see Object Management Group
On-Line Transaction Processing system (OLTP), 152
Options, providing, 3
Ordering, see Workflow
Orthogonality, 34
design, 37
documentation, 42
DRY principle, 42
nonorthogonal system, 34
productivity, 35
testing, 41
toolkits & libraries, 39
see also Modular system
Over embellishment, 11
Pain management, 185
paint() method, 173
Painting, 11
Papua New Guinea, 16
Parallel programming, 150
Parrots, killer, see Branding
Parsing, 59
code generators, 105
log messages, 196
mini-language, 62
strings, 155
Partitioning, 168
Pascal, 29
Passive code generator, 103
Performance testing, 241
C/Object Pascal interface, 101
database schema generation, 100
home page, 267
Java property access, 100
power tools, 270
test data generation, 100
testing, 197
and typesetting, 100
Unix utilities in, 81
web documentation, 101
Perl Journal, 263
Petzold, Charles, 265
Pike, Rob, 99
Pilot
landing, handling, etc., 217
who ate fish, 34
Plain text, 73
vs. binary format, 73
drawbacks, 74
executable documents, 251
leverage, 75
obsolescence, 74
and easier testing, 76
Unix, 76
Polymorphism, 111
Powerbuilder, 55
The Practice of Programming, 99
Pragmatic programmer
characteristics, xviii
e-mail address, xxiii
Web site, xxiii
Pre- and postcondition, 110, 113, 114
Predicate logic, 110
Preprocessor, 114
Presentation, 20
metadata, 146
Problem solving, 213
checklist for, 214
Programming by coincidence, 173
Programming staff
expense of, 237
Programming Windows, 265
Project
glossary, 210
“heads”, 228
saboteur, 244
schedules, 68
see also Automation; Team, project
architecture, 55
disposable code, 56
kinds of, 54
and programming languages, 55
and tracer code, 51
using, 54
Publish/subscribe protocol, 158
Pugh, Greg, 95n
Purify, 136
PVCS Configuration Management, 271
Quality
control, 9
requirements, 11
teams, 225
Quarry worker’s creed, xx
Quicksort algorithm, 180
Rational Unified Process, 227n
Raymond, Eric S., 273
RCS, see Revision Control System
Real-world data, 243
automatic, 187
and design, 186
testing, 187
time constraints, 185
Refinement, excessive, 11
Relationship
has-a, 304
Releases, and SCCS, 87
Remote Method Invocation (RMI), 128
exception handling, 39
Remote procedure call (RPC), 29, 39
Repository, 87
business problem, 203
changing, 26
creep, 209
DBC, 110
distribution, 211
documenting, 204
in domain language, 58
expressing as invariant, 116
formal methods, 220
glossary, 210
over specifying, 208
and policy, 203
usability testing, 241
user interface, 203
Researching, 15
Resource balancing, 129
C++ exceptions, 132
checking, 135
coupled code, 130
dynamic data structures, 135
encapsulation in class, 132
Java, 134
nest allocations, 131
Reversibility, 44
flexible architecture, 46
Revision Control System (RCS), 250, 271
Risk management, 13
orthogonality, 36
RMI, see Remote Method Invocation
Rock-n-roll, 47
RPC, see Remote procedure call
Rules engine, 169
Saboteur, 244
Samba, 272
Sample programs, see Example code
SCCS, see Source code control system
Schedule, project, 68
Schrödinger, Erwin (and his cat), 47
Scope, requirement, 209
Screen scraping, 61
Secure hash, 74
sed, 99
Sedgewick, Robert, 183
Self-contained components, see Orthogonality; Cohesion
sendmail program, 60
Sequence diagram, 158
Server code, 196
Services, design using, 154
Shell, command, 77
vs. GUI, 78
see also Command shell
“Shy code”, 40
Side effect, 124
SIGPLAN, 263
Simple loop, 180
Singleton object, 41
Slashdot, 265
SmallEiffel, 267
Smalltalk, 46, 186, 187, 268, 272
Software
development technologies, 221
quality, 9
requirements, 11
Software bus, 159
“Software Construction”, 184
Software Development Magazine, 263
Software IC, 189n
“Software rot”, 4
Solaris, 76
Source code
cat eating, 3
documentation, see Comments
downloading, see Example code
duplication in, 29
generating, 103
reviews, see Code reviews
Source code control system (SCCS), 86
Aegis, 246
builds using, 88
CVS, 271
development tree, 87
plain text and, 76
repository, 87
tools, 271
Specialization, 221
Specification, 58
implementation, 219
language, 62
as security blanket, 219
writing, 218
Spy cells, 138
Squeak, 268
Stand-alone mini-language, 62
“Start-up fatigue”, 7
Starting a project
problem solving, 212
prototyping, 216
specifications, 217
see also Requirement
Stevens, W. Richard, 264
Stone soup, 7
vs. broken windows, 9
Stone-cutter’s creed, xx
String parser, 155
Stroop effect, 249
strtok routine, 155
Structured walkthroughs, see Code reviews
Style, communication, 20
Subclass, 112
Sublinear algorithm, 177
Supplier, see Vendor
Surviving Object-Oriented Projects: A Manager’s Guide, 264
Synchronization bar, 151
Syntax highlighting, 84
Synthetic data, 243
TAM, see Test Access Mechanism
automation, 229
avoiding duplication, 32
code review, 236
communication, 225
duplication, 226
functionality, 227
organization, 227
pragmatism in, xx
quality, 225
tool builders, 229
Technical writer, 252
Template, use case, 205
Temporal coupling, 150
Test Access Mechanism (TAM), 189
Test harness, 194
Testing
automated, 238
from specification, 29
bug fixing, 247
coverage analysis, 245
and culture, 197
design/methodology, 242
effectiveness, 244
estimates, 182
frequency, 246
GUI systems, 244
integration, 239
performance, 241
role of plain text, 76
refactoring, 187
resource exhaustion, 240
saboteur, 244
usability, 241
validation and verification, 239
see also Unit testing
Text manipulation language, 99
TOM programming language, 268
Toolkits, 39
Tools, adaptable, 205
Tracer code, 49
advantages of, 50
and prototyping, 51
Tracing, 94
see also Logging
Trade paper, 263
Trade-offs, 249
Transactions, EJB, 39
Tree widget, 161
troff system, 103
Tuple space, 167
UML, see Unified modeling language (UML)
key, 86
Unified modeling language (UML)
activity diagram, 150
sequence diagram, 158
use case diagram, 208
Uniform Access Principle, 31n
Unit testing, 190
DBC, 190
modules, 239
test harness, 194
test window, 196
writing tests, 193
Application Default files, 145
books, 264
Cygwin, 270
DOS tools, 270
Samba, 272
Unix Network Programming, 264
Usability testing, 241
Use case, 204
diagrams, 206
User
expectations, 256
groups, 18
interface, 203
requirements, 10
Variable
corrupt, 95
name, 249
Vendor
libraries, 39
reducing reliance on, 36, 39, 46
vi editor, 266
View
debugging, 164
executable documents, 251
Java tree view, 161
model-view-controller, 160, 162
model-viewer network, 162
vim editor, 266
Visual Basic, 55
Visual C++, 198
Visual SourceSafe, 271
VisualWorks, 268
Walkthoughs, see Code reviews
Warnings, compilation, 92
Web documentation, 101, 210, 253
automatic generation, 235
news and information, 265
Web server, 196
Web site, pragmatic programmer, xxiii
What You See Is What You Get (WYSIWYG), 78
WikiWikiWeb, 265
Win32 System Services, 265
Windows, 46
“at” command, 231
books, 265
Cygwin, 80
metadata, 145
notepad, 84
UWIN, 81
WinZip, 272
WISDOM acrostic, 20
Wizard, 198
Workflow, 150
blackboard system, 169
content-driven, 234
Writing, 18
see also Documentation
www.pragmaticprogrammer.com, xxiii
WYSIWYG, see What You See Is What You Get
XEmacs editor, 266
Xerox Parc, 39
XSL, see eXtensible Style Language
yacc, 59
Z shell, 272