Preface
Acknowledgments
ListofChecklists
ListofTables
ListofFigures
PartILayingtheFoundation
1WelcometoSoftwareConstruction
1.1WhatIsSoftwareConstruction?
1.2WhyIsSoftwareConstructionImportant?
1.3HowtoReadThisBook
2MetaphorsforaRicherUnderstandingofSoftwareDevelopment
2.1TheImportanceofMetaphors
2.2HowtoUseSoftwareMetaphors
2.3CommonSoftwareMetaphors
3MeasureTwice,CutOnce:UpstreamPrerequisites
3.1ImportanceofPrerequisites
3.2DeterminetheKindofSoftwareYoureWorkingOn
3.3Problem-DefinitionPrerequisite
3.4RequirementsPrerequisite
3.5ArchitecturePrerequisite
3.6AmountofTimetoSpendonUpstreamPrerequisites
4KeyConstructionDecisions
4.1ChoiceofProgrammingLanguage
4.2ProgrammingConventions
4.3YourLocationontheTechnologyWave
4.4SelectionofMajorConstructionPractices
PartIICreatingHigh-QualityCode
5DesigninConstruction
5.1DesignChallenges
5.2KeyDesignConcepts
5.3DesignBuildingBlocks:Heuristics
5.4DesignPractices
5.5CommentsonPopularMethodologies
6WorkingClasses
6.1ClassFoundations:AbstractDataTypes(ADTs)
6.2GoodClassInterfaces
6.3DesignandImplementationIssues
6.4ReasonstoCreateaClass
6.5Language-SpecificIssues
6.6BeyondClasses:Packages
7High-QualityRoutines
7.1ValidReasonstoCreateaRoutine
7.2DesignattheRoutineLevel
7.3GoodRoutineNames
7.4HowLongCanaRoutineBe?
7.5HowtoUseRoutineParameters
7.6SpecialConsiderationsintheUseofFunctions
7.7MacroRoutinesandInlineRoutines
8DefensiveProgramming
8.1ProtectingYourProgramfromInvalidInputs
8.2Assertions
8.3Error-HandlingTechniques
8.4Exceptions
8.5BarricadeYourProgramtoContaintheDamageCausedbyErrors
8.6DebuggingAids
8.7DeterminingHowMuchDefensiveProgrammingtoLeaveinProductionCode
8.8BeingDefensiveAboutDefensiveProgramming
9ThePseudocodeProgrammingProcess
9.1SummaryofStepsinBuildingClassesandRoutines
9.2PseudocodeforPros
9.3ConstructingRoutinesbyUsingthePPP
9.4AlternativestothePPP
PartIIIVariables
10GeneralIssuesinUsingVariables
10.1DataLiteracy
10.2MakingVariableDeclarationsEasy
10.3GuidelinesforInitializingVariables
10.4Scope
10.5Persistence
10.6BindingTime
10.7RelationshipBetweenDataTypesandControlStructures
10.8UsingEachVariableforExactlyOnePurpose
11ThePowerofVariableNames
11.1ConsiderationsinChoosingGoodNames
11.2NamingSpecificTypesofData
11.3ThePowerofNamingConventions
11.4informalNamingConventions
11.5StandardizedPrefixes
11.6CreatingShortNamesThatAreReadable
11.7KindsofNamestoAvoid
12FundamentalDataTypes
12.1NumbersinGeneral
12.2integers
12.3Floating-PointNumbers
12.4CharactersandStrings
12.5BooleanVariables
12.6EnumeratedTypes
12.7NamedConstants
12.8Arrays
12.9CreatingYourOwnTypes(TypeAliasing)
13UnusualDataTypes
13.1Structures
13.2Pointers
13.3GlobalData
PartIVStatements
14OrganizingStraight-LineCode
14.1StatementsThatMustBeinaSpecificOrder
14.2StatementsWhoseOrderDoesntMatter
15UsingConditionals
15.1ifStatements
15.2caseStatements
16ControllingLoops
16.1SelectingtheKindofLoop
16.2ControllingtheLoop
16.3CreatingLoopsEasily--FromtheInsideOut
16.4CorrespondenceBetweenLoopsandArrays
17UnusualControlStructures
17.1MultipleReturnsfromaRoutine
17.2Recursion
17.3goto
17.4PerspectiveonUnusualControlStructures
18Table-DrivenMethods
18.1GeneralConsiderationsinUsingTable-DrivenMethods
18.2DirectAccessTables
18.3IndexedAccessTables
18.4Stair-StepAccessTables
18.5OtherExamplesofTableLookups
19GeneralControlIssues
19.1BooleanExpressions
19.2CompoundStatements(Blocks)
19.3NullStatements.
19.4TamingDangerouslyDeepNesting
19.5AProgrammingFoundation:StructuredProgramming
19.6ControlStructuresandComplexity
PartVCodeImprovements
20TheSoftware-QualityLandscape
20.1CharacteristicsofSoftwareQuality
20.2TechniquesforImprovingSoftwareQuality
20.3RelativeEffectivenessofQualityTechniques
20.4WhentoDoQualityAssurance
20.5TheGeneralPrincipleofSoftwareQuality
21CollaborativeConstruction
21.1OverviewofCollaborativeDevelopmentPractices
21.2PairProgramming
21.3FormalInspections
21.4OtherKindsofCollaborativeDevelopmentPractices
22DeveloperTesting
22.1RoleofDeveloperTestinginSoftwareQuality
22.2RecommendedApproachtoDeveloperTesting
22.3BagofTestingTricks
22.4TypicalErrors
22.5Test-SupportTools
22.6ImprovingYourTesting
22.7KeepingTestRecords
23Debugging
23.1OverviewofDebuggingIssues
23.2FindingaDefect
23.3FixingaDefect
23.4PsychologicalConsiderationsinDebugging
23.5DebuggingTools--ObviousandNot-So-Obvious
24Refactoring
24.1KindsofSoftwareEvolution
24.2IntroductiontoRefactoring
24.3SpecificRefactorings
24.4RefactoringSafely
24.5RefactoringStrategies
25Code-TuningStrategies
25.1PerformanceOverview
25.2IntroductiontoCodeTuning
25.3KindsofFatandMolasses
25.4Measurement
25.5Iteration
25.6SummaryoftheApproachtoCodeTuning
26Code-TuningTechniques
26.1Logic
26.2Loops
26.3DataTransformations
26.4Expressions
26.5Routines
26.6RecodinginaLow-LevelLanguage
26.7TheMoreThingsChange,theMoreTheyStaytheSame
PartVISystemConsiderations
27HowProgramSizeAffectsConstruction
27.1CommunicationandSize
27.2RangeofProjectSizes
27.3EffectofProjectSizeonErrors
27.4EffectofProjectSizeonProductivity
27.5EffectofProjectSizeonDevelopmentActivities
28ManagingConstruction
28.1EncouragingGoodCoding
28.2ConfigurationManagement
28.3EstimatingaConstructionSchedule
28.4Measurement
28.5TreatingProgrammersasPeople
28.6ManagingYourManager
29Integration
29.1ImportanceoftheIntegrationApproach
29.2IntegrationFrequency--PhasedorIncremental?
29.3IncrementalIntegrationStrategies
29.4DailyBuildandSmokeTest
30ProgrammingTools
30.1DesignTools
30.2Source-CodeTools
30.3Executable-CodeTools
30.4Tool-OrientedEnvironments
30.5BuildingYourOwnProgrammingTools
30.6ToolFantasyland
PartVIISoftwareCraftsmanship
31LayoutandStyle
31.1LayoutFundamentals
31.2LayoutTechniques
31.3LayoutStyles
31.4LayingOutControlStructures
31.5LayingOutIndividualStatements
31.6LayingOutComments
31.7LayingOutRoutines
31.8LayingOutClasses
32Self-DocumentingCode
32.1ExternalDocumentation
32.2ProgrammingStyleasDocumentation
32.3ToCommentorNottoComment
32.4KeystoEffectiveComments
32.5CommentingTechniques
32.6IEEEStandards
33PersonalCharacter
33.1IsntPersonalCharacterOfftheTopic?
33.2IntelligenceandHumility
33.3Curiosity
33.4IntellectualHonesty
33.5CommunicationandCooperation
33.6CreativityandDiscipline
33.7Laziness
33.8CharacteristicsThatDontMatterAsMuchAsYouMightThink
33.9Habits
34ThemesinSoftwareCraftsmanship
34.1ConquerComplexity
34.2PickYourProcess
34.3WriteProgramsforPeopleFirst,ComputersSecond
34.4ProgramintoYourLanguage,NotinIt
34.5FocusYourAttentionwiththeHelpofConventions
34.6PrograminTermsoftheProblemDomair
34.7WatchforFallingRocks
34.8Iterate,Repeatedly,AgainandAgain
34.9ThouShaltRendSoftwareandReligionAsunder
35WheretoFindMoreInformation
35.1InformationAboutSoftwareConstruction
35.2TopicsBeyondConstruction
35.3Periodicals
35.4ASoftwareDevelopersReadingPlan
35.5JoiningaProfessionalOrganization
Bibliography
Index