Code Quality: The Open Source Perspective (Paperback)
暫譯: 程式碼品質:開源的觀點 (平裝本)

Diomidis Spinellis

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

相關主題

商品描述

Description:

  • Page 26: How can I avoid off-by-one errors?
  • Page 143: Are Trojan Horse attacks for real?
  • Page 158: Where should I look when my application can't handle its workload?
  • Page 256: How can I detect memory leaks?
  • Page 309: How do I target my application to international markets?
  • Page 394: How should I name my code's identifiers?
  • Page 441: How can I find and improve the code coverage of my tests?

Diomidis Spinellis' first book, Code Reading, showed programmers how to understand and modify key functional properties of software. Code Quality focuses on non-functional properties, demonstrating how to meet such critical requirements as reliability, security, portability, and maintainability, as well as efficiency in time and space.

Spinellis draws on hundreds of examples from open source projects--such as the Apache web and application servers, the BSD Unix systems, and the HSQLDB Java database--to illustrate concepts and techniques that every professional software developer will be able to appreciate and apply immediately.

Complete files for the open source code illustrated in this book are available on the Code Reading CD-ROM and online at: http://www.spinellis.gr/codequality/

 

 

 

Table of Contents:

List of Tables     xv
List of Figures     xvii
Foreword    xxiii
Preface     xxv
Chapter 1: Introduction     1

1.1 Software Quality      1
1.2 How to Read This Book     9

Chapter 2: Reliability     17

2.1 Input Problems      17
2.2 Output Problems     21
2.3 Logic Problems      26
2.4 Computation Problems      42
2.5 Concurrency and Timing Problems     51
2.6 Interface Problems     56
2.7 Data-Handling Problems      69
2.8 Fault Tolerance     85

Chapter 3: Security     101

3.1 Vulnerable Code     102
3.2 The Buffer Overflow      106
3.3 Race Conditions     112
3.4 Problematic APIs     115
3.5 Untrusted Input     125
3.6 Result Verification     131
3.7 Data and Privilege Leakage      134
3.8 Trojan Horse      143
3.9 Tools      146

Chapter 4: Time Performance     151

4.1 Measurement Techniques      156
4.2 Algorithm Complexity     173
4.3 Stand-Alone Code      179
4.4 Interacting with the Operating System      182
4.5 Interacting with Peripherals     190
4.6 Involuntary Interactions     191
4.7 Caching      194

Chapter 5: Space Performance     207

5.1 Data      209
5.2 Memory Organization      227
5.3 Memory Hierarchies      231
5.4 The Process/Operating System Interface     239
5.5 Heap Memory Management      246
5.6 Stack Memory Management     264
5.7 Code     274

Chapter 6: Portability     289

6.1 Operating Systems     290
6.2 Hardware and Processor Architectures     296
6.3 Compilers and Language Extensions     302
6.4 Graphical User Interfaces      307
6.5 Internationalization and Localization      309

Chapter 7: Maintainability     325

7.1 Measuring Maintainability      326
7.2 Analyzability     351
7.3 Changeability      403
7.4 Stability     418
7.5 Testability      432
7.6 Effects of the Development Environment      451

Chapter 8: Floating-Point Arithmetic     465

8.1 Floating-Point Representation      466
8.2 Rounding      478
8.3 Overflow      481
8.4 Underflow      483
8.5 Cancellation      487
8.6 Absorption      491
8.7 Invalid Operations     495

Appendix A: Source Code Credits     503Bibliography     505
Index     523
Author Index     563

商品描述(中文翻譯)

描述:
- 第26頁:我該如何避免越界錯誤?
- 第143頁:木馬攻擊真的存在嗎?
- 第158頁:當我的應用程式無法處理其工作負載時,我應該查看哪裡?
- 第256頁:我該如何檢測記憶體洩漏?
- 第309頁:我該如何將我的應用程式針對國際市場?
- 第394頁:我該如何命名我程式碼的識別符?
- 第441頁:我該如何找到並改善我的測試的程式碼覆蓋率?

Diomidis Spinellis的第一本書《Code Reading》教導程式設計師如何理解和修改軟體的關鍵功能屬性。《Code Quality》專注於非功能性屬性,展示如何滿足可靠性、安全性、可攜性和可維護性等關鍵要求,以及時間和空間的效率。

Spinellis引用了數百個來自開源專案的例子,例如Apache網頁和應用伺服器、BSD Unix系統和HSQLDB Java資料庫,以說明每位專業軟體開發人員都能立即理解和應用的概念和技術。

本書中所示的開源程式碼的完整檔案可在《Code Reading》CD-ROM和線上獲得: http://www.spinellis.gr/codequality/

目錄:
- 表格清單 xv
- 圖形清單 xvii
- 前言 xxiii
- 序言 xxv
- 第1章:介紹 1
- 1.1 軟體品質 1
- 1.2 如何閱讀本書 9
- 第2章:可靠性 17
- 2.1 輸入問題 17
- 2.2 輸出問題 21
- 2.3 邏輯問題 26
- 2.4 計算問題 42
- 2.5 並發和時序問題 51
- 2.6 介面問題 56
- 2.7 數據處理問題 69
- 2.8 錯誤容忍 85
- 第3章:安全性 101
- 3.1 易受攻擊的程式碼 102
- 3.2 緩衝區溢出 106
- 3.3 競爭條件 112
- 3.4 問題API 115
- 3.5 不受信任的輸入 125
- 3.6 結果驗證 131
- 3.7 數據和特權洩漏 134
- 3.8 木馬 143
- 3.9 工具 146
- 第4章:時間性能 151
- 4.1 測量技術 156
- 4.2 演算法複雜度 173
- 4.3 獨立程式碼 179
- 4.4 與作業系統互動 182
- 4.5 與外圍設備互動 190
- 4.6 非自願互動 191
- 4.7 快取 194
- 第5章:空間性能 207
- 5.1 數據 209
- 5.2 記憶體組織 227
- 5.3 記憶體層次 231
- 5.4 程序/作業系統介面 239
- 5.5 堆記憶體管理 246
- 5.6 堆疊記憶體管理 264
- 5.7 程式碼 274
- 第6章:可攜性 289
- 6.1 作業系統 290
- 6.2 硬體和處理器架構 296
- 6.3 編譯器和語言擴展 302
- 6.4 圖形使用者介面 307
- 6.5 國際化和本地化 309
- 第7章:可維護性 325
- 7.1 測量可維護性 326
- 7.2 可分析性 351
- 7.3 可變更性 403
- 7.4 穩定性 418
- 7.5 可測試性 432
- 7.6 開發環境的影響 451
- 第8章:浮點運算 465
- 8.1 浮點表示 466
- 8.2 四捨五入 478
- 8.3 溢出 481
- 8.4 下溢 483
- 8.5 抵消 487
- 8.6 吸收 491
- 8.7 無效操作 495
- 附錄A:源代碼致謝 503
- 參考文獻 505
- 索引 523
- 作者索引 563