The Practice of Programming (Paperback)

Brian W. Kernighan, Rob Pike

買這商品的人也買了...

商品描述


Description

With the same insight and authority that made their book The Unix Programming Environment a classic, Brian Kernighan and Rob Pike have written The Practice of Programming to help make individual programmers more effective and productive. This book is full of practical advice and real-world examples in C, C++, Java, and a variety of special-purpose languages. Kernighan and Pike have distilled years of experience writing programs, teaching, and working with other programmers to create this book. Anyone who writes software will profit from its principles and guidance.

Back to Top


Appropriate Courses

Intermediate Programming courses, Programming Languages.

Back to Top


Table Of Contents

1. Style.
Names.
Expressions and Statements.
Consistency and Idioms.
Function Macros.
Magic Numbers.
Comments.
Why Bother?

2. Algorithms and Data Structures.
Searching.
Sorting.
Libraries.
A Java Quicksort.
O-Notation.
Growing Arrays.
Lists.
Trees.
Hash Tables.
Summary.

3. Design and Implementation.
The Markov Chain Algorithm.
Data Structure Alternatives.
Building the Data Structure in C.
Generating Output.
Java.
C++.
Awk and Perl.
Performance.
Lessons.

4. Interfaces.
Comma-Separated Values.
A Prototype Library.
A Library for Others.
A C++ Implementation.
Interface Principles.
Resource Management.
Abort, Retry, Fail?
User Interfaces.

5. Debugging.
Debuggers.
Good Clues, Easy Bugs.
No Clues, Hard Bugs.
Last Resorts.
Non-reproducible Bugs.
Debugging Tools.
Other People's Bugs.
Summary.

6. Testing.
Test as You Write the Code.
Systematic Testing.
Test Automation.
Test Scaffolds.
Stress Tests.
Tips for Testing.
Who Does the Testing?
Testing the Markov Program.
Summary.

7. Performance.
A Bottleneck.
Timing and Profiling.
Strategies for Speed.
Tuning the Code.
Space Efficiency.
Estimation.
Summary.

8. Portability.
Language.
Headers and Libraries.
Program Organization.
Isolation.
Data Exchange.
Byte Order.
Portability and Upgrade.
Internationalization.
Summary.

9. Notation.
Formatting Data.
Regular Expressions.
Programmable Tools.
Interpreters, Compilers, and Virtual Machines.
Programs that Write Programs.
Using Macros to Generate Code.
Compiling on the Fly.

Epilogue.
Appendix: Collected Rules.
Index. 020161586XT04062001


Back to Top

商品描述(中文翻譯)

描述

以與他們的書《Unix程式設計環境》一樣的洞察力和權威性,Brian Kernighan和Rob Pike撰寫了《程式設計實踐》這本書,以幫助個別的程式設計師更有效和有生產力。這本書充滿了C、C++、Java和各種特殊用途語言的實用建議和現實世界的例子。Kernighan和Pike通過多年的編寫程式、教學和與其他程式設計師合作的經驗,創作了這本書。任何編寫軟體的人都能從中獲益,並受益於其原則和指導。

適合的課程

中級程式設計課程、程式語言。

目錄

1. 風格
- 名稱
- 表達式和語句
- 一致性和習慣用法
- 函數宏
- 魔術數字
- 註釋
- 為什麼要在意?

2. 演算法和資料結構
- 搜尋
- 排序
- 函式庫
- Java快速排序
- O-符號
- 成長陣列
- 列表
- 樹
- 雜湊表
- 總結

3. 設計和實作
- 馬可夫鏈算法
- 資料結構替代方案
- 在C中建立資料結構
- 生成輸出
- Java
- C++
- Awk和Perl
- 效能
- 教訓

4. 介面
- 逗號分隔值
- 原型庫
- 給其他人使用的庫
- C++實現
- 介面原則
- 資源管理
- 中止、重試、失敗?
- 使用者介面

5. 調試
- 調試器
- 好線索、容易的錯誤
- 沒有線索、困難的錯誤
- 最後的手段
- 無法重現的錯誤
- 調試工具
- 別人的錯誤
- 總結

6. 測試
- 在編寫程式碼時進行測試
- 系統性測試
- 測試自動化
- 測試腳手架
- 壓力測試
- 測試技巧
- 誰來進行測試?
- 測試馬可夫程式

7. 效能
- 瓶頸
- 計時和分析
- 加速策略
- 調整程式碼
- 空間效率
- 估算
- 總結

8. 可移植性
- 語言
- 標頭檔和函式庫
- 程式組織
- 隔離
- 資料交換
- 字節順序
- 可移植性和升級
- 國際化
- 總結

9. 表示法
- 格式化資料
- 正則表達式
- 可編程工具
- 直譯器、編譯器和虛擬機
- 程式撰寫程式
- 使用宏生成程式碼
- 即時編譯

結語

附錄:收集的規則

索引