did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780201799408

Code Reading The Open Source Perspective

by
  • ISBN13:

    9780201799408

  • ISBN10:

    0201799405

  • Edition: 1st
  • Format: Paperback
  • Copyright: 2003-05-27
  • Publisher: Addison-Wesley Professional
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $69.99
  • Digital
    $72.44
    Add to Cart

    DURATION
    PRICE

Supplemental Materials

What is included with this book?

Summary

bull; 600 real-world examples that teach you how to identify good (and bad!) code bull; Identifies what exactly to look for when reading code, and how to improve code based on what you read bull; The latest in the excellent tradition of Addison-Wesley "programmer self help" books!

Author Biography

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.



Table of Contents

Foreword
Preface
Introduction
Why and How to Read Code
Code as Literature
Code as Exemplar
Maintenance
Evolution
Reuse
Inspections
How to Read this Book
Typographical Conventions
Diagrams
Exercises
Supplementary Material
Tools
Outline
The Great Language Debate
Basic Programming Elements
A Complete Program
Functions and Global Variables
While, Conditions, Blocks
Switch
For
Break, Continue
Character and Boolean Expressions
Goto
Refactoring in the Small
Do, Integer Expressions
Control Structures Revisited
Advanced C Data Types
Pointers
Linked Data Structures
Dynamic Allocation of Data Structures
Call by Reference
Data Element Access
Arrays as Arguments and Results
Function Pointers
Pointer as an Alias
Pointers and Strings
Direct Memory Access
Structures
Grouping Together Data Elements
Returning Multiple Data Elements from a Function
Mapping the Organization of Data
Programming in an Object-Oriented Fashion
Unions
Efficient Use of Storage
Implementing Polymorphism
Accessing Different Internal Representations
Dynamic Memory Allocation
Managing Free Memory
Structures with Dynamically-Allocated Arrays
Typedef Declarations
C Data Structures
Vector
Matrix and Table
Stack
Queue
Map
Hash Tables
Set
Linked List
Tree
Graph
Node Storage
Edge Representation
Edge Storage
Graph Properties
Hidden Structures
Other Representations
Advanced Control Flow
Recursion
Exceptions
Parallelism
Hardware and Software Parallelism
Control Models
Thread Implementations
Signals
Nonlocal Jumps
Macro Substitution
Tackling Large Projects
Design and Implementation Techniques
Project Organization
The Build Process and Makefiles
Configuration
Revision Control
Project-Specific Tools
Testing
Coding Standards and Conventions
File Names and Organization
Indentation
Formatting
Naming Conventions
Programming Practices
Process Standards
Documentation
Documentation Types
Reading Documentation
Documentation Problems
Additional Documentation Sources
Common Open-Source Documentation Formats
Architecture
System Structures
Centralized Repository and Distributed Approaches
Data-Flow
Object-Oriented
Layered
Hierarchies
Slicing
Control Models
Event-Driven Systems
System Manager
State Transition
Element Packaging
Module
Namespace
Object
Generic Implementation
Abstract Data Type
Library
Process and Filter
Component
Data Repository
Architecture Reuse
Frameworks
Code Wizards
Design Patterns
Domain-Specific Architectures
Code-Reading Too
Table of Contents provided by Publisher. All Rights Reserved.

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Excerpts

What do we ever get nowadays from reading to equal the excitement and the revelation in those first fourteen years?-- Graham Greene The reading of code is likely to be one the most common activities of a computing professional, yet it is seldom taught as a subject, or formally used as a method for learning how to design and program. One reason for this sad situation may have been the lack of high-quality code to read. Companies often protect source code as a trade secret and rarely allow others to read, comment, experiment, and learn from it. In the few cases where important proprietary code was allowed out of a company's closet, it has spurred enormous interest and creative advancements. As an example, a generation of programmers benefited from John Lions'Commentary on the UNIX Operating Systemthat listed and annotated the complete source code of the sixth edition UNIX kernel. Although Lions' book was originally written under a grant from AT&T for use in an operating system course and was not available to the general public, copies of it circulated for years as bootleg nth-generation photocopies. In the last few years however, the popularity of open-source software has provided us with a large body of code that we can all freely read. Some of the most popular software systems used today, such as theApacheWeb server, the Perl language, the gnu/Linux operating system, the BIND domain-name server, and the sendmail mail-transfer agent are in fact available in open-source form. I was thus fortunate to be able to use open-source software, such as the above to write this book as a primer and reader for software code. My goal was to provide background knowledge and techniques for reading code written by others. By using real-life examples taken out of working, open-source projects I tried to cover most concepts related to code that are likely to appear before a software developer's eyes including programming constructs, data types, data structures, control flow, project organization, coding standards, documentation, and architectures. A companion title to this book will cover interfacing, and application-oriented code including the issues of internationalization and portability, the elements of commonly used libraries and operating systems, low-level code, domain-specific and declarative languages, scripting languages, and mixed language systems. This book is--as far as I know--the first one to exclusively deal with code-reading as a distinct activity, one worthy on its own. As such I am sure that there will be inevitable shortcomings, better ways some of its contents could have been treated, and important material I have missed. I firmly believe that the reading of code should both be properly taught, and used as a method for improving one's programming abilities. I therefore hope that this book will spur interest to include code reading courses, activities, and exercises into the computing education curriculum so that in a few years our students will learn from existing open-source systems, just as their peers studying a language learn from the great literature. Supplementary Material Many of the source code examples provided come from the source distribution of NetBSD. NetBSD is a free, highly portable UNIX-like operating system available for many platforms, from 64-bit AlphaServers to handheld devices. Its clean design and advanced features make it an excellent choice for both production and research environments. I selected NetBSD over other similarly admirable and very popular free UNIX-like systems such as GNU/Linux, FreeBSD, and OpenBSD, because the primary goal of the NetBSD project is to emphasize correct design and well written code thus making it a superb choice for providing example source code. According to its developers, some systems seem to have the philosophy of "if it works, it's right" whereas NetBSD could be described as "it doesn't work unless it's right."

Rewards Program