skip to main content
Skip header Section
Code Reading: The Open Source Perspective, Vol. 1May 2003
Publisher:
  • Pearson Education
ISBN:978-0-201-79940-8
Published:01 May 2003
Pages:
528
Skip Bibliometrics Section
Bibliometrics
Skip Abstract Section
Abstract

From the Publisher: 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.

Contributors
  • Athens University of Economics and Business

Recommendations

Moh'd A. Radaideh

Spinellis' book provides comprehensive coverage of issues related to using open source C code. It contains 11 chapters and five indices, which address different aspects of open source software. Chapter 1 provides an overview of why and how to read code. It illustrates when to handle code as literature, versus exemplar. It is expected that open source code has been documented, published, reviewed, discussed, internalized, generalized, and paraphrased. In addition, it is also expected that it has been used to solve real problems. Some common signs of low quality code would be inconsistency in the coding style, complicated and unreadable structure, logical errors, nonportable constructs, and lack of maintenance. Maintenance, reuse, and inspections are very important actions, required for maintaining good quality code and software systems. "Basic Programming Elements," chapter 2, introduces the C programming language, including topics like functions, global variables, loops, and switch. Chapter 3, "Advanced C Data Types," introduces pointers, linked data structures, dynamic allocation of data structures, call by references, arrays as arguments and results, polymorphism implementation, internal representations, dynamic memory allocation, and managing free memory. Chapter 4, "C Data Structures," addresses the various C data types and structures. It covers vectors, matrices and tables, stacks, queues, maps, hash tables, sets, linked lists, trees, graphs, node storage, edge representation, edge storage, graph properties, and hidden structures. Chapter 5, "Advanced Control Flow," addresses recursion, exceptions, parallelism (in both hardware and software), threads and their implementation, signals, local and nonlocal jumps, and macros and their substitution. "Tackling Large Projects," chapter 6, covers different design and implementation techniques, including project organization and the source code tree structure, the build process, and makefiles. Chapter 7, "Coding Standards and Conventions," addresses issues such as how files are named, organized, and formatted. It also presents some programming practices and process standards. Chapter 8, "Documentation," presents an overview of the different documents of a software system. This includes the system specification document, the software requirements specifications, design specification, test specification, and the various types of user documentation. Chapter 9, "Architecture," illustrates system structures, such as centralized versus distributed, data-flow architectures, object-oriented structures, layered architectures, hierarchies, and slicing. It also illustrates the different types of control models, such as event-driven systems, system manager, and state transition. Chapter 10, "Code Reading Tools," discusses the different tools (mainly those that come with the Unix operating system) that can be used to edit and mange code. Chapter 11, "A Complete Example," presents a complete C program, with a detailed discussion. Appendices A through E provide helpful information on available open source code. I found this book to be very interesting. It would be suitable for an advanced undergraduate C course, and C developers should also find it to be very helpful. Online Computing Reviews Service

Access critical reviews of Computing literature here

Become a reviewer for Computing Reviews.