本书是著名计算机专家的畅销作品,曾在国内外受到广泛赞誉。本书从排错、测试、性能、可移植性、设计、界面、风格和记法等方面,讨论了程序设计中实际的、又是非常深刻和具有广泛意义的思想、技术和方法。本书值得每个梦想并努力使自己成为优秀程序员的人参考,值得每个计算机专业的学生和计算机工作者阅读,也可作为程序设计高级课程的教材或参考书。
译者序\r\nPreface/前言\r\nChapter 1:Style/风格\r\n 1.1 Names/名字\r\n 1.2 Expressions and Statements/表达式和语句\r\n 1.3 Consistency and Idioms/一致性和习惯用法\r\n 1.4 Function Macros/函数宏\r\n 1.5 Magic Numbers/神秘的数\r\n 1.6 Comments/注释\r\n 1.7 Why Bother?/为何对此费心\r\nChapter 2:Algorithms and Data Structures/算法与数据结构\r\n 2.1 Searching/检索\r\n 2.2 Sorting/排序\r\n 2.3 Libraries/库\r\n 2.4 A Java Quicksort/一个Java快速排序\r\n 2.5 O—Notation/大O记法\r\n 2.6 Growing Arrays/可增长数组\r\n 2.7 Lists/表 \r\n 2.8 Trees/树\r\n 2.9 Hash Tables/散列表\r\n 2.10 Summary/小结\r\nChapter 3:Design and Implementation/设计与实现\r\n 3.1 The Markov Chain Algorithm/马尔可夫链算法\r\n 3.2 Data Structure Alternatives/数据结构的选择\r\n 3.3 Building the Data Structure in C/在C中构造数据结构\r\n 3.4 Generating Output/生成输出\r\n 3.5 Java/Java\r\n 3.6 C++/C++\r\n 3.7 Awk and Perl/Awk and Perl\r\n 3.8 Performance/性能\r\n 3.9 Lessons/经验教训\r\nChapter 4:Interfaces/界面\r\n 4.1 Comma—Separated Values/逗号分隔的值\r\n 4.2 A Prototype Library/一个原型库\r\n 4.3 A Library for Others/为别人用的库\r\n 4.4 A C++Implementation/c++实现\r\n 4.5 Interface Principles/界面原则\r\n 4.6 Resource Management/资源管理\r\n 4.7 Abort,Retry,Fail?/终止、重试或失败\r\n 4.8 User Interfaces/用户界面\r\nChapter 5:Debugging/排错\r\n 5.1 Debuggers/排错系统\r\n 5.2 Good Clues,Easy Bugs/好线索,简单错误\r\n 5.3 No Clues,Hard Bugs/无线索,难办的错误\r\n 5.4 Last Resorts/最后的手段\r\n 5.5 Non—reproducible Bugs/不可重现的错误\r\n 5.6 Debugging Tools/排错工具\r\n 5.7 Other People’s Bugs/其他人的程序错误\r\n 5.8 Summary/小结\r\nChapter 6:Testing/测试\r\n 6.1 Test as You Write the Code/在编码过程中测试\r\n 6.2 Systematic Testing/系统化测试\r\n 6.3 Test Automation/测试自动化\r\n 6.4 Test Scaffolds/测试台\r\n 6.5 Stress Tests/应力测试\r\n 6.6 Tips for Testing/测试秘诀\r\n 6.7 Who Does the Testing?/谁来测试\r\n 6.8 Testing the Markov Program/测试马尔可夫程序\r\n 6.9 Summary/小结\r\nChapter 7:Performance/性能\r\n 7.1 A Bottleneck/瓶颈\r\n 7.2 Timing and Profiling/计时和轮廓\r\n 7.3 Strategies for Speed/加速策略\r\n 7.4 Tuning the Code/代码调整\r\n 7.5 Space Efficiency/空间效率\r\n 7.6 Estimation/估计\r\n 7.7 Summary小结\r\nChapter 8:Portability/可移植性\r\n 8.1 Language/语言\r\n 8.2 Headers and Libraries/头文件和库\r\n 8.3 Program Organization/程序组织\r\n 8.4 Isolation/隔离\r\n 8.5 Data Exchange/数据交换\r\n 8.6 Byte Order/字节序\r\n 8.7 Portability and Upgrade/可移植性和升级\r\n 8.8 Internationalization/国际化\r\n 8.9 Summary/小结\r\nChapter 9:Notation/记法\r\n 9.1 Formatting Data/数据格式\r\n 9.2 Regular Expressions/正则表达式\r\n 9.3 Programmable Tools/可编程工具\r\n 9.4 Interpreters,Compilers.and Virtual Machines/解释器、编译器和虚拟机\r\n 9.5 Programs that Write Programs/写程序的程序\r\n 9.6 Using Macros to Generate Code/用宏生成代码\r\n 9.7 Compiling on the Fly/运行中编译\r\nEpilogue/后记\r\nAppendix:Collected Rules/附录:规则汇编
Brian W.Kernighan,贝尔实验室计算科学研究中心高级研究人员,著名的计算机科学家。他参加了UNIX系统、C语言、AWK语言和许多其他系统的开发,同时出版了许多在计算机领域具有影响的著作,包括《The Elements of Programming Style》、《The Practice of Programming》、《The UNIX Programming Environment》、《The AWK Language》、《Software Tools》等。
无封面