John P. Flynt
with Omar Salem
Thomson Course Technology PTR, a division of
Thomson Course Technology
25 Thomson Place
Boston, MA 02210
http://www.courseptr.com
Thomson Course Technology
25 Thomson Place
Boston, MA 02210
http://www.courseptr.com
Ben Vinson was the lead programmer for Ankh. He exerted an enormous effort, and
the game simply would not exist had he not been willing to make the effort he did.
Ben was instrumental in the software design and saw to development of the game
from beginning to end. He was by far the central and greatest contributor.
John Rose was the game designer for Ankh. John authored the game design document.He
also composed the music, wrote the user’s guide, created the installation package, and
was helpful in documenting CVS. He was at the center of the effort.
(Thanks to Jayme Catalano for keeping track of John.)
Carlos Villar worked as a development and maintenance programmer on Ankh. His work
on the design, sound, and AI was a strong contribution to the project’s success.
Paul Whitehead was the central figure in creation of the art for Ankh. He showed amazing
drive as he developed the meshes and textures for the game. The game just would not
have happened had he not been a part of the team.
Adrian Flynt developed the character art to accompany Paul’s work.
Ben Schulz contributed voice talent.
John Hollis was the book’s technical reader. John brought to this effort a perspective connected
with the larger world of software engineering. John provided an essential element
in the development of the content.
Charlie Allbee offered important suggestions concerning audience needs.
Rob Johnson made suggestions about how to structure the text.
Iraj Eftekhari, Deb Mahon, and Tony Caggiano offered encouragement.
Amy Flynt checked the math.
Marcia Flynt helped with contracts and accounting. The book would not have been written
without her support.
Many people at Thomson, Premier, and Course Technology did their usual magic.
Karen Gill edited the text.
André LaMothe provided the example of how to write books about developing games.
Emi Smith guided the effort from its conception.
Stacy Hiquet made everything possible.
About the Author
JOHN P. FLYNT, Ph.D., is a software developer who has worked extensively as a software
engineering process specialist.
He is president of The ewowe Corporation (http://www.ewowe.com),
which specializes in interactive educational software and related products
and services. His experience with game development began when he programmed a
game for education. He has taught game development and has worked with colleges and
universities to create game programs. His educational background includes degrees from
the University of Chicago and the University of Colorado. Along with his wife, Marcia,
and his children, Amy and Adrian, John lives in the foothills north of Boulder, Colorado.
OMAR SALEM lives in Denver, Colorado. Prior to becoming a game development teacher,
he was a member of the technical staff at Bell Labs/Lucent Technologies/Avaya, where he
worked for nearly 20 years. His emphasis is on both development and quality assurance
software engineering. He holds BS and MS degrees in computer science and mathematics.
To date, Omar has seen 17 large-scale software systems to completion, and all products
he has worked on have been successfully deployed.
About the Series Editor
ANDRÉ LAMOTHE, CEO of Xtreme Games LLC and the creator of the XGameStation, has
been involved in the computing industry for more than 27 years. He wrote his first game
for the TRS-80 and has been hooked ever since! His experience includes 2D/3D graphics,
AI research at NASA, compiler design, robotics, virtual reality, and telecommunications.
His books are top sellers in the game programming genre, and his experience is echoed in
the Thomson Course Technology PTR Game Development books.
You can contact André at ceo@nurve.net and http://www.xgamestation.com.
Introduction
This book is about how a small team of developers can build a computer game using
practices that are fostered by software engineering. It takes you through the major
phases of the software engineering lifecycle and introduces you to the subjects
named in the Software Engineering Body of Knowledge (SWEBOK). The development
process that this book documents started from a set of requirements. It guided the team
to consistently design and implement a game according to requirements. The team stayed
within budget and delivered on time.
The game is called Ankh Adventure (or just Ankh). (See Figure I.1.) The game provides a
3D graphics engine built with DirectX. Its design incorporates customizable levels and
characters. (It features map and character editors.) It provides save and replay options, a
particle engine, and MP3 music. The code for the game is extensive enough that you can
gain from it a sense of the complexity that characterizes games created by programmers
who are working in the game industry. On the other hand, the code is limited enough that
you can study it in detail. (The game consists of roughly 30,000 lines of code.)
As you read the book, you will see how the requirements for the game were laid out. The
effort started with a game design document. Using the game design document, the team
engineered a set of software requirements. To accomplish this, the team employed use
cases and other tools of analysis. After that, the team designed the game software. You will
be able to follow along through all of this activity. You can see how the team created the
configuration management plan from the design. You can see how the team created the
test plans by using the requirements and the design. (The artifacts—documents—that
resulted from these activities are on the CD.)
In addition, you can see how the team subjected the design to scrutiny to discover opportunities
to use software design patterns.With the implementation effort, you can see how
the team refactored code to simplify and optimize it.With respect to processes and practices,
you can read about how elements of the Capability Maturity Model (CMM) were
put to work, how the development team was organized, how reviews were conducted, how
templates were used, and how documentation was created.
Specific activities abound. One chapter covers the Unified Modeling Language (UML) in
a way that shows that UML is a practical, flexible tool. Another chapter investigates programming
using object-oriented programming practices. A chapter on testing explains
different approaches to testing and how to develop test plans. A chapter on metrics gives
you starter information on how to quantitatively assess games and their development.
Also included are chapters on managing the release of a game and planning and executing a revision.
The code for the game is set up so that you can explore it without difficulty. The key to
this is that the code is set up in 19 stripes. A stripe is another name for a software module.
A software module is a collection of classes. Each stripe embodies a set of functionality
that is specified in the requirements. The stripes were developed sequentially. Stripe 1, for
example, sets up the basic Windows framework of the game. Stripe 2 adds GUI features.
By Stripe 4, you can see a character mesh. (See Figure I.2.) By Stripe 9, the game offers
characters who are engaged in combat.When you get to Stripe 14, you are in a world of
multiple levels and all sorts of features.
Whether you are in a classroom or working on your own, one effective way to use the
stripes for learning is to study the difference between sequential stripes. Set up your project
with the lower of two stripes, and then add the code to develop your code until it
resembles the higher of the two stripes. Use the Design Description as a guide.
The installation program makes it easy for you to access all the code using Microsoft
Visual Studio. Each stripe is set up as a separate project. Just access the folder for the stripe
and click on the Ankh.dsw or Ankh.sln file. (An appendix provides you with a little
startup help with Visual Studio if you need it.) The appropriate version of DirectX will be
installed for you, along with the Boost library and all the assets. Nothing that is already
installed on your computer will be disturbed.
The installation program allows you to install stripes selectively. This means that you can
adjust the complexity of the game to suit your curiosity. If you want to see just the basic
framework for a Windows application, you can install Stripe 1. If you want to see how the
characters are set up for combat, you can install Stripe 7. You can look up any of the
stripes in the Ankh Software Design Description, which is included on the CD. (An appendix
provides an excerpt of this document.) Read the use cases at the beginning of each
stripe design section to acquire a sense of what the stripe is designed to do. In addition to
the use case, the Description provides simplified UML diagrams to help you understand
how the code in each stripe works.
The installer program attempts to accommodate all your needs. (See Appendix A, “Installation
and Setup,” for instructions.) You can install only the documentation if you prefer.
You can also install an executable for each stripe. Alternatively, you can install a project for
each stripe and compile it yourself. If you want to install only the game and the user’s
guide, that is an option, also. Regardless of what you want, the installation package sets
things up for you. Just insert the CD and follow the prompts.
The game has been created using C++, DirectX,Win32 functions, and the Boost library.
The game code starts from scratch and uses no MFC classes. Even the dialog boxes are
built from scratch. Around 25 percent of the code consists of comments to help you
understand how the code works. Object-oriented programming is the best approach to
most complex programming tasks, but structured programming can still be useful. (C++
is not a pure object- oriented programming language,
and the game does not make a pure application of it.)
Despite extensive discussion of programming, keep in mind that this book is not on how
to program using Windows components, C++, or DirectX. Nor is it about how to code a
game. It is about software engineering. As a result, this book does not require you to write
code.You don’t even need to study the game code on the CD. Still, it is hoped that you will
thoroughly investigate the code and perhaps begin tweaking it for your own purposes. An
enormous effort has been invested in making certain you can do so.
If you want to work with the main executable and perform design work, the game has a
variety of character classes. (See Figure I.3.) You can customize characters and add levels.
You will find that this book is a toolbox. It preaches nothing and advocates no methodologies.
This book provides a set of useful tools for software developers in any area,
including game software development professionals, game producers and designers, managers,
software quality assurance specialists, testers, writers, artists, and those who are
involved in education relating to computer science, software engineering, or game development.
Creating a book with a scope as broad as this one necessarily requires that a great deal be
omitted. To compensate for the missing details, each chapter provides a list of texts that
you can consult to deepen your knowledge of the topics that this book discusses. The
books that are referred to represent accounts that practitioners have given of the work
they perform.When a reference to a college textbook is included, the textbook is one that
the authors have found useful in the industry.
Product details
Price
|
|
---|---|
File Size
| 25,453 KB |
Pages
|
890 p |
File Type
|
PDF format |
ISBN
| 1-59200-155-6 |
Copyright
| 2005 by Thomson Course Technology PTR |
Contents at a Glace
Introduction
Chapter 1 Getting into the Game
Chapter 2 Requirements—Getting the Picture
Chapter 3 A Tutorial: UML and Object-Oriented Programming
Chapter 4 Software Design—Much Ado About Something
Chapter 5 Old Is Good—The Library Approach
Chapter 6 Object-Oriented Fantasies and Realities
Chapter 7 P Is for Pattern
Chapter 8 Risk Analysis
Chapter 9 Iterating Design
Chapter 10 Control Freaks and Configuration Management
Chapter 11 Evident Evil—The Art of Testing
Chapter 12 Numbers for Nabobs
Chapter 13 What People Do—Development Strategies
Chapter 14 Practice, Practice, Practice
Chapter 15 Team Work
Chapter 16 Process Improvement
Chapter 17 Release Planning and Management
Chapter 18 Documentation—Learning How to Learn
Chapter 19 Philosophy of Software Engineering and Game Development
Appendix A Installation and Setup
Appendix B Working with Files
Appendix C Source Control
Appendix D Software Engineering and Game Design Documentation
Appendix E Resources
Glossary
Index
Table of Contents
Introduction . . . . . . . . . . . . . . . . . xxxiv
Chapter 1 Gettingch into the Game . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1
Software Engineering and Game Development . . . . . . . . . . . . . . . . . .1
Engineering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2
Cottage Industries and Formalized Disciplines . . . . . . . . . . . . . . . . . . .3
Repetition and Perfection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
To Engineer Is... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5
The Path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
Integrity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10
Answering Risk with Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11
Game Design and Software Design . . . . . . . . . . . . . . . . . . . . . . . . . . .13
Design and Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14
Class Design and Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . .16
Refactoring and Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17
Development and Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19
Code Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21
Learning and Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21
Maintenance and Revision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23
Measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23
The Industry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23
Profession and Craft . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26
Chapter 2 Requirements—Getting the Picture . . . . . . . . . . . . . . . . . .27
Essential Notions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .28
What Are Requirements? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .28
Where Do Requirements Originate? . . . . . . . . . . . . . . . . . . . . . .29
Who Gathers Requirements? . . . . . . . . . . . . . . . . . . . . . . . . . . . .31
Why Do You Need Requirements? . . . . . . . . . . . . . . . . . . . . . . . .32
What Results from Requirements? . . . . . . . . . . . . . . . . . . . . . . . .33
Avoiding Difficulties with Requirements . . . . . . . . . . . . . . . . . . . . . .35
Establish the Scope of the Project . . . . . . . . . . . . . . . . . . . . . . . .36
Identify Your Customers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .38
Feasibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .38
Uncontrolled Growth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39
What Makes a Good Requirements Specification? . . . . . . . . . . . . . . .40
Make Requirements Complete . . . . . . . . . . . . . . . . . . . . . . . . . . .41
Make Requirements Correct . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41
Necessary Requirements Only . . . . . . . . . . . . . . . . . . . . . . . . . . . .42
Consider the Feasibility of a Requirement . . . . . . . . . . . . . . . . . .42
Requirement Priorities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43
Eliminate Ambiguity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43
Verify and Validate Requirements . . . . . . . . . . . . . . . . . . . . . . . .43
Manage Requirements for Change . . . . . . . . . . . . . . . . . . . . . . . .44
Engineering Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44
Iterative Increments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44
Cycles of Requirements Development . . . . . . . . . . . . . . . . . . . . .45
Eliciting Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .46
The Requirements Specification Document . . . . . . . . . . . . . . . . .47
Using the Design Document for the Game . . . . . . . . . . . . . . . . .52
Using Mod Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .55
Preliminaries of Use Case Exploration . . . . . . . . . . . . . . . . . . . . .55
Exploration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .58
Using Use Case Diagrams and Scenarios . . . . . . . . . . . . . . . . . . . .59
The Sixty-Seconds-of-Play Use Case Diagram . . . . . . . . . . . . . . . .60
Making a Starting Specification List . . . . . . . . . . . . . . . . . . . . . . .61
Finding Potential Class Names . . . . . . . . . . . . . . . . . . . . . . . . . . .63
Using a TOR Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .63
Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .64
Using Use Cases to Analyze Actions . . . . . . . . . . . . . . . . . . . . . . .65
Activity Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .68
Refinement, Verification, and Validation . . . . . . . . . . . . . . . . . . . . . .68
Using Use Cases for Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .69
Using a Requirements Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . .70
Refining Specification Dependencies . . . . . . . . . . . . . . . . . . . . . .70
Anticipating and Managing Change . . . . . . . . . . . . . . . . . . . . . . . . . .71
Change Procedures and Reviews . . . . . . . . . . . . . . . . . . . . . . . . .71
Document Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .72
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .72
Chapter 3 A Tutorial: UML and Object-Oriented Programming . . . . . .75
UML History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .75
A UML Diagram and Its Elements . . . . . . . . . . . . . . . . . . . . . . . . .76
Why Bother with Symbols? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .77
Starter Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .79
UML Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .80
Use Case Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .83
Use Cases Tell Stories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .84
What If? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .85
Different Use Cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .87
Activity Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .89
Class Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .91
Class and Object Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .92
Class Diagrams in Practice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .93
Diagramming a Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .94
Class Relations and Class Diagrams . . . . . . . . . . . . . . . . . . . . . . . .96
Generalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .99
Associations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .102
Aggregation and Composition . . . . . . . . . . . . . . . . . . . . . . . . . .105
Different Types of Association . . . . . . . . . . . . . . . . . . . . . . . . . .106
Object Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .107
Links, Dynamic Modeling, and Messages . . . . . . . . . . . . . . . . . .109
Message Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .110
Message Arrows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .110
Message Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .111
Sequence Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .112
Objects and Lifelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .112
How to Read Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .113
Collaboration Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .113
State Chart Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .114
Events, States, and Transitions . . . . . . . . . . . . . . . . . . . . . . . . . .115
More on State Transitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .116
Component Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .116
Package Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .118
Deployment Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .118
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .119
Chapter 4 Software Design—Much Ado About Something . . . . . . .121
Beginning Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .122
Why Design? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .122
Architecture and Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125
Designing for Quality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .132
Maintainability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .133
Portability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .133
Usability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .134
Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .134
Testability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .134
Efficiency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .134
Reliability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .135
Finding Elements and Relationships . . . . . . . . . . . . . . . . . . . . . . . . .135
CRC Cards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .137
Using the TOR Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .138
Generating Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .140
Moving to a Sequence Diagram . . . . . . . . . . . . . . . . . . . . . . . . .140
Reframing Operations with a Collaboration Diagram . . . . . . . .142
Low-Level Design Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .143
Class Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .143
Operation Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .145
Component/Package Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . .146
Presenting the System Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .146
The SDD Template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .147
How to Set Up the SDD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .147
Introducing an SDD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .148
Conceptual or Use Case View . . . . . . . . . . . . . . . . . . . . . . . . . . .150
Behavioral or Implementation View . . . . . . . . . . . . . . . . . . . . . .150
Logical View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .150
Component View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .150
Deployment View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .151
Designing the System in Stripes . . . . . . . . . . . . . . . . . . . . . . . . . . . .151
Increments and Iteration in Stripes . . . . . . . . . . . . . . . . . . . . . . .151
Team Efforts at Designing System Stripes . . . . . . . . . . . . . . . . . .152
A First Stripe from Ankh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .154
Beginning a Stripe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .155
The Use Case for the First Stripe . . . . . . . . . . . . . . . . . . . . . . . . .156
Starting with a Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .156
Discovering a Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .157
Moving to a Scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .158
Stripe Collaboration Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . .160
Refining Operations and Generating Classes . . . . . . . . . . . . . . .160
Creating the Component Diagram . . . . . . . . . . . . . . . . . . . . . . . . . .162
Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .162
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .163
Chapter 5 Old Is Good—The Library Approach . . . . . . . . . . . . . . . . .165
Libraries and Reuse in General . . . . . . . . . . . . . . . . . . . . . . . . . . . . .165
Open C++ Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .167
Game Engine Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .167
Profiled Engines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .168
Criteria for Reuse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .169
What Qualifies for Reusable . . . . . . . . . . . . . . . . . . . . . . . . . . . .170
The Problems of Creating Reusable Code . . . . . . . . . . . . . . . . . .171
Taking a Class Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .172
Using Standard Class Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . .173
Class Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .175
Making Code Efficient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .178
Needless Declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .178
Needless Copying . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .179
Reference Counting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .180
Exceptions and Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .182
Try and Catch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .183
Declaring Exception Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . .184
Defining Exception Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . .184
Throwing Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .187
Compatibility and Maintainability . . . . . . . . . . . . . . . . . . . . . . . . . .188
Reducing Redundancy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .188
The Danger of Early Optimization . . . . . . . . . . . . . . . . . . . . . . .191
Using Shallow Hierarchies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .191
Installation and Ease of Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .191
The Boost and STL Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .193
Using the STL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .194
Using Boost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .195
Documentation and Deployment . . . . . . . . . . . . . . . . . . . . . . . . . . .196
Watch for Cut-and-Paste Code . . . . . . . . . . . . . . . . . . . . . . . . . .196
Do Not Address Obvious Things . . . . . . . . . . . . . . . . . . . . . . . . .196
State the Common Use First . . . . . . . . . . . . . . . . . . . . . . . . . . . .197
Show How to Do Things . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .197
Avoid Preaching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .198
Self-Documenting Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .198
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .199
Chapter 6 Object-Oriented Fantasies and Realities . . . . . . . . . . . . . .201
Class Beginnings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .201
The Concept of Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .202
Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .202
Construction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .203
Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .203
Abstraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .205
Abstract States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .205
Abstract Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .205
Encapsulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .206
Cohesion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .207
Responsibilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .208
Coupling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .208
Decoupling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .209
Inheritance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .210
Generalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .210
Specialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .211
Associations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .213
Aggregation or Hierarchy? . . . . . . . . . . . . . . . . . . . . . . . . . . . . .213
Aggregation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .214
Composition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .214
Abstract Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .215
Polymorphism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .216
Coupling Problems with Collections of Classes . . . . . . . . . . . . . . . . .217
Points on Class Design and Implementation . . . . . . . . . . . . . . . . . . .218
Information Hiding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .219
Refactoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .220
Modularity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .220
What Destroys Modularity? . . . . . . . . . . . . . . . . . . . . . . . . . . . .222
General Remedies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .223
Using Refactoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .224
Practices of Refactoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .224
Specific Ills and Remedies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .225
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .230
Chapter 7 P Is for Pattern . . . . . . . . . . . . . . .233
Patterns and Their Contexts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .234
The History of Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .234
Patterns and Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .237
Pattern Origins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .238
GoF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .239
Kinds of Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .240
A Short List of Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .241
How to Document Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . .244
Applied Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .248
Singleton . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .249
Composite Pattern Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .251
Chain of Responsibility Pattern Features . . . . . . . . . . . . . . . . . . . . .252
State Pattern Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .253
Strategy Pattern Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .254
Observer Pattern Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .255
Façade Pattern Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .257
Memento Pattern Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .258
Command Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .259
Boss Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .261
Boss Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .262
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .267
Chapter 8 Risk Analysis . . . . . .. . . . . . . . . .269
The Story of Risk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .269
Applied Risk Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .271
External Risks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .272
Internal Risks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .273
What Promotes Risk Assessment? . . . . . . . . . . . . . . . . . . . . . . . . . . .274
General Attitudes Toward Risk and Risk Management . . . . . . .274
Things That Foster Awareness . . . . . . . . . . . . . . . . . . . . . . . . . .277
Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .279
Strategies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .280
The Paradigm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .281
Identifying Risks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .282
Scope Risk Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .283
Schedule Risks Identification . . . . . . . . . . . . . . . . . . . . . . . . . . .286
Resource Risk Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . .287
Estimating Risk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .290
Scope Risk Estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .290
Schedule Risk Estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .291
Resource Risk Estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .293
Evaluating Risk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .294
Evaluating Risks That Are Associated with Scope . . . . . . . . . . . .294
Evaluating Schedule Risks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .295
Evaluating Resource Risks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .296
Planning for Risks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .297
Planning and Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .298
Planning and Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .298
Planning and Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .299
Controlling Risks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .299
Scope Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .300
Schedule Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .300
Resource Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .300
Monitoring Risks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .301
Scope Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .301
Schedule Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .301
Resource Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .301
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .302
Chapter 9 Iterating Design . . . . . . . . . . . . . . .303
Iterative Design Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .304
Applied Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .305
Software Systems and Gravity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .307
Reversing Gravity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .307
Conceptualizing Iteration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .307
Ankh Development Using Stripes . . . . . . . . . . . . . . . . . . . . . . . . . . .309
Stripe 1—Opening . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .309
Use Case Scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .310
Component View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .310
Stripe 2.1—GUI Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .310
Use Slider Use Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .311
GUI Objects Component View . . . . . . . . . . . . . . . . . . . . . . . . . .311
Stripe 2.2—Floor Tiling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .312
Select Tile Use Case View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .312
Level Floor Tiling Component View . . . . . . . . . . . . . . . . . . . . . .313
Stripe 2.3—Mesh Placement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .315
Select a Building Use Case View . . . . . . . . . . . . . . . . . . . . . . . . .315
Mesh Placement Component View . . . . . . . . . . . . . . . . . . . . . . .315
Stripe 2.4—Save and Load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .316
Save a Map Use Case View . . . . . . . . . . . . . . . . . . . . . . . . . . . . .316
Save and Load Component View . . . . . . . . . . . . . . . . . . . . . . . .317
Stripe 3.1—Navigate Alexandria . . . . . . . . . . . . . . . . . . . . . . . . . . . .318
Navigate Alexandria Use Case View . . . . . . . . . . . . . . . . . . . . . .318
Navigate Alexandria Component View . . . . . . . . . . . . . . . . . . .319
Stripe 4—Character Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .320
Create Character Profile Use Case View . . . . . . . . . . . . . . . . . . .320
Character Editor Component View . . . . . . . . . . . . . . . . . . . . . . .321
Stripe 5—Unit Physics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .322
Walk Character Use Case View . . . . . . . . . . . . . . . . . . . . . . . . . .322
Unit Physics Component View . . . . . . . . . . . . . . . . . . . . . . . . . .323
Stripe 6—Inventory Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .324
Select Inventory Items Use Case View . . . . . . . . . . . . . . . . . . . . .324
Inventory Items Component View . . . . . . . . . . . . . . . . . . . . . . .325
Stripe 7—Combat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .326
Battle Guard Use Case View . . . . . . . . . . . . . . . . . . . . . . . . . . . .326
Battle Guard Component View . . . . . . . . . . . . . . . . . . . . . . . . . .327
Stripe 8—Acquire Skills . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .328
Acquire Skills Use Case View . . . . . . . . . . . . . . . . . . . . . . . . . . . .328
Acquire Skills Component View . . . . . . . . . . . . . . . . . . . . . . . . .329
Stripe 9—Acquire Weapon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .330
Acquire Weapon Use Case View . . . . . . . . . . . . . . . . . . . . . . . . .330
Acquire Weapon Component View . . . . . . . . . . . . . . . . . . . . . .331
Stripe 10—View Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .332
View Strengths Use Case View . . . . . . . . . . . . . . . . . . . . . . . . . .332
View Statistics Component View . . . . . . . . . . . . . . . . . . . . . . . .333
Stripe 13—Save Replay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .334
Save Replay Use Case View . . . . . . . . . . . . . . . . . . . . . . . . . . . . .334
Save Replay Component View . . . . . . . . . . . . . . . . . . . . . . . . . .335
Map Editor Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .336
Construction Using the Map Editor . . . . . . . . . . . . . . . . . . . . . . . . . .337
Game Design Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .338
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .340
Chapter 10 Control Freaks and Configuration Management . . . . . . .341
Software Configuration Management in General . . . . . . . . . . . . . .342
Policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .343
Defining Roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .343
Change Control Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . .344
Setting Up the System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .346
Selection of Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .346
Version Control Applications . . . . . . . . . . . . . . . . . . . . . . . . . . .347
TortoiseCVS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .348
Installer Creation Applications . . . . . . . . . . . . . . . . . . . . . . . . . .349
Problem Reporting Applications . . . . . . . . . . . . . . . . . . . . . . . . .350
Creating an SCM Plan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .351
Using a Template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .351
Coding Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .353
Reviewing the Plan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .353
Development Activities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .354
Auditing Program States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .354
Build Activities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .355
Program Files and Components . . . . . . . . . . . . . . . . . . . . . . . . .355
Controlling Development Domains . . . . . . . . . . . . . . . . . . . . . .357
Baselined Versions and Releases . . . . . . . . . . . . . . . . . . . . . . . . .357
Branching Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .359
Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .359
Architecting Branching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .364
Branching and Version Control Practices . . . . . . . . . . . . . . . . . . . . .367
Promotion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .369
Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .370
Quality Assurance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .370
Beta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .371
Release . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .371
Management Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .371
Individual Practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .371
Test Coordination Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .374
Disaster Recovery Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .374
Automated Builds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .375
Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .375
ISTool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .375
Creating a Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .376
Adding a Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .377
Compiling and Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .377
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .379
Chapter 11 Evident Evil—The Art of Testing . . . . . . . . . . . . . . . . . . . .381
Basics of Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .381
Three Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .383
Formalized Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .385
Approaches to Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .387
General Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .387
Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .388
Architectural . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .388
Detail (Class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .389
Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .389
The “V” Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .390
Ways to Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .391
Inspection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .391
Unit or Class Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .392
Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .393
System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .394
Planning Activities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .394
Project Test Plan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .395
Component/Class Test Plan . . . . . . . . . . . . . . . . . . . . . . . . . . . . .396
Integration Test Plan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .397
System Test Plan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .398
Acceptance Test Plan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .398
Organizing Test Planning Documents . . . . . . . . . . . . . . . . . . . . .399
Using Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .399
IEEE 829 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .400
Test Case Template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .404
Test Report Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .407
Tables for Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .410
Testing Activities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .413
Test Cases and Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . .413
Converting Use Cases to Test Cases . . . . . . . . . . . . . . . . . . . . . .414
Using Outlines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .414
Test Suites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .414
Black-Box Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .415
White-Box Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .415
Assessing Risks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .419
Coverage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .420
Complexity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .421
Orthogonal Defect Categories . . . . . . . . . . . . . . . . . . . . . . . . . .422
Impact . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .425
Testing Roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .427
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .427
Chapter 12 Numbers for Nabobs . . . . . . . . . . . . . . .429
Justifications for Collecting Metrics . . . . . . . . . . . . . . . . . . . . . . . . .430
Key Metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .430
Information Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .431
Metrical Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .432
Where to Find Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .433
Object-Oriented Product Data . . . . . . . . . . . . . . . . . . . . . . . . . .433
Core Metrics for Projects and Processes . . . . . . . . . . . . . . . . . . .434
Benchmarking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .436
Relationships . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .436
Regression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .438
Terms of Regression for Line Graphs . . . . . . . . . . . . . . . . . . . . .439
Trend Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .441
Pareto . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .442
Statistical Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .443
Sigma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .444
Six Sigma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .444
Picturing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .446
Divisions of Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .450
Descriptive Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .450
Inferential Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .451
Statistical Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .453
Summing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .453
Standard Deviation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .460
Validity and Reliability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .461
Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .463
Static Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .463
Dynamic Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .463
The Rayleigh Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .464
Rayleigh Applied . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .465
Ankh Metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .466
Lines of Code and Stripes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .466
Requirements and Stripes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .467
Collaborative Complexity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .469
Function Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .470
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .472
Chapter 13 What People Do—Development Strategies . . . . . . . . . . .473
Starting Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .473
Team Formation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .474
Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .475
Working with Software Design . . . . . . . . . . . . . . . . . . . . . . . . .477
Setting Up Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .477
SmartDraw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .477
Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .479
CVS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .480
Concept Formation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .481
Requirements Ruminations . . . . . . . . . . . . . . . . . . . . . . . . . . . . .482
Formalizing Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . .482
Working with Conceptual Tools . . . . . . . . . . . . . . . . . . . . . . . . .482
Designing Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .485
Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .486
Project Planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .487
Beginning Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .487
Design Again—Low Level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .488
Configuration Formalities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .490
Coding Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .491
Libraries and Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .492
Working with Specifications and Plans . . . . . . . . . . . . . . . . . . . . . . .492
Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .494
Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .494
Project Plan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .496
Configuration Management and Version Control . . . . . . . . . . .498
Applying Coding Conventions . . . . . . . . . . . . . . . . . . . . . . . . . .499
Test Plan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .502
Release Plan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .502
Quality Assurance Plan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .503
Settling Disputes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .504
Reaching the Goal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .505
Alpha and Beta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .505
Gathering It Together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .506
Reviewing the Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .507
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .508
Chapter 14 Practice, Practice, Practice . . . . . . . . . . . . . . . . . . . . . . . . .511
Software Revision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .511
Modifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .512
Scope and Complexity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .513
Technical Symmetry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .514
Gauging the Impact of Requirements . . . . . . . . . . . . . . . . . . . . . . . .515
Linear Growth in Complexity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .517
Determining the Scope of Revisions . . . . . . . . . . . . . . . . . . . . . . . . .518
Changes to Ankh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .519
Optimization Candidates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .519
General Risk Assessment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .520
Optimization Selections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .521
Ranks of Difficulty and Priority . . . . . . . . . . . . . . . . . . . . . . . . . .523
Evaluating Classes and Operations . . . . . . . . . . . . . . . . . . . . . . .524
Specifying Revisions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .530
Use Case Confirmation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .531
Configuring Revisions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .532
Designing Revisions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .532
Implementing Revisions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .533
Testing Revisions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .534
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .536
Chapter 15 Team Work . . . . . . . . . . . . . . . . . .539
Basic Tendencies of Teams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .539
When Teams Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .541
Formal Measures of Team Formation . . . . . . . . . . . . . . . . . . . . .544
How Team Numbers Are Determined . . . . . . . . . . . . . . . . . . . . .546
What Teams Do . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .546
When Teams Dissolve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .547
Important Factors in Team Formation . . . . . . . . . . . . . . . . . . . . . . . .547
Technical Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .548
Emotional Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .548
Finding a Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .549
Formal Development Roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . .550
Personal Project Roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .552
Combining Formal and Personal Roles . . . . . . . . . . . . . . . . . . . . . . .554
Team Activities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .555
Aligned Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .556
Participating in the Information Flow . . . . . . . . . . . . . . . . . . . .559
Review Strategies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .560
Building a Team . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .562
Managing Project Team Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .565
Project Leadership . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .565
Project Management Skills . . . . . . . . . . . . . . . . . . . . . . . . . . . . .566
Means of Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .567
WBSs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .567
WBS Task Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .569
PERT Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .569
Gantt Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .570
Why Projects Fail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .571
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .574
Chapter 16 Process Improvement . . . . . . . . . . . . . . .577
The Basics of Process Improvement . . . . . . . . . . . . . . . . . . . . . . . . . .578
Quality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .579
Cycles of Quality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .580
Contrasting Approaches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .581
ISO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .582
ISO in General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .582
ISO 9000 Specifics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .583
ISO Suggestions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .585
The ISO and CMM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .587
Means and Ends—Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .589
IEEE Standard 730 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .589
SEI Key Process Area Template . . . . . . . . . . . . . . . . . . . . . . . . . .594
Template Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .595
CMM Background Information . . . . . . . . . . . . . . . . . . . . . . . . . .596
The CMM, CMMI, and PSP . . . . . . . . . . . . . . . . . . . . . . . . . . . . .596
Levels of Maturity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .597
Key Process Areas and Key Practices . . . . . . . . . . . . . . . . . . . . . .600
The Continuous Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .602
Making Change Happen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .605
Approaches to Improvement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .609
SEPG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .609
Source of the Initial Process . . . . . . . . . . . . . . . . . . . . . . . . . . . .610
Journals and Personalized Endeavors . . . . . . . . . . . . . . . . . . . . .612
Reviews . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .614
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .614
Chapter 17 Release Planning and Management . . . . . . . . . . . . . . . . .617
Release Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .617
Structuring Releases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .618
Code Complete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .619
Alpha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .625
Beta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .628
Production Releases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .631
Updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .632
Numbering Products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .632
Release . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .634
Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .634
Update (or Upgrade) Level . . . . . . . . . . . . . . . . . . . . . . . . . . . . .635
Test Level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .636
Tracking Information for Release Activities . . . . . . . . . . . . . . . . . . .636
Tracking Build Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . .637
Tracking Release Information . . . . . . . . . . . . . . . . . . . . . . . . . . .639
Tracking Defects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .641
Making the Decision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .644
Summary Development Data . . . . . . . . . . . . . . . . . . . . . . . . . . .644
The Release Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .644
Release Signoff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .645
Establishing Software Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . .646
Obtaining Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .646
Categories of Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . .647
Reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .650
The Maintenance Process and Tiers . . . . . . . . . . . . . . . . . . . . . .653
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .656
Chapter 18 Documentation—Learning How to Learn . . . . . . . . . . . . .659
The Concept of Information Management . . . . . . . . . . . . . . . . . . . .660
Sharing Knowledge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .662
Overcoming Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .663
Learning Through Documentation . . . . . . . . . . . . . . . . . . . . . . . . . .665
Pathways of Learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .665
Participation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .670
Nondocumentation-Centered Information Management . . . . .671
Teaching Culture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .672
Technical Versus Customer Documentation . . . . . . . . . . . . . . . . . . .673
Different Approaches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .674
Journaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .674
Indexed Journaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .674
Content Management Systems . . . . . . . . . . . . . . . . . . . . . . . . . .675
E-Mail Exchanges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .676
Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .676
What Is a Template? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .677
Where to Find Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .677
How to Use Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .679
Document Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .680
Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .680
Numbering Systems and Baselines . . . . . . . . . . . . . . . . . . . . . . .681
Ownership Responsibilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . .681
Document Reviews . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .682
Anticipating Reviews . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .683
Conducting Reviews . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .683
Team Focus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .684
Approaches to Storage and Display . . . . . . . . . . . . . . . . . . . . . .685
Tools for Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .685
Word Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .685
Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .686
Technical Drawings and UML . . . . . . . . . . . . . . . . . . . . . . . . . . .686
Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .686
Preventing Excesses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .687
Using a Standard Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .687
Relating Documents to Each Other . . . . . . . . . . . . . . . . . . . . . .687
Reducing Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .688
Keeping Only Essential Material . . . . . . . . . . . . . . . . . . . . . . . . .688
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .688
Chapter 19 Philosophy of Software Engineering
and Game Development . . . . . . . . . .691
The New Undertaking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .691
Defining the Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .692
Formal Engineering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .692
Software Engineering Areas of Knowledge . . . . . . . . . . . . . . . .693
Science and Engineering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .694
Complex Products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .695
Professional Licensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .696
Why Licensing? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .697
Back a Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .697
Practice, Not Licensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .698
A Challenge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .700
Professionals as Craftsmen and Artists . . . . . . . . . . . . . . . . . . . . . . .700
Inertia and Innovation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .701
Finding Your Development Style . . . . . . . . . . . . . . . . . . . . . . . . . . . .703
Craft, Engineering, and Style . . . . . . . . . . . . . . . . . . . . . . . . . . .703
Evolving Style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .703
Large Companies Versus Small Companies . . . . . . . . . . . . . . . . . . . .705
Group Specialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .705
Project Orientation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .706
Working Within the Large Organizational Structure . . . . . . . . .706
Seeking Core Knowledge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .707
How to Learn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .708
Learning Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .709
Finding a Place to Learn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .713
Specialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .714
Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .714
Workable Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .716
Growth Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .717
Working Metaphors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .718
Taking It Seriously . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .719
Ethics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .720
The IEEE/ACM Code of Ethics . . . . . . . . . . . . . . . . . . . . . . . . . . .720
Applied Ethics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .721
Social Implications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .722
Satisfaction with Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .722
Workflows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .723
Parallel Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .724
Information and Publications . . . . . . . . . . . . . . . . . . . . . . . . . . .725
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .727
Appendix A Installation and Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . .731
Viewing the Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .737
The Ankh Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .737
The Stripe Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .738
The Bin Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .739
The Documentation Directory . . . . . . . . . . . . . . . . . . . . . . . . . .739
Playing the Game . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .740
Uninstall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .740
Installing SmartDraw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .740
Appendix B Working with Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .741
The Ankh Source Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .741
The SmartDraw Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .742
Obtaining TortoiseCVS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .743
Appendix C Source Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .743
Locking and Simultaneous File Access . . . . . . . . . . . . . . . . . . . . . . . .743
Repositories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .744
File Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .744
Setting Up a Repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .745
Adding Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .746
Checking Out Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .747
Updating Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .748
Appendix D Software Engineering and Game Design
Documentation . . . . . . . . . . . . . . . . .751
List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .751
Ankh Game Design Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . .752
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .753
Lead Game Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .753
Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .753
Units and Characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .754
Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .754
Characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .755
Attributes, Skills, and Experience . . . . . . . . . . . . . . . . . . . . . . . .755
New Characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .758
Level Dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .759
Level Discriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .765
Level 1: Streets of Alexandria . . . . . . . . . . . . . . . . . . . . . . . . . . .766
Battles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .768
Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .770
Ankh Software Requirements Specification . . . . . . . . . . . . . . . . . . .771
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .772
Perspective . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .772
Product Functions System Decomposition View . . . . . . . . . . . . .772
User Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .773
Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .773
Assumptions and Dependencies . . . . . . . . . . . . . . . . . . . . . . . . .774
External Resource Requirements . . . . . . . . . . . . . . . . . . . . . . . .774
User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .774
Hardware Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .774
Software Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .774
Communications Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . .774
Functional Requirements Views . . . . . . . . . . . . . . . . . . . . . . . . .774
Primary List of Functional Requirements . . . . . . . . . . . . . . . . . .775
Functional Requirements Component View . . . . . . . . . . . . . . . .778
Use Case View of the Requirements . . . . . . . . . . . . . . . . . . . . . .780
Design Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .780
Availability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .780
Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .780
Maintainability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .780
Other Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .780
Use Cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .780
Ankh Software Design Specification . . . . . . . . . . . . . . . . . . . . . . . . .786
Purpose and Layout of the Document . . . . . . . . . . . . . . . . . . . .786
Source Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .786
CRC Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .786
Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .787
Use Cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .787
TOR Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .788
Glossary and Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .788
Component Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .789
List of System Stripes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .790
Stripe 1: Start of Game . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .790
Stripe 2.2: Floor Tiling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .798
Stripe 2.3: Mesh Placement . . . . . . . . . . . . . . . . . . . . . . . . . . . . .801
Stripe 2.4: Save and Load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .804
Sample CRC Cards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .807
Appendix E Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .811
Software Engineering Glossaries and Topics . . . . . . . . . . . . . . . . . . .811
Code Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .811
Topical Sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .812
Commercial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .812
History and Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .813
Reviews . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .814
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 815
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 821
●▬▬▬▬▬❂❂❂▬▬▬▬▬●
●▬▬❂❂▬▬●
●▬❂▬●
●❂●