-
Notifications
You must be signed in to change notification settings - Fork 10
/
book.txt
418 lines (313 loc) · 22.4 KB
/
book.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
Copyright
Preface
Who Should Read This Book?
Where Else Can You Find This Information?
Key Benefits of This Handbook
Why This Handbook Was Written
Author Note
Acknowledgments
About the Author
Steve McConnell
Part I: Laying the Foundation
In this part:
Chapter 1. Welcome to Software Construction
Nội dung
1.1 Software Construction là gì?
1.2 Tại sao Software Construction lại quan trọng?
1.3 Hướng dẫn cách đọc cuốn sách này
Section 1.1. What Is Software Construction?
Section 1.2. Why Is Software Construction Important?
Section 1.3. How to Read This Book
Key Points
Chapter 2. Metaphors for a Richer Understanding of Software Development
Chapter 2. Ẩn dụ cho một sự hiểu biết phong phú hơn của phát triển phần mềm
Section 2.1. The Importance of Metaphors
Section 2.1. Tầm quan trọng của phép ẩn dụ
Section 2.2. How to Use Software Metaphors
Section 2.3. Common Software Metaphors
Key Points
Chapter 3. Measure Twice, Cut Once: Upstream Prerequisites
Section 3.1. Importance of Prerequisites
Section 3.2. Determine the Kind of Software You're Working On
Section 3.3. Problem-Definition Prerequisite
Section 3.4. Requirements Prerequisite
Section 3.5. Architecture Prerequisite
Section 3.6. Amount of Time to Spend on Upstream Prerequisites
AdditionalResources
Key Points
Chapter 4. Key Construction Decisions
Section 4.1. Choice of Programming Language
Section 4.2. Programming Conventions
Section 4.3. Your Location on the Technology Wave
Section 4.4. Selection of Major Construction Practices
Key Points
Part II: Creating High-Quality Code
In this part:
Chapter 5. Design in Construction
Section 5.1. Design Challenges
Section 5.2. Key Design Concepts
Section 5.3. Design Building Blocks: Heuristics
Section 5.4. Design Practices
Section 5.5. Comments on Popular Methodologies
AdditionalResources
Key Points
Chapter 6. Working Classes
Section 6.1. Class Foundations: Abstract Data Types (ADTs)
Section 6.2. Good Class Interfaces
Section 6.3. Design and Implementation Issues
Section 6.4. Reasons to Create a Class
Section 6.5. Language-Specific Issues
Section 6.6. Beyond Classes: Packages
AdditionalResources
Key Points
Chapter 7. High-Quality Routines
Section 7.1. Valid Reasons to Create a Routine
Section 7.2. Design at the Routine Level
Section 7.3. Good Routine Names
Section 7.4. How Long Can a Routine Be?
Section 7.5. How to Use Routine Parameters
Section 7.6. SpecialConsiderations in the Use of Functions
Section 7.7. Macro Routines and Inline Routines
Key Points
Chapter 8. Defensive Programming
Section 8.1. Protecting Your Program from Invalid Inputs
Section 8.2. Assertions
Section 8.3. Error-Handling Techniques
Section 8.4. Exceptions
Section 8.5. Barricade Your Program to Contain the Damage Caused by Errors
Section 8.6. Debugging Aids
Section 8.7. Determining How Much Defensive Programming to Leave in Production Code
Section 8.8. Being Defensive About Defensive Programming
AdditionalResources
Key Points
Chapter 9. The Pseudocode Programming Process
Section 9.1. Summary of Steps in Building Classes and Routines
Section 9.2. Pseudocode for Pros
Section 9.3. Constructing Routines by Using the PPP
Section 9.4. Alternatives to the PPP
Key Points
Part III: Variables
In this part:
Chapter 10. GeneralIssues in Using Variables
Section 10.1. Data Literacy
Section 10.2. Making Variable Declarations Easy
Section 10.3. Guidelines for Initializing Variables
Section 10.4. Scope
Section 10.5. Persistence
Section 10.6. Binding Time
Section 10.7. Relationship Between Data Types and Control Structures
Section 10.8. Using Each Variable for Exactly One Purpose
Key Points
Chapter 11. The Power of Variable Names
Section 11.1. Considerations in Choosing Good Names
Section 11.2. Naming Specific Types of Data
Section 11.3. The Power of Naming Conventions
Section 11.4. Informal Naming Conventions
Section 11.5. Standardized Prefixes
Section 11.6. Creating Short Names That Are Readable
Section 11.7. Kinds of Names to Avoid
Key Points
Chapter 12. Fundamental Data Types
Section 12.1. Numbers in General
Section 12.2. Integers
Section 12.3. Floating-Point Numbers
Section 12.4. Characters and Strings
Section 12.5. Boolean Variables
Section 12.6. Enumerated Types
Section 12.7. Named Constants
Section 12.8. Arrays
Section 12.9. Creating Your Own Types (Type Aliasing)
Key Points
Chapter 13. Unusual Data Types
Section 13.1. Structures
Section 13.2. Pointers
Section 13.3. Global Data
AdditionalResources
Key Points
Part IV: Statements
In this part:
Chapter 14. Organizing Straight-Line Code
Section 14.1. Statements That Must Be in a Specific Order
Section 14.2. Statements Whose Order Doesn't Matter
Key Points
Chapter 15. Using Conditionals
Section 15.1. if Statements
Section 15.2. case Statements
Key Points
Chapter 16. Controlling Loops
Section 16.1. Selecting the Kind of Loop
Section 16.2. Controlling the Loop
Section 16.3. Creating Loops Easily—From the Inside Out
Section 16.4. Correspondence Between Loops and Arrays
Key Points
Chapter 17. UnusualControl Structures
Section 17.1. Multiple Returns from a Routine
Section 17.2. Recursion
Section 17.3. goto
Section 17.4. Perspective on UnusualControl Structures
AdditionalResources
Key Points
Chapter 18. Table-Driven Methods
Section 18.1. GeneralConsiderations in Using Table-Driven Methods
Section 18.2. Direct Access Tables
Section 18.3. Indexed Access Tables
Section 18.4. Stair-Step Access Tables
Section 18.5. Other Examples of Table Lookups
Key Points
Chapter 19. GeneralControlIssues
Section 19.1. Boolean Expressions
Section 19.2. Compound Statements (Blocks)
Section 19.3. Null Statements
Section 19.4. Taming Dangerously Deep Nesting
Section 19.5. A Programming Foundation: Structured Programming
Section 19.6. Control Structures and Complexity
Key Points
Part V: Code Improvements
In this part:
Chapter 20. The Software-Quality Landscape
Section 20.1. Characteristics of Software Quality
Section 20.2. Techniques for Improving Software Quality
Section 20.3. Relative Effectiveness of Quality Techniques
Section 20.4. When to Do Quality Assurance
Section 20.5. The General Principle of Software Quality
AdditionalResources
Key Points
Chapter 21. Collaborative Construction
Section 21.1. Overview of Collaborative Development Practices
Section 21.2. Pair Programming
Section 21.3. FormalInspections
Section 21.4. Other Kinds of Collaborative Development Practices
Comparison of Collaborative Construction Techniques
AdditionalResources
Key Points
Chapter 22. Developer Testing
Section 22.1. Role of Developer Testing in Software Quality
Section 22.2. Recommended Approach to Developer Testing
Section 22.3. Bag of Testing Tricks
Section 22.4. Typical Errors
Section 22.5. Test-Support Tools
Section 22.6. Improving Your Testing
Section 22.7. Keeping Test Records
AdditionalResources
Key Points
Chapter 23. Debugging
Section 23.1. Overview of Debugging Issues
Section 23.2. Finding a Defect
Section 23.3. Fixing a Defect
Section 23.4. PsychologicalConsiderations in Debugging
Section 23.5. Debugging Tools—Obvious and Not-So-Obvious
AdditionalResources
Key Points
Chapter 24. Refactoring
Section 24.1. Kinds of Software Evolution
Section 24.2. Introduction to Refactoring
Section 24.3. Specific Refactorings
Section 24.4. Refactoring Safely
Section 24.5. Refactoring Strategies
AdditionalResources
Key Points
Chapter 25. Code-Tuning Strategies
Section 25.1. Performance Overview
Section 25.2. Introduction to Code Tuning
Section 25.3. Kinds of Fat and Molasses
Section 25.4. Measurement
Section 25.5. Iteration
Section 25.6. Summary of the Approach to Code Tuning
AdditionalResources
Key Points
Chapter 26. Code-Tuning Techniques
Section 26.1. Logic
Section 26.2. Loops
Section 26.3. Data Transformations
Section 26.4. Expressions
Section 26.5. Routines
Section 26.6. Recoding in a Low-Level Language
Section 26.7. The More Things Change, the More They Stay the Same
AdditionalResources
Key Points
Part VI: System Considerations
In this part:
Chapter 27. How Program Size Affects Construction
Section 27.1. Communication and Size
Section 27.2. Range of Project Sizes
Section 27.3. Effect of Project Size on Errors
Section 27.4. Effect of Project Size on Productivity
Section 27.5. Effect of Project Size on Development Activities
AdditionalResources
Key Points
Chapter 28. Managing Construction
Section 28.1. Encouraging Good Coding
Section 28.2. Configuration Management
Section 28.3. Estimating a Construction Schedule
Section 28.5. Treating Programmers as People
Section 28.6. Managing Your Manager
Key Points
Chapter 29. Integration
Section 29.1. Importance of the Integration Approach
Section 29.2. Integration Frequency—Phased or Incremental?
Section 29.3. IncrementalIntegration Strategies
Section 29.4. Daily Build and Smoke Test
AdditionalResources
Key Points
Chapter 30. Programming Tools
Section 30.1. Design Tools
Section 30.2. Source-Code Tools
Section 30.3. Executable-Code Tools
Section 30.4. Tool-Oriented Environments
Section 30.5. Building Your Own Programming Tools
Section 30.6. Tool Fantasyland
AdditionalResources
Key Points
Part VII: Software Craftsmanship
In this part:
Chapter 31. Layout and Style
Section 31.1. Layout Fundamentals
Section 31.2. Layout Techniques
Section 31.3. Layout Styles
Section 31.4. Laying Out Control Structures
Section 31.5. Laying Out Individual Statements
Section 31.6. Laying Out Comments
Section 31.7. Laying Out Routines
Section 31.8. Laying Out Classes
AdditionalResources
Key Points
Chapter 32. Self-Documenting Code
Section 32.1. External Documentation
Section 32.2. Programming Style as Documentation
Section 32.3. To Comment or Not to Comment
Section 32.4. Keys to Effective Comments
Section 32.5. Commenting Techniques
Section 32.6. IEEE Standards
AdditionalResources
Key Points
Chapter 33. PersonalCharacter
Section 33.1. Isn't PersonalCharacter Off the Topic?
Section 33.2. Intelligence and Humility
Section 33.3. Curiosity
Section 33.4. Intellectual Honesty
Section 33.5. Communication and Cooperation
Section 33.6. Creativity and Discipline
Section 33.7. Laziness
Section 33.8. Characteristics That Don't Matter As Much As You Might Think
Section 33.9. Habits
AdditionalResources
Key Points
Chapter 34. Themes in Software Craftsmanship
Section 34.1. Conquer Complexity
Section 34.2. Pick Your Process
Section 34.3. Write Programs for People First, Computers Second
Section 34.4. Program into Your Language, Not in It
Section 34.5. Focus Your Attention with the Help of Conventions
Section 34.6. Program in Terms of the Problem Domain
Section 34.7. Watch for Falling Rocks
Section 34.8. Iterate, Repeatedly, Again and Again
Section 34.9. Thou Shalt Rend Software and Religion Asunder
Key Points
Chapter 35. Where to Find More Information
Section 35.1. Information About Software Construction
Section 35.2. Topics Beyond Construction
Section 35.3. Periodicals
Section 35.4. A Software Developer's Reading Plan
Section 35.5. Joining a Professional Organization
Bibliography
Index