Code Quality: The Open Source Perspective
Diomidis Spinellis

ISBN-10: 0321166078
ISBN-13: 9780321166074

Publisher: Addison-Wesley Professional
Copyright: 2006
Format: Paper; 608 pp
Published: 04/03/2006

Suggested retail price: $54.99
Buy from myPearsonStore

  • 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/



The follow-up volume to the award-winning Code Reading teaches programmers the crucial skill of interpreting someone else's code

  • Written by the author of Code Reading, a 2004 Jolt Productivity Award winner
  • Covers an important task faced by virtually all programmers but seldom addressed in existing computer programming literature: reading code someone else wrote
  • Uses real-world examples from existing open source projects to illustrate concepts

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


Diomidis Spinellis has been developing the concepts presented in this book since 1985, while also writing groundbreaking software applications and working on multimillion-line code bases. Spinellis holds an M.Eng. degree in software engineering and a Ph.D. in computer science from Imperial College London. Currently he is an associate professor in the Department of Management Science and Technology at the Athens University of Economics and Business.



  • 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/



View a Sample Chapter PDF:

Pearson Higher Education offers special pricing when you choose to package your text with other student resources. If you're interested in creating a cost-saving package for your students, contact your Pearson Higher Education representative for pricing and ordering information.

This title is a member of the Effective Software Development Series, which also contains the titles below . You can also visit the Effective Software Development Series page.

  • 0321166078Code Quality: The Open Source Perspective
    Spinellis
    © 2006 | Addison-Wesley Professional | Paper; 608 pages | Instock
    ISBN-10: 0321166078 | ISBN-13: 9780321166074
    Buy from myPearsonStore

  • 0201799405Code Reading: The Open Source Perspective
    Spinellis
    © 2003 | Addison-Wesley Professional | Paper Bound w/CD-ROM; 528 pages | Instock
    ISBN-10: 0201799405 | ISBN-13: 9780201799408
    Brief Description | Buy from myPearsonStore

  • 0321245660Effective C#: 50 Specific Ways to Improve Your C#
    Wagner
    © 2005 | Addison-Wesley Professional | Paper; 336 pages | Instock
    ISBN-10: 0321245660 | ISBN-13: 9780321245663
    Brief Description | Buy from myPearsonStore

  • 0321485890More Effective C#: 50 Specific Ways to Improve Your C#
    Wagner
    © 2009 | Addison-Wesley Professional | Paper; 336 pages | Instock
    ISBN-10: 0321485890 | ISBN-13: 9780321485892
    Buy from myPearsonStore

  • 0321580486More Effective C#: 50 Specific Ways to Improve Your C#, Safari
    Wagner
    © 2009 | Addison-Wesley Professional | On-line Supplement; 336 pages | Instock
    ISBN-10: 0321580486 | ISBN-13: 9780321580481
    URL: http://www.safari.informit.com


Pearson Higher Education offers special pricing when you choose to package your text with other student resources. If you're interested in creating a cost-saving package for your students contact your Pearson Higher Education representative.


Copyright ©2008 Pearson Education. All rights reserved. Legal Notice | Privacy Policy | Permissions