![]() 作者:Brian W. Kernighan/Rob Pike 出版社: 人民邮电出版社 副标题: 英文版 原作名: The practice of programming 出版年: 2016-1-1 页数: 251 定价: 49 装帧: 平装 ISBN: 9787115407863 内容简介 · · · · · ·本书是计算机科学方面的经典名著,由计算机界极具影响力的两位专家Brian W. Kernighan和Rob Pike合著。书的内容围绕程序设计实践中的一系列问题展开,讲述对于程序员有共性的知识,以帮助各程序员写出更高效的程序。本书从排错、测试、性能、可移植性、设计、界面、风格和记法等方面,讨论了程序设计中既具有实际意义又具有广泛意义的思想、技术和方法。 本书值得每位梦想并努力成为程序员的人参考,值得每位计算机专业的学生和计算机工作者阅读,也适合作为程序设计高级课程的教材或参考书。 作者简介 · · · · · ·作者:[美] 布莱恩 W. 克尼汉(Brian W. Kernighan)罗勃·派克(Rob Pike) 译者:无 Brain Kernighan计算机科学家,曾与UNIX的缔造者Ken Thompson和Dennis Ritchie一起在贝尔实验室工作。他也是AWK和AMPL程序设计语言的共同作者。“K&R C”和“AWK”中的“K”都是指“Kernighan”。2000年起,他在普林斯顿大学计算机科学系任教授,并任本科部代表。 Rob Pike 软件工程师。他在贝尔实验室任职期间,作为UNIX小组成员参与开发了Plan 9和Inferno操作系统以及Limbo程序设计语言。目前他在Google公司工作,参与了Go和Sawzall程序设计语言的开发。 目录 · · · · · ·目录Chapter 1: Style / 风格 1 1.1 Names / 名字 3 1.2 Expressions and Statements / 表达式和语句6 1.3 Consistency and Idioms / 一致性和习惯用语10 1.4 Function Macros / 函数宏17 · · · · · ·() 目录 Chapter 1: Style / 风格 1 1.1 Names / 名字 3 1.2 Expressions and Statements / 表达式和语句6 1.3 Consistency and Idioms / 一致性和习惯用语10 1.4 Function Macros / 函数宏17 1.5 Magic Numbers / 幻数19 1.6 Comments / 注释23 1.7 Why Bother? / 为何要在风格方面费心 27 Chapter 2: Algorithms and Data Structures / 算法与数据结构29 2.1 Searching / 检索30 2.2 Sorting / 排序32 2.3 Libraries / 库34 2.4 A Java Quicksort / 一个Java快速排序实现37 2.5 O-Notation / 大O记法40 2.6 Growing Arrays / 自增长数组41 2.7 Lists / 表44 2.8 Trees / 树50 2.9 Hash Tables / 散列表55 2.10 Summary / 小结 58 Chapter 3: Design and Implementation / 设计与实现61 3.1 The Markov Chain Algorithm / 马尔可夫链算法62 3.2 Data Structure Alternatives / 在多种数据结构之间选择64 3.3 Building the Data Structure in C / 使用C语言构建数据结构65 3.4 Generating Output / 生成输出69 3.5 Java 71 3.6 C++ 76 3.7 Awk and Perl / Awk和Perl 78 3.8 Performance / 性能80 3.9 Lessons / 经验教训82 Chapter 4: Interfaces / 接口85 4.1 Comma-Separated Values / 逗号分隔值86 4.2 A Prototype Library / 一个原型库87 4.3 A Library for Others / 一个给他人用的库91 4.4 A C++ Implementation / 一个C++实现99 4.5 Interface Principles / 接口原则103 4.6 Resource Management / 资源管理106 4.7 Abort, Retry, Fail?109 4.8 User Interfaces / 用户界面113 Chapter 5: Debugging / 调试117 5.1 Debuggers / 调试器 118 5.2 Good Clues, Easy Bugs / 线索明显、易于发现的错误119 5.3 No Clues, Hard Bugs / 线索不明、难以发现的错误123 5.4 Last Resorts / 最后的手段127 5.5 Non-reproducible Bugs / 不可重现的错误 130 5.6 Debugging Tools / 调试工具131 5.7 Other People's Bugs / 他人引入的错误 135 5.8 Summary / 小结136 Chapter 6: Testing / 测试139 6.1 Test as You Write the Code / 一边编码,一边测试140 6.2 Systematic Testing / 系统化测试145 6.3 Test Automation / 测试自动化149 6.4 Test Scaffolds / 测试脚手架151 6.5 Stress Tests / 压力测试155 6.6 Tips for Testing / 测试心得158 6.7 Who Does the Testing? / 谁来测试 159 6.8 Testing the Markov Program / 马尔可夫程序的测试160 6.9 Summary / 小结162 Chapter 7: Performance / 性能165 7.1 A Bottleneck / 瓶颈166 7.2 Timing and Profiling / 计时和剖析171 7.3 Strategies for Speed / 加速策略175 7.4 Tuning the Code / 代码调优178 7.5 Space Efficiency / 空间利用率182 7.6 Estimation / 评估184 7.7 Summary / 小结187 Chapter 8: Portability / 可移植性189 8.1 Language / 语言190 8.2 Headers and Libraries / 头文件和库196 8.3 Program Organization / 程序架构198 8.4 Isolation / 隔离202 8.5 Data Exchange / 数据交换203 8.6 Byte Order / 字节序204 8.7 Portability and Upgrade / 可移植性和升级207 8.8 Internationalization / 国际化209 8.9 Summary / 小结212 Chapter 9: Notation / 记法215 9.1 Formatting Data / 数据格式化216 9.2 Regular Expressions / 正则表达式222 9.3 Programmable Tools / 可编程工具228 9.4 Interpreters, Compilers, and Virtual Machines / 解释器、编译器和虚拟机 231 9.5 Programs that Write Programs / 写程序的程序237 9.6 Using Macros to Generate Code / 用宏生成代码240 9.7 Compiling on the Fly / 运行中编译241 Epilogue / 后记247 Appendix: Collected Rules / 规则汇编249 · · · · · · () |
听说很久,却一直没有看的一本书
文字却通俗易懂
还行。。。