Home > Store > Process Improvement

Code Reading: The Open Source Perspective

Code Reading: The Open Source Perspective

eBook (Watermarked)

  • Your Price: $44.79
  • List Price: $55.99
  • Includes EPUB, MOBI, and PDF
  • About eBook Formats
  • This eBook includes the following formats, accessible from your Account page after purchase:

    ePub EPUB The open industry format known for its reflowable content and usability on supported mobile devices.

    MOBI MOBI The eBook format compatible with the Amazon Kindle and Amazon Kindle applications.

    Adobe Reader PDF The 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.

Also available in other formats.

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

Description

  • Copyright 2003
  • Pages: 528
  • Edition: 1st
  • eBook (Watermarked)
  • ISBN-10: 0-13-265192-0
  • ISBN-13: 978-0-13-265192-9

If you are a programmer, you need this book.

  • You've got a day to add a new feature in a 34,000-line program: Where do you start? Page 333
  • How can you understand and simplify an inscrutable piece of code? Page 39
  • Where do you start when disentangling a complicated build process? Page 167
  • How do you comprehend code that appears to be doing five things in parallel? Page 132

You may read code because you have to--to fix it, inspect it, or improve it. You may read code the way an engineer examines a machine--to discover what makes it tick. Or you may read code because you are scavenging--looking for material to reuse.

Code-reading requires its own set of skills, and the ability to determine which technique you use when is crucial. In this indispensable book, Diomidis Spinellis uses more than 600 real-world examples to show you how to identify good (and bad) code: how to read it, what to look for, and how to use this knowledge to improve your own code.

Fact: If you make a habit of reading good code, you will write better code yourself.

Downloads

CD Contents

Download the complete source code base (134 MB) for the book: Code Reading: The Open Source Perspective.

Sample Content

Table of Contents



Foreword.


Preface.


1. 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.



2. 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.



3. 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.



4. 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.



5. Advanced Control Flow.

Recursion.

Exceptions.

Parallelism.

Hardware and Software Parallelism.

Control Models.

Thread Implementations.

Signals.

Nonlocal Jumps.

Macro Substitution.



6. Tackling Large Projects.

Design and Implementation Techniques.

Project Organization.

The Build Process and Makefiles.

Configuration.

Revision Control.

Project-Specific Tools.

Testing.



7. Coding Standards and Conventions.

File Names and Organization.

Indentation.

Formatting.

Naming Conventions.

Programming Practices.

Process Standards.



8. Documentation.

Documentation Types.

Reading Documentation.

Documentation Problems.

Additional Documentation Sources.

Common Open-Source Documentation Formats.



9. 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.



10. Code-Reading Tools.

Regular Expressions.

The Editor as a Code Browser.

Code Searching With Grep.

Locating File Differences.

Roll your Own Tool.

The Compiler as a Code-Reading Tool.

Code Browsers and Beautifiers.

Run-Time Tools.

Non-software Tools.



11. A Complete Example.

Overview.

Attack Plan.

Code Reuse.

Testing and Debugging.

Documentation.

Observations.



Appendix A. Outline of the Code Provided.


Appendix B. Source Code Credits.


Appendix C. Referenced Source Files.


Appendix D. Source Code Licenses.

BSD.

X.

ACE.

Apache.

DemoGL.

OpenCL.

ArgoUML.

Perl.



Appendix E. Maxims for Reading Code.


Bibliography.


Index.


Author Index. 0201799405T01162003

Updates

Submit Errata

More Information

ONE MONTH ACCESS!

WITH PURCHASE


Get unlimited 30-day access to thousands of Books & Training Videos about technology, professional development and digital media 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.