Cover of: Code Complete | Steve McConnell

Code Complete

2 edition

Published by Microsoft Press .
Written in English.

About the Book

First Sentence

Developing computer software can be a complicated process, and in the last 25 years, researchers have identified numerous distinct activities that go into software development.

Table of Contents

Preface p. xix
Acknowledgments p. xxvii
List of Checklists p. xxix
List of Tables p. xxxi
List of Figures p. xxxiii
Part I Laying the Foundation
1 Welcome to Software Construction p. 3
1.1 What Is Software Construction? p. 3
1.2 Why Is Software Construction Important? p. 6
1.3 How to Read This Book p. 8
2 Metaphors for a Richer Understanding of Software Development p. 9
2.1 The Importance of Metaphors p. 9
2.2 How to Use Software Metaphors p. 11
2.3 Common Software Metaphors p. 13
3 Measure Twice, Cut Once: Upstream Prerequisites p. 23
3.1 Importance of Prerequisites p. 24
3.2 Determine the Kind of Software You're Working On p. 31
3.3 Problem-Definition Prerequisite p. 36
3.4 Requirements Prerequisite p. 38
3.5 Architecture Prerequisite p. 43
3.6 Amount of Time to Spend on Upstream Prerequisites p. 55
4 Key Construction Decisions p. 61
4.1 Choice of Programming Language p. 61
4.2 Programming Conventions p. 66
4.3 Your Location on the Technology Wave p. 66
4.4 Selection of Major Construction Practices p. 69
Part II Creating High-Quality Code
5 Design in Construction p. 73
5.1 Design Challenges p. 74
5.2 Key Design Concepts p. 77
5.3 Design Building Blocks: Heuristics p. 87
5.4 Design Practices p. 110
5.5 Comments on Popular Methodologies p. 118
6 Working Classes p. 125
6.1 Class Foundations: Abstract Data Types (ADTs) p. 126
6.2 Good Class Interfaces p. 133
6.3 Design and Implementation Issues p. 143
6.4 Reasons to Create a Class p. 152
6.5 Language-Specific Issues p. 156
6.6 Beyond Classes: Packages p. 156
7 High-Quality Routines p. 161
7.1 Valid Reasons to Create a Routine p. 164
7.2 Design at the Routine Level p. 168
7.3 Good Routine Names p. 171
7.4 How Long Can a Routine Be? p. 173
7.5 How to Use Routine Parameters p. 174
7.6 Special Considerations in the Use of Functions p. 181
7.7 Macro Routines and Inline Routines p. 182
8 Defensive Programming p. 187
8.1 Protecting Your Program from Invalid Inputs p. 188
8.2 Assertions p. 189
8.3 Error-Handling Techniques p. 194
8.4 Exceptions p. 198
8.5 Barricade Your Program to Contain the Damage Caused by Errors p. 203
8.6 Debugging Aids p. 205
8.7 Determining How Much Defensive Programming to Leave in Production Code p. 209
8.8 Being Defensive About Defensive Programming p. 210
9 The Pseudocode Programming Process p. 215
9.1 Summary of Steps in Building Classes and Routines p. 216
9.2 Pseudocode for Pros p. 218
9.3 Constructing Routines by Using the PPP p. 220
9.4 Alternatives to the PPP p. 232
Part III Variables
10 General Issues in Using Variables p. 237
10.1 Data Literacy p. 238
10.2 Making Variable Declarations Easy p. 239
10.3 Guidelines for Initializing Variables p. 240
10.4 Scope p. 244
10.5 Persistence p. 251
10.6 Binding Time p. 252
10.7 Relationship Between Data Types and Control Structures p. 254
10.8 Using Each Variable for Exactly One Purpose p. 255
11 The Power of Variable Names p. 259
11.1 Considerations in Choosing Good Names p. 259
11.2 Naming Specific Types of Data p. 264
11.3 The Power of Naming Conventions p. 270
11.4 Informal Naming Conventions p. 272
11.5 Standardized Prefixes p. 279
11.6 Creating Short Names That Are Readable p. 282
11.7 Kinds of Names to Avoid p. 285
12 Fundamental Data Types p. 291
12.1 Numbers in General p. 292
12.2 Integers p. 293
12.3 Floating-Point Numbers p. 295
12.4 Characters and Strings p. 297
12.5 Boolean Variables p. 301
12.6 Enumerated Types p. 303
12.7 Named Constants p. 307
12.8 Arrays p. 310
12.9 Creating Your Own Types (Type Aliasing) p. 311
13 Unusual Data Types p. 319
13.1 Structures p. 319
13.2 Pointers p. 323
13.3 Global Data p. 335
Part IV Statements
14 Organizing Straight-Line Code p. 347
14.1 Statements That Must Be in a Specific Order p. 347
14.2 Statements Whose Order Doesn't Matter p. 351
15 Using Conditionals p. 355
15.1 if Statements p. 355
15.2 Case Statements p. 361
16 Controlling Loops p. 367
16.1 Selecting the Kind of Loop p. 367
16.2 Controlling the Loop p. 373
16.3 Creating Loops Easily--From the Inside Out p. 385
16.4 Correspondence Between Loops and Arrays p. 387
17 Unusual Control Structures p. 391
17.1 Multiple Returns from a Routine p. 391
17.2 Recursion p. 393
17.3 goto p. 398
17.4 Perspective on Unusual Control Structures p. 408
18 Table-Driven Methods p. 411
18.1 General Considerations in Using Table-Driven Methods p. 411
18.2 Direct Access Tables p. 413
18.3 Indexed Access Tables p. 425
18.4 Stair-Step Access Tables p. 426
18.5 Other Examples of Table Lookups p. 429
19 General Control Issues p. 431
19.1 Boolean Expressions p. 431
19.2 Compound Statements (Blocks) p. 443
19.3 Null Statements p. 444
19.4 Taming Dangerously Deep Nesting p. 445
19.5 A Programming Foundation: Structured Programming p. 454
19.6 Control Structures and Complexity p. 456
Part V Code Improvements
20 The Software-Quality Landscape p. 463
20.1 Characteristics of Software Quality p. 463
20.2 Techniques for Improving Software Quality p. 466
20.3 Relative Effectiveness of Quality Techniques p. 469
20.4 When to Do Quality Assurance p. 473
20.5 The General Principle of Software Quality p. 474
21 Collaborative Construction p. 479
21.1 Overview of Collaborative Development Practices p. 480
21.2 Pair Programming p. 483
21.3 Formal Inspections p. 485
21.4 Other Kinds of Collaborative Development Practices p. 492
22 Developer Testing p. 499
22.1 Role of Developer Testing in Software Quality p. 500
22.2 Recommended Approach to Developer Testing p. 503
22.3 Bag of Testing Tricks p. 505
22.4 Typical Errors p. 517
22.5 Test-Support Tools p. 523
22.6 Improving Your Testing p. 528
22.7 Keeping Test Records p. 529
23 Debugging p. 535
23.1 Overview of Debugging Issues p. 535
23.2 Finding a Defect p. 540
23.3 Fixing a Defect p. 550
23.4 Psychological Considerations in Debugging p. 554
23.5 Debugging Tools--Obvious and Not-So-Obvious p. 556
24 Refactoring p. 563
24.1 Kinds of Software Evolution p. 564
24.2 Introduction to Refactoring p. 565
24.3 Specific Refactorings p. 571
24.4 Refactoring Safely p. 579
24.5 Refactoring Strategies p. 582
25 Code-Tuning Strategies p. 587
25.1 Performance Overview p. 588
25.2 Introduction to Code Tuning p. 591
25.3 Kinds of Fat and Molasses p. 597
25.4 Measurement p. 603
25.5 Iteration p. 605
25.6 Summary of the Approach to Code Tuning p. 606
26 Code-Tuning Techniques p. 609
26.1 Logic p. 610
26.2 Loops p. 616
26.3 Data Transformations p. 624
26.4 Expressions p. 630
26.5 Routines p. 639
26.6 Recoding in a Low-Level Language p. 640
26.7 The More Things Change, the More They Stay the Same p. 643
Part VI System Considerations
27 How Program Size Affects Construction p. 649
27.1 Communication and Size p. 650
27.2 Range of Project Sizes p. 651
27.3 Effect of Project Size on Errors p. 651
27.4 Effect of Project Size on Productivity p. 653
27.5 Effect of Project Size on Development Activities p. 654
28 Managing Construction p. 661
28.1 Encouraging Good Coding p. 662
28.2 Configuration Management p. 664
28.3 Estimating a Construction Schedule p. 671
28.4 Measurement p. 677
28.5 Treating Programmers as People p. 680
28.6 Managing Your Manager p. 686
29 Integration p. 689
29.1 Importance of the Integration Approach p. 689
29.2 Integration Frequency--Phased or Incremental? p. 691
29.3 Incremental Integration Strategies p. 694
29.4 Daily Build and Smoke Test p. 702
30 Programming Tools p. 709
30.1 Design Tools p. 710
30.2 Source-Code Tools p. 710
30.3 Executable-Code Tools p. 716
30.4 Tool-Oriented Environments p. 720
30.5 Building Your Own Programming Tools p. 721
30.6 Tool Fantasyland p. 722
Part VII Software Craftsmanship
31 Layout and Style p. 729
31.1 Layout Fundamentals p. 730
31.2 Layout Techniques p. 736
31.3 Layout Styles p. 738
31.4 Laying Out Control Structures p. 745
31.5 Laying Out Individual Statements p. 753
31.6 Laying Out Comments p. 763
31.7 Laying Out Routines p. 766
31.8 Laying Out Classes p. 768
32 Self-Documenting Code p. 777
32.1 External Documentation p. 777
32.2 Programming Style as Documentation p. 778
32.3 To Comment or Not to Comment p. 781
32.4 Keys to Effective Comments p. 785
32.5 Commenting Techniques p. 792
32.6 IEEE Standards p. 813
33 Personal Character p. 819
33.1 Isn't Personal Character Off the Topic? p. 820
33.2 Intelligence and Humility p. 821
33.3 Curiosity p. 822
33.4 Intellectual Honesty p. 826
33.5 Communication and Cooperation p. 828
33.6 Creativity and Discipline p. 829
33.7 Laziness p. 830
33.8 Characteristics That Don't Matter As Much As You Might Think p. 830
33.9 Habits p. 833
34 Themes in Software Craftsmanship p. 837
34.1 Conquer Complexity p. 837
34.2 Pick Your Process p. 839
34.3 Write Programs for People First, Computers Second p. 841
34.4 Program into Your Language, Not in It p. 843
34.5 Focus Your Attention with the Help of Conventions p. 844
34.6 Program in Terms of the Problem Domain p. 845
34.7 Watch for Falling Rocks p. 848
34.8 Iterate, Repeatedly, Again and Again p. 850
34.9 Thou Shalt Rend Software and Religion Asunder p. 851
35 Where to Find More Information p. 855
35.1 Information About Software Construction p. 856
35.2 Topics Beyond Construction p. 857
35.3 Periodicals p. 859
35.4 A Software Developer's Reading Plan p. 860
35.5 Joining a Professional Organization p. 862
Bibliography p. 863
Index p. 885

Edition Notes

Second Edition

The Physical Object

Format Paperback
Pagination xxxvii, 914 p.
Number of pages 914
Dimensions 9.1 x 7.3 x 1.7 inches
Weight 2.6 pounds

ID Numbers

Open Library OL7891116M
Internet Archive codecompleteprac00mcco_361
ISBN 10 0735619670
ISBN 13 9780735619678
OCLC/WorldCat 54974573
Library Thing 41965
Goodreads 4845

No ebook available.


Prefer the physical book? Check nearby libraries with:


Buy this book


History

Download catalog record: RDF / JSON / OPDS
July 28, 2014 Edited by ImportBot import new book
April 6, 2014 Edited by ImportBot Added IA ID.
January 31, 2012 Edited by 173.76.227.7 Pagination, OCLC, Table of Contents
March 1, 2011 Edited by AMillarBot remove edition notes from title (Second Edition)
April 29, 2008 Created by an anonymous user Inital record created, from an amazon.com record.