Code Reading: The Open Source Perspective

Code Reading: The Open Source Perspective

by Diomidis Spinellis
     
 

View All Available Formats & Editions

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

Overview

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.

Editorial Reviews

bn.com
The Barnes & Noble Review
How do you learn to write great code? By reading great code. Once, that was nearly impossible. (Imagine if you had to work for the “Shakespeare” company to read Hamlet.) With the success of the open source movement, however, there’s suddenly loads of great code to read, much of it written by true masters. (Some of it’s even well documented!)

But most folks have never learned how to read great code. So they learn only a fraction of what they could learn.

That’s where Code Reading comes in. Diomedis Spinellis systematically teaches you how to read code. You’ll become “fluent” in reading code from many languages. (There’s lots of C here, unsurprisingly, but he’s also included many examples from Java, C++, and other languages.) You’ll review code from many open source projects (though he’s partial to NetBSD for its legendary emphasis on correct design and careful coding).

The examples range from the use of functions and global variables all the way to the design and architecture of large systems. You’ll find chapters on data types and structures, advanced control flow, effective coding standards, documentation, and more. There’s even a chapter on using code reading tools -- your editor, compiler, grep, regular expressions, and so forth.

Reading code won’t “just” make you a better developer. It’s indispensable if you’re involved in outsourced development projects, or if you use collaborative methodologies such as XP, or if you participate in code walkthroughs. These scenarios are, of course, increasingly widespread -- if not dominant. You desperately need this skill. This is -- by far -- the best place to learn it. Bill Camarda

Bill Camarda is a consultant, writer, and web/multimedia content developer. His 15 books include Special Edition Using Word 2000 and Upgrading & Fixing Networks for Dummies, Second Edition.

Product Details

ISBN-13:
9780672333705
Publisher:
Pearson Education
Publication date:
05/27/2003
Sold by:
Barnes & Noble
Format:
NOOK Book
Pages:
528
File size:
10 MB

Meet the Author

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.

Customer Reviews

Average Review:

Write a Review

and post it to your social network

     

Most Helpful Customer Reviews

See all customer reviews >