Uh-oh, it looks like your Internet Explorer is out of date.

For a better shopping experience, please upgrade now.

Code Complete

Code Complete

4.6 23
by Steve McConnell

See All Formats & Editions

Widely considered one of the best practical guides to programming, Steve McConnell’s original CODE COMPLETE has been helping developers write better software for more than a decade. Now this classic book has been fully updated and revised with leading-edge practices—and hundreds of new code samples—illustrating the art and science of software


Widely considered one of the best practical guides to programming, Steve McConnell’s original CODE COMPLETE has been helping developers write better software for more than a decade. Now this classic book has been fully updated and revised with leading-edge practices—and hundreds of new code samples—illustrating the art and science of software construction. Capturing the body of knowledge available from research, academia, and everyday commercial practice, McConnell synthesizes the most effective techniques and must-know principles into clear, pragmatic guidance. No matter what your experience level, development environment, or project size, this book will inform and stimulate your thinking—and help you build the highest quality code.
Discover the timeless techniques and strategies that help you:

  • Design for minimum complexity and maximum creativity
  • Reap the benefits of collaborative development
  • Apply defensive programming techniques to reduce and flush out errors
  • Exploit opportunities to refactor—or evolve—code, and do it safely
  • Use construction practices that are right-weight for your project
  • Debug problems quickly and effectively
  • Resolve critical construction issues early and correctly
  • Build quality into the beginning, middle, and end of your project

Editorial Reviews

The Barnes & Noble Review
For ten years, Steve McConnell’s Code Complete has inspired programmers to get better at their profession and has given them powerful insights for doing so. Now, he’s thoroughly overhauled Code Complete to reflect all that’s happened since 1994. Web programming. Agile and collaborative methods. Patterns. Refactoring.

There are some code examples here -- now in C#, VB.NET, and Java. (And object-oriented techniques are now woven throughout.) But the heart of the book is still how to think more clearly at every level.

How much planning is enough for your project? How do you manage complexity? Choose the right language for the task? Write higher-quality code? Organize it effectively? Cope with the realities of integration? Few books deal well with questions like these. Code Complete, Second Edition does, and it’s indispensable. Bill Camarda

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

The concepts discussed in this encyclopedic treatment are applicable to any procedural language in any computing environment. The presentation, intended to help developers take strategic action rather than fight the same battles again and again, includes some 500 examples of code (good and bad), along with checklists for assessment of architecture, design approach, and module and routine quality. Annotation c. Book News, Inc., Portland, OR (booknews.com)

Product Details

Pearson Education
Publication date:
Developer Best Practices
Sold by:
Barnes & Noble
Sales rank:
File size:
8 MB

Read an Excerpt

From Chapter 20: Programming Tools

...20.6 Ideal Programming Environment

This section's description of an ideal programming environment is an excursion into programming fantasyland. Although such a vision is not immediately practical, this book about construction has a responsibility to define where construction tools should be going. All of the capabilities described in this section are easily within the reach of today's technology. Perhaps the description will serve as inspiration for an ambitious toolsmith who will create a programming environment that towers above the ones currently available.

For this discussion, the fantasy environment is called "Cobbler." The name is inspired by the old saying that the cobbler's children are the last to have new shoes, which is true of today's programmers and programming tools.


The Cobbler environment integrates the programming activities of detailed design, coding, and debugging. When source-code control is needed, Cobbler integrates source-code version control too. If the detailed-design practices suggested in this book are followed, the primary detailed-design tool required is PDL, which can be handled easily, even in text environments.

Language support

During code construction, Cobbler provides ready access to cross-referenced help on the programming language. Help discusses nuances of the language as well as the basics and mentions common problems in using features of the language. For error messages, Help lists the common problems that might give rise to each message.

The environment provides templates for language constructs so that youdon't need to remember the precise syntax for a case statement, a for loop, or a more unusual construct. The help systems provides a well-organized list of all available routines, and you can paste the template for a routine into your code.

Detailed cross-referencing

Cobbler enables you to generate a list of all the places in which a variable is used or receives a value. You can get help on a variable declaration the same way you's get help on any other topic, with ready access to the variable definition and comments about it.

You can retrieve information on routines just as easily. You can follow a chain of calls to routines up and down--pointing at the name of the routine you want to view in more detail. You can check variable types in a call to a routine with the touch of key.

Interactive views of program organization

The Cobbler environment radically changes the way you view program source text. Compilers read source files from beginning to end, and traditional development environments force you to view a program the same way. This is sequential and flat--far from what you need for a meaningful view of a program.

In Cobbler, you can view a tangle of routine names, graphically presented, and zoom in on any routine. You can choose the model that organizes the tangle of routines: hierarchy, network, modules, objects, or an alphabetical listing. Your high-level view isn't cluttered by a routine's details until you want to zoom in on them.

When looking at the guts of a routine, you can view them at any of several levels of detail. You can view only the routine's definition or only the comment prolog. You can view code only or comments only. You can view control structures with or without a display of the code they control. In languages with macro commands, you can view a program with the macros expanded or contracted. If they're contracted, you can expend an individual macro with the touch of a key.

In writing this book, I've used a word processor with a powerful outline view. Without the outline view and the ability to study an outline and then zoom in on its detailed contents, I'd have a weak sense of each chapter's structure. The only view I'd see of each chapter would be flat, and the only sense of structure I'd have would come from scrolling from beginning to end. The ability to zoom between low-level and high-level views gives me a sense of the topology of each chapter, and that's critical to organizing my writing.

Organizing source code is as difficult as organizing writing. It's hard to believe that I lack any capability whatsoever to view the topology of my programs, especially when I've had a similar capability in my writing tools for more than five years.

The kinds of components that make up a program can also be improved. The semantics of source files are hazy, and the concept is better replaced by the ideas of modules, packages, or objects. The concept of source files is obsolete. You should be able to think about the semantics of your programs without worrying about how the code is physically stored.

Interactive formatting

Cobbler provides more active formatting aids than existing environments do. For example, it's graphical user interface makes outer parentheses larger than inner parentheses, as they have been displayed in mathematical texts for a hundred years.

The environment formats code according to user-specified parameters without resorting to a separate pretty-primer program. Any environment that knows about your program already knows where all your logical structures and variable declarations are. In Cobbler, you don't need to resort to a separate program to format your code. Some current environments provide feeble support for automatic indentation of control structures as you enter them. But when they're modified and 45 lines need to be shifted out six columns each, you're on your own. In the ideal programming environment, the environment formats the code according to the code's logical structure. If you change the logical structure, the environment reformats the code accordingly...

Meet the Author

Steve McConnell is recognized as one of the premier authors and voices in the development community. He is Chief Software Engineer of Construx Software and was the lead developer of Construx Estimate and of SPC Estimate Professional, winner of Software Development magazine's Productivity Award. He is the author of several books, including Code Complete and Rapid Development, both honored with Software Development magazine's Jolt Award.

Customer Reviews

Average Review:

Post to your social network


Most Helpful Customer Reviews

See all customer reviews

Code Complete 4.6 out of 5 based on 0 ratings. 23 reviews.
Guest More than 1 year ago
I first read this book when it was published, and I was just graduating college. Since then I've built software in C, C++, and Pascal. I've built hardware with verilog and VHDL. I've built testbenches with Vera and E. This is the most relevant book, and I still have it on my shelf to loan to new graduates. It helps you to understand all of the most important concepts for developing hardware and software with any language imaginable. With all this, you would think that it is hard to read. But this book is written in an enjoyable style, a rare quality in engineering of any kind. Read it!
Guest More than 1 year ago
Once you've learned the basics of programming, this is the book to get to fill out the 'big picture' of large development projects, AND help with all the little details. From algorithms to coding standards, project estimates to quality assurance, this book clearly overviews the field, and points you in the right direction for more detail. I lent my copy to a friend, so now I'm ordering TWO more.
Guest More than 1 year ago
Easily the best book on software development. The information is described clearly and the examples highlight the message. Many supporting references validate the author's observations and conclusions.
Suren More than 1 year ago
This is a must read for every software developer. In our software development company, we give a copy of this book to every new employee.
Guest More than 1 year ago
I didn't agree with everything in this book, but I did agree with most of it. It's a pretty good set of guidelines and just relates the things that should be common knowledge among programmers but unfortunately obviously ain't. We've settled a lot of arguments with this book. Some have accused it of a Microsoft orientation, but I haven't seen that. I wish schools would start their computer-science track with a flowcharting class, then a class based on this book.
Guest More than 1 year ago
I have found that no matter what programming language you use, this book provides many indespensible tools for building rock solid software. I have made it a habit to revisit this book at least once every 18 months to remind myself of the many ideals to software construction, and to gauge my working progress toward better code construction.
Guest More than 1 year ago
This book will make you a better programmer, regardless of your level of experience, target operating system or language. It's that good.
Anonymous More than 1 year ago
Barnes and Nobles service was great
Anonymous More than 1 year ago
Anonymous More than 1 year ago
Anonymous More than 1 year ago
Anonymous More than 1 year ago
Anonymous More than 1 year ago
Anonymous More than 1 year ago
Anonymous More than 1 year ago
Anonymous More than 1 year ago
Anonymous More than 1 year ago
Anonymous More than 1 year ago
Anonymous More than 1 year ago
good book. It's really good
love this movie! The actor, Teppei Koike is very cute and while Risa "s actor may be a bit over the top, the whole cast is very good!
Anonymous More than 1 year ago
Anonymous More than 1 year ago
Guest More than 1 year ago
This book gave me an idea of software engineering as a whole. There are many advice which I believe would be very useful to any computer programmer.
Guest More than 1 year ago
I think the maddening wordiness, problematic with most books I read, wastes time and productivity outside the classroom. The purchaser has to highlight 3,500 pages of otherwise classic books, including McConnell and Nielsen, into 1,000 pages of system and program design fundamentals- essential for every professional.