/CodeComplete2ndEdition

Key points from Code Complete 2nd Edition

Code Complete - 2nd Edition

Key points in Code Complete 2nd Edition

Table of Contents

Part I: Laying the Foundation

Part II: Creating High-Quality Code

Part III: Variables

Part IV: Statements

Part V: Code Improvements

Part VI: System Considerations

Part VII: Software Craftsmanship

Laying the Foundation

Chapter 1: Welcome to Software Construction

What is software construction?

Software construction involves:

  1. Problem definition
  2. Requirements development, detailed design, corrective maintenance
  3. Constructive planning, coding and debugging, integration, integration testing
  4. Software architecture, unit testing, system testing

Although software construction is mostly coding and debugging, it also involves detailed design, construction planning, unit testing, integration, integration testing, and other activities.

Specific tasks involved in construction:

  1. Verifying that the groundwork has been laid so that construction can proceed successfully
  2. Designing and writing classes and routines
  3. Creating and naming variables and named constants
  4. Selecting control structures and organizing blocks of statements
  5. Unit testing, integration testing, and debugging your own code
  6. Reviewing other team members' low-level designds and coding and having them review yours
  7. Polishing code by carefully formatting and commenting it
  8. Integrating software components that were created seperately
  9. Tuning code to make it faster and use fewer resources

What's the significance behind software construction?

  • Construction is a large part of software development.
  • Construction is the central acvitity in software development.
    • Requirements and architecture are done before construction so that you can do construction effectively. System testing (in the strict sense of independent testing) is done after construction to verify that construction has been done correctly. Construction is at the center of the software-development process.
  • With a focus in construction, the individual programmer's productivity can improve enormously.
  • Construction’s product, the source code, is often the only accurate description of the software.
  • Construction is the only activity that’s guaranteed to be done

Chapter 3: Measure Twice, Cut Once: Upstream Prerequisites

As with building construction, much of the success and failure of the project has already been determined before the construction begins. If the foundation hasn't been laid well or the planning is inadequate, the best you can do during construction is to keep the damage to a minimum.

If you emphasize quality at the end of the project, you emphasize system testing.

If you emphasize quality in the middle of the project, you emphasize construction practices.

If you emphasize quality in the beginning of the project, you plan for, require, and design a high-quality product.

The overarching goal for prepration is risk reduction: a good project planner clears major risks out of the way as early as possible so that the bulk of the project can proceed as smooth as possible.

3.2 Determine the Kind of Software You're Working On

Different kinds of software projects call for different balances between preparation and construction. Every project is unique, but projects do tend to fall into general development styles.

The iterative project that abbreviates or eliminates prerequisites will differ in two ways from a sequential project that does the same thing. First, average defect correction costs will be lower because defects will tend to be detected closer to the time they were inserted into the software. However, the defects will still be detected late in each iteration, and correcting them will require parts of the software to be redesigned, recoded, and retested—which makes the defect-correction cost higher than it needs to be.

Creating High-Quality Code

Coming soon.

Variables

Coming soon.

Statements

Coming soon.

Code Improvements

Coming soon.

System Considerations

Coming soon.

Software Craftsmanship

Coming soon.