求真百科歡迎當事人提供第一手真實資料,洗刷冤屈,終結網路霸凌。

程序設計實踐檢視原始碼討論檢視歷史

事實揭露 揭密真相
前往: 導覽搜尋

來自 孔夫子網 的圖片

程序設計實踐》,〔美〕柯奈漢,〔美〕派克,裘 著,出版社: 機械工業出版社。

機械工業出版社成立於1950年,是建國後國家設立的第一家科技出版社,前身為科學技術出版社,1952年更名為機械工業出版社[1]。機械工業出版社(以下簡稱機工社)由機械工業信息研究院作為主辦單位,目前隸屬於國務院國資委[2]

內容簡介

The Practice of Programming針對程序設計過程中的風格、算法與數據結構、設計與實現、界面、除錯、測試、性 能、可移植性、記法等各個方面,系統地討論了一些常見問題和實用技巧。通過對本書的學習,讀者可以快速掌握程序 設計的技巧及思想。 本評註版力邀國內資深專家執筆,在英文原著基礎上增加中文點評與注釋,旨在融合二者之長,既保留經典的原創 文字與味道,又以先行者的學研心得與實踐感悟,對讀者閱讀與學習加以點撥、指明捷徑。

目錄

前言(新增批註共1條)

Chapter 1: Style(新增批註共46條) xii

1

1.1 Names 3

1.2 Expressions and Statements 7

1.3 Consistency and Idioms 13

1.4 Function Macros 21

1.5 Magic Numbers 23

1.6 Comments 28

1.7 Why Bother? 35

Chapter 2: Algorithms and Data Structures(新增批註共29條)37

2.1 Searching 38

2.2 Sorting 41

2.3 Libraries 44

2.4 A Java Quicksort 48

2.5 O-Notation 52

2.6 Growing Arrays 54

2.7 Lists 57

2.8 Trees 64

2.9 Hash Tables 70

2.10 Summary 74

Chapter 3: Design and Implementation(新增批註共12條)76

3.1 The Markov Chain Algorithm 77

3.2 Data Structure Alternatives 79

3.3 Building the Data Structure in C 81

3.4 Generating Output 85

3.5 Java 89

3.6 C++ 93

3.7 Awk andPerl 97

3.8 Performance 99

3.9 Lessons 101

Chapter 4: Interfaces(新增批註共20條) 104

4.1 Comma-Separated Values 105

4.2 A Prototype Library 107

4.3 A Library for Others 111

4.4 A C++ Implementation 121

4.5 Interface Principles 126

4.6 Resource Management 130

4.7 Abort, Retry, Fail? 135

4.8 User Interfaces 140

Chapter 5: Debugging(新增批註共28條) 144

5.1 Debuggers 146

5.2 Good Clues, Easy Bugs 148

5.3 No Clues, Hard Bugs 153

5.4 Last Resorts 160

5.5 Non-reproducible Bugs 164

5.6 Debugging Tools 166

5.7 Other People’s Bugs 169

5.8 Summary 171

Chapter 6: Testing(新增批註共28條) 173

6.1  Test as You Write the Code 174

6.2 Systematic Testing 181

6.3 Test Automation 186

6.4 Test Scaffolds 189

6.5 Stress Tests 193

6.6 Tips for Testing 197

6.7 Who Does the Testing? 199

6.8 Testing the Markov Program 200

6.9 Summary 202

Chapter 7: Performance(新增批註共30條) 204

7.1 A Bottleneck 205

7.2 Timing and Profiling 211

7.3 Strategies for Speed 217

7.4 Tuning the Code 221

7.5 Space Efficiency 228

7.6 Estimation 231

7.7 Summary 234

Chapter 8: Portability(新增批註共30條) 236

8.1 Language 237

8.2 Headers and Libraries 245

8.3 Program Organization 247

8.4 Isolation 252

8.5 Data Exchange 254

8.6 Byte Order 256

8.7 Portability and Upgrade 259

8.8 Internationalization 262

8.9 Summary 266

Chapter 9: Notation(新增批註共13條) 269

9.1 Formatting Data 270

9.2 Regular Expressions 278

9.3 Programmable Tools 286

9.4 Interpreters, Compilers, and Virtual Machines 289

9.5 Programs that Write Programs 296

9.6 Using Macros to Generate Code 300

9.7 Compiling on the Fly 301

Epilogue 308

Appendix: Collected Rules 311

Index 315

參考文獻