Code Complete: A Practical Handbook of Software Construction. Redmond, Wa.: Microsoft Press, 880 pages, 1993. Retail price: $35. ISBN: 1-55615-484-4. 

Buy Code Complete from Amazon.com.


Contents 

List of Checklists

Preface

LAYING THE FOUNDATION

1 Welcome to Software Construction
What is Software Construction? Why is Software Construction Important?

2 Metaphors for a Richer Understanding of Programming
The Importance of Metaphors. How to Use Software Metaphors. Common Software Metaphors. Further Reading.

3 Prerequisites to Construction
Importance of Prerequisites. Problem Definition Prerequisite. Requirements Prerequisite. Requirements Checklist. Architecture Prerequisite. Architecture Checklist. Choice-of-Programming-Language Prerequisite. Programming Conventions. Amount of Time to Spend on Prerequisites. Adapting Prerequisites to Your Project.

DESIGN

4 Steps in Building a Routine
Summary of Steps in Building a Routine. PDL for Pros. Design the Routine. Code the Routine. Check the Code Formally. Checklist for Constructing a Routine.

5 Characteristics of High-Quality Routines
Valid Reasons to Create a Routine. Good Routine Names. Strong Cohesion. Loose Coupling. How Long Can a Routine Be? Defensive Programming. How to Use Routine Parameters. Considerations in Using Functions. Macro Routines. Checklist for High-Quality Routines.

6 Three out of Four Programmers Surveyed Prefer Modules
Modularity: Cohesion and Coupling. Information Hiding. Good Reasons to Create a Module. Implementing Modules in Any Language. Module-Quality Checklist.

7 High-Level Design in Construction
Introduction to Software Design. Structured Design. Object-Oriented Design. Comments on Popular Methodologies. Round-Trip Design. High-Level Design Checklist.

DATA

8 Creating Data
Data Literacy. Reasons to Create Your Own Types. Guidelines for Creating Your Own Types. Making Variable Declarations Easy. Guidelines for Initializing Data. Data Creation Checklist.

9 The Power of Data Names
Considerations in Choosing Good Names. Naming Specific Types of Data. The Power of Naming Conventions. Informal Naming Conventions. The Hungarian Naming Convention. Creating Short Names that are Readable. Names to Avoid. Naming Checklist.

10 General Issues in Using Variables
Scope. Persistence. Binding Time. Relationship Between Data Structures and Control Structures. Using a Variable for Multiple Purposes. Global Variables. General Considerations in Using Data Checklist.

11 Fundamental Data Types
Numbers in General. Integers. Floating Point. Characters and Strings. Boolean Variables. Enumerated Types. Named Constants. Arrays. Pointers. Fundamental Data Checklist.

12 Complex Data Types
Records and Structures. Table-Driven Methods. Abstract Data Types (ADTs).

CONTROL

13 Organizing Straight-Line Code
Ordering Statements that Must be in a Specific Order. Ordering Statements When Their Order Doesn't Matter. Organizing Straight-Line Code Checklist.

14 Using Conditionals
if Statements. case Statements. Checklist for Conditionals.

15 Controlling Loops
Selecting the Kind of Loop. Controlling the Loop. Creating Loops the Easy Way-From The Inside Out. Correspondence Between Loops and Arrays. Loop Checklist.

16 Unusual Control Structures
Using gotos. return. Recursion. Checklist for Unusual Control Structures.

17 General Control Issues
Boolean Expressions. Compound Statements (Blocks). Null Statements. Taming the Hazard of Deep Nesting. Tapping into the Power of Structured Programming. Emulating Structured Constructs with gotos. Control Structures and Complexity. Checklist of Control Structure Issues.

CONSTANT CONSIDERATIONS

18 Layout and Style
Layout Fundamentals. Layout Techniques. Layout Styles. Laying Out Control Structures. Laying Out Individual Statements. Laying Out Comments. Laying Out Routines. Laying Out Files, Modules, and Programs. Layout Checklist. Further Reading.

19 Self-Documenting Code
External Documentation. Programming Style as Documentation. Self-Documenting Code Checklist. To Comment Or Not To Comment. Keys to Effective Comments. Commenting Techniques. Commenting Checklist. Further Reading on Documentation.

20 Programming Tools
Design Tools. Source-Code Tools. Executable-Code Tools. Tool-Oriented Environments. Making Your Own Programming Tools. Ideal Programming Environment. Further Reading.

21 How Program Size Affects Construction
Range of Project Sizes. Effect of Size on Development Activities. Effect of Size on Errors. Effect of Size on Productivity. Further Reading.

22 Managing Construction
Encouraging Good Coding. Configuration Management. Configuration Management Checklist. Estimating a Construction Schedule. Improving Your Process. Treating Programmers as People. Managing Your Manager. General Management Issues.

QUALITY IMPROVEMENT

23 The Software Quality Landscape
Characteristics of Software Quality. Techniques for Improving Software Quality. Relative Effectiveness of the Techniques. When to Do Quality Assurance. The General Principle of Software Quality. Checklist for a Quality-Assurance Program. Further Reading.

24 Reviews
Role of Reviews in Software Quality. Inspections. Effective Inspections Checklist. Other Kinds of Reviews. Further Reading.

25 Unit Testing
Role of Unit Testing in Software Quality. General Approach to Unit-Testing. Bag of Testing Tricks. Typical Errors. Test-Support Tools. Improving Your Testing. Test Cases Checklist. Further Reading.

26 Debugging
Overview of Issues in Debugging. Finding an Error. Understanding and Fixing an Error. Psychological Considerations in Debugging. Debugging Tools. Debugging Checklist. Further Reading.

FINAL STEPS

27 System Integration
Importance of the Integration Method. Phased vs. Incremental Integration. Incremental Integration Strategies. Incremental Integration Checklist. Evolutionary Delivery. Evolutionary Delivery Checklist. Further Reading.

28 Code-Tuning Strategies
Performance Overview. Introduction to Code Tuning. Kinds of Fat and Molasses. Summary of Approach to Code Tuning. Further Reading.

29 Code-Tuning Techniques
Loops. Logic. Data Transformations. Expressions. Routines. Recoding in Assembler. Tuning-Techniques Quick Reference. Further Reading.

30 Software Evolution
Kinds of Software Evolution. General Guidelines for Software Evolution. Making New Routines. Code Change Checklist. Further Reading.

SOFTWARE CRAFTSMANSHIP

31 Personal Character
Isn't Personal Character Off the Topic? Intelligence and Humility. Curiosity. Intellectual Honesty. Communication and Cooperation. Creativity and Discipline. Laziness. Characteristics that Don't Matter as Much as You Might Think. Habits. Further Reading.

32 Themes in Software Craftsmanship
Conquer Complexity. Pick Your Process. Write Programs for People First, Computers Second. Focus Your Intellect With Conventions. Program in Terms of the Problem Domain. Watch for Falling Rocks. Iterate, Repeatedly, Again and Again. Thou Shalt Rend Software and Religion Asunder.

33 Where to Go for More Information
The Library of a Software Professional. Information on Software Construction. Summary of "Further Reading." Topics Beyond Construction. Periodicals. Joining a Professional Organization. Addresses and Phone Numbers.

This material is Copyright 1993 by Steven C. McConnell. All Rights Reserved.

 

Email me at stevemcc@construx.com.