Home > Store > Programming > Windows Programming

larger cover

Add To My Wish List

Code Quality: The Open Source Perspective

Register your product to gain access to bonus material or receive a coupon.

  • Description
  • Extras
  • Reviews
  • Sample Content

Product Author Bios

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 online at: http://www.spinellis.gr/codequality/



Customer Reviews

14 of 14 people found the following review helpful
4.0 out of 5 stars Spinellis: The Anti-Kernighan, October 1, 2006
This review is from: Code Quality: The Open Source Perspective (Paperback)
First of all, this author is a serious academic. The book is worth reading and probably will be for a long time to come. It's also a fine production typesetting-wise. The previous review's complain about copy-editing errors in the book is really missing the point, because those could be easily overlooked when you read books of such a grand scale.

The good points aside, however, I'm honestly a little surprised that there was only one review prior to the current one. This seems to indicate it's neither that popular, nor that obviously destined to be a classic, as the author probably had in mind when he was composing it.

One drawback, which it shares with its older sister, "Code Reading" (2003), is a pompous writing style. Lots of words and pages are wasted dwelling on the obvious, and in quite a few spots the way too obvious. Just go through one of those end-of-a-chapter points to take home, you'll know what I mean. As couple of more specific examples, take a look... Read more
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


5 of 5 people found the following review helpful
4.0 out of 5 stars Important information, but it's not an easy read..., October 16, 2006
By 
Thomas Duff "Duffbert" (Portland, OR United States) - See all my reviews
(VINE VOICE)    (TOP 500 REVIEWER)    (HALL OF FAME REVIEWER)    (REAL NAME)   
This review is from: Code Quality: The Open Source Perspective (Paperback)
Code Quality by Diomidis Spinellis is the follow-up volume to Code Reading. Like the first one, there's a lot of wisdom in the writing, but the Unix/C++ and computer majors will get the most out of it.

Contents: Introduction; Reliability; Security; Time Performance; Space Performance; Portability; Maintainability; Floating-Point Arithmetic; Source Code Credits; Bibliography; Index; Author Index

Spinellis uses examples from open source code and software to discuss what makes for quality code. In most cases, the examples are designed to show what's *not* good. This might include buffer overruns, algorithms that don't scale well, and other various and sundry items. Each chapter ends with an Advice To Take Home section, which recaps all the suggestions and practices in a series of one to two line summaries (with references back to the detailed discussion). Because each chapter pretty much stands alone, you can focus on areas that make the most sense to you in... Read more
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


9 of 11 people found the following review helpful
3.0 out of 5 stars Good book, marred by copy editing errors, June 27, 2006
By 
Edwin Fine (Tampa, FL USA) - See all my reviews
(REAL NAME)   
This review is from: Code Quality: The Open Source Perspective (Paperback)
This book has a great deal of interesting and practical advice. A few people learn much of this advice through years of experience, but from what I have seen, most do not. This book would be most useful to beginning and intermediate software developers who have not yet discovered the wisdom by trial and error, or experienced developers who want to communicate the information to less knowledgable colleagues in an easily digestible format.
Unfortunately, I was disappointed by by the quality of copy editing. I would have given the book 4 stars otherwise. However, I would still recommend the book, even with the errors, because it's worth it.
I wrote an email to the author, using the email address given on his website, giving in detail the errors I found in the book (First Printing, March 2006).
The author kindly emailed me promptly to inform me that he had added to the errata page the errors I had identified. Thanks to the author for the prompt reply and action.
I hope... Read more
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


Share your thoughts with other customers:
 See all 4 customer reviews...

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     503

Bibliography     505
Index     523
Author Index     563


Downloadable Sample Chapter

Download the Sample Chapter related to this title.

Foreword

Download the Foreword related to this title.

Index

Download the Index file related to this title.

 
Best Value

Book + eBook Bundle  $107.98  $64.79

Book Price $47.99
eBook Price $16.80
eBook formats included

Buy

This book includes free shipping!

Buy

Book  $59.99  $47.99

Usually ships in 24 hours.

This book includes free shipping!

Buy

eBook (Watermarked)  $47.99  $38.39

Includes EPUB, MOBI, and PDF
About eBook Formats

This eBook includes the following formats, accessible from your Account page after purchase:

ePubEPUBThe open industry format known for its reflowable content and usability on supported mobile devices.

MOBIMOBIThe eBook format compatible with the Amazon Kindle and Amazon Kindle applications.

Adobe ReaderPDFThe popular standard, used most often with the free Adobe® Reader® software.

This eBook requires no passwords or activation to read. We customize your eBook by discretely watermarking it with your name, making it uniquely yours.

Purchase Reward: One Month Free Subscription
By completing any purchase on InformIT, you become eligible for an unlimited access one-month subscription to Safari Books Online.

Get access to thousands of books and training videos about technology, professional development and digital media from more than 40 leading publishers, including Addison-Wesley, Prentice Hall, Cisco Press, IBM Press, O'Reilly Media, Wrox, Apress, and many more. If you continue your subscription after your 30-day trial, you can receive 30% off a monthly subscription to the Safari Library for up to 12 months. That's a total savings of $199.