Code Complete

by
Edition: 2nd
Format: Paperback
Pub. Date: 2004-06-09
Publisher(s): Microsoft Press
  • Free Shipping Icon

    Free Shipping on all Orders Over $35!*

    *excludes Marketplace items.

  • Complimentary 7-Day eTextbook Access - Read more
    When you rent or buy this book, you will receive complimentary 7-day online access to the eTextbook version from your PC, Mac, tablet, or smartphone. Feature not included on Marketplace Items.
List Price: $54.99

Buy New

Usually Ships in 2-3 Business Days
$53.34

Buy Used

In Stock
$39.59

Rent Book

Select for Price
There was a problem. Please try again later.

Rent Digital

Online: 1825 Days access
Downloadable: Lifetime Access
$42.06
$42.06

This item is being sold by an Individual Seller and will not ship from the Online Bookstore's warehouse. The Seller must confirm the order within two business days. If the Seller refuses to sell or fails to confirm within this time frame, then the order is cancelled.

Please be sure to read the Description offered by the Seller.

Summary

Widely considered one of the best practical guides to programming, Steve McConnell's original CODE COMPLETE has been helping developers write better software for more than a decade. Now this classic book has been fully updated and revised with leading-edge practicesand hundreds of new code samplesillustrating the art and science of software construction. Capturing the body of knowledge available from research, academia, and everyday commercial practice, McConnell synthesizes the most effective techniques and must-know principles into clear, pragmatic guidance. No matter what your experience level, development environment, or project size, this book will inform and stimulate your thinkingand help you build the highest quality code.Discover the timeless techniques and strategies that help you: Design for minimum complexity and maximum creativity Reap the benefits of collaborative development Apply defensive programming techniques to reduce and flush out errors Exploit opportunities to refactoror evolvecode, and do it safely Use construction practices that are right-weight for your project Debug problems quickly and effectively Resolve critical construction issues early and correctly Build quality into the beginning, middle, and end of your project

Author Biography

Steve McConnell is recognized as one of the premier authors and voices in the development community. He is Chief Software Engineer of Construx Software and was the lead developer of Construx Estimate and of SPC Estimate Professional, winner of Software Development magazine's Productivity Award. He is the author of several books, including Code Complete and Rapid Development, both honored with Software Development magazine's Jolt Award.

Table of Contents

Prefacep. xix
Acknowledgmentsp. xxvii
List of Checklistsp. xxix
List of Tablesp. xxxi
List of Figuresp. xxxiii
Laying the Foundation
Welcome to Software Constructionp. 3
What Is Software Construction?p. 3
Why Is Software Construction Important?p. 6
How to Read This Bookp. 8
Metaphors for a Richer Understanding of Software Developmentp. 9
The Importance of Metaphorsp. 9
How to Use Software Metaphorsp. 11
Common Software Metaphorsp. 13
Measure Twice, Cut Once: Upstream Prerequisitesp. 23
Importance of Prerequisitesp. 24
Determine the Kind of Software You're Working Onp. 31
Problem-Definition Prerequisitep. 36
Requirements Prerequisitep. 38
Architecture Prerequisitep. 43
Amount of Time to Spend on Upstream Prerequisitesp. 55
Key Construction Decisionsp. 61
Choice of Programming Languagep. 61
Programming Conventionsp. 66
Your Location on the Technology Wavep. 66
Selection of Major Construction Practicesp. 69
Creating High-Quality Code
Design in Constructionp. 73
Design Challengesp. 74
Key Design Conceptsp. 77
Design Building Blocks: Heuristicsp. 87
Design Practicesp. 110
Comments on Popular Methodologiesp. 118
Working Classesp. 125
Class Foundations: Abstract Data Types (ADTs)p. 126
Good Class Interfacesp. 133
Design and Implementation Issuesp. 143
Reasons to Create a Classp. 152
Language-Specific Issuesp. 156
Beyond Classes: Packagesp. 156
High-Quality Routinesp. 161
Valid Reasons to Create a Routinep. 164
Design at the Routine Levelp. 168
Good Routine Namesp. 171
How Long Can a Routine Be?p. 173
How to Use Routine Parametersp. 174
Special Considerations in the Use of Functionsp. 181
Macro Routines and Inline Routinesp. 182
Defensive Programmingp. 187
Protecting Your Program from Invalid Inputsp. 188
Assertionsp. 189
Error-Handling Techniquesp. 194
Exceptionsp. 198
Barricade Your Program to Contain the Damage Caused by Errorsp. 203
Debugging Aidsp. 205
Determining How Much Defensive Programming to Leave in Production Codep. 209
Being Defensive About Defensive Programmingp. 210
The Pseudocode Programming Processp. 215
Summary of Steps in Building Classes and Routinesp. 216
Pseudocode for Prosp. 218
Constructing Routines by Using the PPPp. 220
Alternatives to the PPPp. 232
Variables
General Issues in Using Variablesp. 237
Data Literacyp. 238
Making Variable Declarations Easyp. 239
Guidelines for Initializing Variablesp. 240
Scopep. 244
Persistencep. 251
Binding Timep. 252
Relationship Between Data Types and Control Structuresp. 254
Using Each Variable for Exactly One Purposep. 255
The Power of Variable Namesp. 259
Considerations in Choosing Good Namesp. 259
Naming Specific Types of Datap. 264
The Power of Naming Conventionsp. 270
Informal Naming Conventionsp. 272
Standardized Prefixesp. 279
Creating Short Names That Are Readablep. 282
Kinds of Names to Avoidp. 285
Fundamental Data Typesp. 291
Numbers in Generalp. 292
Integersp. 293
Floating-Point Numbersp. 295
Characters and Stringsp. 297
Boolean Variablesp. 301
Enumerated Typesp. 303
Named Constantsp. 307
Arraysp. 310
Creating Your Own Types (Type Aliasing)p. 311
Unusual Data Typesp. 319
Structuresp. 319
Pointersp. 323
Global Datap. 335
Statements
Organizing Straight-Line Codep. 347
Statements That Must Be in a Specific Orderp. 347
Statements Whose Order Doesn't Matterp. 351
Using Conditionalsp. 355
if Statementsp. 355
Case Statementsp. 361
Controlling Loopsp. 367
Selecting the Kind of Loopp. 367
Controlling the Loopp. 373
Creating Loops Easily--From the Inside Outp. 385
Correspondence Between Loops and Arraysp. 387
Unusual Control Structuresp. 391
Multiple Returns from a Routinep. 391
Recursionp. 393
gotop. 398
Perspective on Unusual Control Structuresp. 408
Table-Driven Methodsp. 411
General Considerations in Using Table-Driven Methodsp. 411
Direct Access Tablesp. 413
Indexed Access Tablesp. 425
Stair-Step Access Tablesp. 426
Other Examples of Table Lookupsp. 429
General Control Issuesp. 431
Boolean Expressionsp. 431
Compound Statements (Blocks)p. 443
Null Statementsp. 444
Taming Dangerously Deep Nestingp. 445
A Programming Foundation: Structured Programmingp. 454
Control Structures and Complexityp. 456
Code Improvements
The Software-Quality Landscapep. 463
Characteristics of Software Qualityp. 463
Techniques for Improving Software Qualityp. 466
Relative Effectiveness of Quality Techniquesp. 469
When to Do Quality Assurancep. 473
The General Principle of Software Qualityp. 474
Collaborative Constructionp. 479
Overview of Collaborative Development Practicesp. 480
Pair Programmingp. 483
Formal Inspectionsp. 485
Other Kinds of Collaborative Development Practicesp. 492
Developer Testingp. 499
Role of Developer Testing in Software Qualityp. 500
Recommended Approach to Developer Testingp. 503
Bag of Testing Tricksp. 505
Typical Errorsp. 517
Test-Support Toolsp. 523
Improving Your Testingp. 528
Keeping Test Recordsp. 529
Debuggingp. 535
Overview of Debugging Issuesp. 535
Finding a Defectp. 540
Fixing a Defectp. 550
Psychological Considerations in Debuggingp. 554
Debugging Tools--Obvious and Not-So-Obviousp. 556
Refactoringp. 563
Kinds of Software Evolutionp. 564
Introduction to Refactoringp. 565
Specific Refactoringsp. 571
Refactoring Safelyp. 579
Refactoring Strategiesp. 582
Code-Tuning Strategiesp. 587
Performance Overviewp. 588
Introduction to Code Tuningp. 591
Kinds of Fat and Molassesp. 597
Measurementp. 603
Iterationp. 605
Summary of the Approach to Code Tuningp. 606
Code-Tuning Techniquesp. 609
Logicp. 610
Loopsp. 616
Data Transformationsp. 624
Expressionsp. 630
Routinesp. 639
Recoding in a Low-Level Languagep. 640
The More Things Change, the More They Stay the Samep. 643
System Considerations
How Program Size Affects Constructionp. 649
Communication and Sizep. 650
Range of Project Sizesp. 651
Effect of Project Size on Errorsp. 651
Effect of Project Size on Productivityp. 653
Effect of Project Size on Development Activitiesp. 654
Managing Constructionp. 661
Encouraging Good Codingp. 662
Configuration Managementp. 664
Estimating a Construction Schedulep. 671
Measurementp. 677
Treating Programmers as Peoplep. 680
Managing Your Managerp. 686
Integrationp. 689
Importance of the Integration Approachp. 689
Integration Frequency--Phased or Incremental?p. 691
Incremental Integration Strategiesp. 694
Daily Build and Smoke Testp. 702
Programming Toolsp. 709
Design Toolsp. 710
Source-Code Toolsp. 710
Executable-Code Toolsp. 716
Tool-Oriented Environmentsp. 720
Building Your Own Programming Toolsp. 721
Tool Fantasylandp. 722
Software Craftsmanship
Layout and Stylep. 729
Layout Fundamentalsp. 730
Layout Techniquesp. 736
Layout Stylesp. 738
Laying Out Control Structuresp. 745
Laying Out Individual Statementsp. 753
Laying Out Commentsp. 763
Laying Out Routinesp. 766
Laying Out Classesp. 768
Self-Documenting Codep. 777
External Documentationp. 777
Programming Style as Documentationp. 778
To Comment or Not to Commentp. 781
Keys to Effective Commentsp. 785
Commenting Techniquesp. 792
IEEE Standardsp. 813
Personal Characterp. 819
Isn't Personal Character Off the Topic?p. 820
Intelligence and Humilityp. 821
Curiosityp. 822
Intellectual Honestyp. 826
Communication and Cooperationp. 828
Creativity and Disciplinep. 829
Lazinessp. 830
Characteristics That Don't Matter As Much As You Might Thinkp. 830
Habitsp. 833
Themes in Software Craftsmanshipp. 837
Conquer Complexityp. 837
Pick Your Processp. 839
Write Programs for People First, Computers Secondp. 841
Program into Your Language, Not in Itp. 843
Focus Your Attention with the Help of Conventionsp. 844
Program in Terms of the Problem Domainp. 845
Watch for Falling Rocksp. 848
Iterate, Repeatedly, Again and Againp. 850
Thou Shalt Rend Software and Religion Asunderp. 851
Where to Find More Informationp. 855
Information About Software Constructionp. 856
Topics Beyond Constructionp. 857
Periodicalsp. 859
A Software Developer's Reading Planp. 860
Joining a Professional Organizationp. 862
Bibliographyp. 863
Indexp. 885
Table of Contents provided by Ingram. All Rights Reserved.

An electronic version of this book is available through VitalSource.

This book is viewable on PC, Mac, iPhone, iPad, iPod Touch, and most smartphones.

By purchasing, you will be able to view this book online, as well as download it, for the chosen number of days.

A downloadable version of this book is available through the eCampus Reader or compatible Adobe readers.

Applications are available on iOS, Android, PC, Mac, and Windows Mobile platforms.

Please view the compatibility matrix prior to purchase.