本書提供作譯者介紹Brian W.Kernighan 貝爾實驗室計算科學(xué)研究中心高級研究人員,著名的計算機科學(xué)家。他參加了UNIX系統(tǒng)、C語言、AWK語言和許多其他系統(tǒng)的開發(fā),同時出版了許多在計算機領(lǐng)域具有影響的著作,包括《The Elements of Programming Style》、《The Practice of Programming》、《The UNIX Programming Environment》、《The AWK Language》、《Software Tools》等。.裘宗燕,北京大學(xué)數(shù)學(xué)學(xué)院信息科學(xué)系教授。關(guān)心的主要學(xué)術(shù)領(lǐng)域包括計算機軟件理論、方法學(xué)、程序語言和符號計算。已出版...
圖書目錄
譯者序 Preface/前言 Chapter 1:Style/風格 1.1 Names/名字 1.2 Expressions and Statements/表達式和語句 1.3 Consistency and Idioms/一致性和習(xí)慣用法 1.4 Function Macros/函數(shù)宏 1.5 Magic Numbers/神秘的數(shù) 1.6 Comments/注釋 1.7 Why Bother?/為何對此費心 Chapter 2:Algorithms and Data Structures/算法與數(shù)據(jù)結(jié)構(gòu) 2.1 Searching/檢索 2.2 Sorting/排序 2.3 Libraries/庫 2.4 A Java Quicksort/一個Java快速排序 2.5 O—Notation/大O記法 2.6 Growing Arrays/可增長數(shù)組 2.7 Lists/表 2.8 Trees/樹 2.9 Hash Tables/散列表 2.10 Summary/小結(jié) Chapter 3:Design and Implementation/設(shè)計與實現(xiàn) 3.1 The Markov Chain Algorithm/馬爾可夫鏈算法 3.2 Data Structure Alternatives/數(shù)據(jù)結(jié)構(gòu)的選擇 3.3 Building the Data Structure in C/在C中構(gòu)造數(shù)據(jù)結(jié)構(gòu) 3.4 Generating Output/生成輸出 3.5 Java/Java 3.6 C++/C++ 3.7 Awk and Perl/Awk and Perl 3.8 Performance/性能 3.9 Lessons/經(jīng)驗教訓(xùn) Chapter 4:Interfaces/界面 4.1 Comma—Separated Values/逗號分隔的值 4.2 A Prototype Library/一個原型庫 4.3 A Library for Others/為別人用的庫 4.4 A C++Implementation/c++實現(xiàn) 4.5 Interface Principles/界面原則 4.6 Resource Management/資源管理 4.7 Abort,Retry,F(xiàn)ail?/終止、重試或失敗 4.8 User Interfaces/用戶界面 Chapter 5:Debugging/排錯 5.1 Debuggers/排錯系統(tǒng) 5.2 Good Clues,Easy Bugs/好線索,簡單錯誤 5.3 No Clues,Hard Bugs/無線索,難辦的錯誤 5.4 Last Resorts/最后的手段 5.5 Non—reproducible Bugs/不可重現(xiàn)的錯誤 5.6 Debugging Tools/排錯工具 5.7 Other People’s Bugs/其他人的程序錯誤 5.8 Summary/小結(jié) Chapter 6:Testing/測試 6.1 Test as You Write the Code/在編碼過程中測試 6.2 Systematic Testing/系統(tǒng)化測試 6.3 Test Automation/測試自動化 6.4 Test Scaffolds/測試臺 6.5 Stress Tests/應(yīng)力測試 6.6 Tips for Testing/測試秘訣 6.7 Who Does the Testing?/誰來測試 6.8 Testing the Markov Program/測試馬爾可夫程序 6.9 Summary/小結(jié) Chapter 7:Performance/性能 7.1 A Bottleneck/瓶頸 7.2 Timing and Profiling/計時和輪廓 7.3 Strategies for Speed/加速策略 7.4 Tuning the Code/代碼調(diào)整 7.5 Space Efficiency/空間效率 7.6 Estimation/估計 7.7 Summary小結(jié) Chapter 8:Portability/可移植性 8.1 Language/語言 8.2 Headers and Libraries/頭文件和庫 8.3 Program Organization/程序組織 8.4 Isolation/隔離 8.5 Data Exchange/數(shù)據(jù)交換 8.6 Byte Order/字節(jié)序 8.7 Portability and Upgrade/可移植性和升級 8.8 Internationalization/國際化 8.9 Summary/小結(jié) Chapter 9:Notation/記法 9.1 Formatting Data/數(shù)據(jù)格式 9.2 Regular Expressions/正則表達式 9.3 Programmable Tools/可編程工具 9.4 Interpreters,Compilers.and Virtual Machines/解釋器、編譯器和虛擬機 9.5 Programs that Write Programs/寫程序的程序 9.6 Using Macros to Generate Code/用宏生成代碼 9.7 Compiling on the Fly/運行中編譯 Epilogue/后記 Appendix:Collected Rules/附錄:規(guī)則匯編