Transcription of Code Complete, Second Edition eBook
1 PUBLISHED BYMicrosoft PressA Division of Microsoft CorporationOne Microsoft WayRedmond, Washington 98052-6399 Copyright 2004 by Steven C. McConnellAll rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means without the written permission of the of Congress Cataloging-in-Publication DataMcConnell, SteveCode complete / Steve 0-7356-1967-01. Computer Software--Development--Handbooks, manuals, etc. I. and bound in the United States of 16 17 18 19 20 21 22 23 24 QGT 6 5 4 3 2 1 Distributed in Canada by Fenn and Company Ltd. A CIP catalogue record for this book is available from the British Press books are available through booksellers and distributors worldwide. For further information about international editions, contact your local Microsoft Corporation office or contact Microsoft Press Inter-national directly at fax (425) 936-7329.
2 Visit our Web site at Send comments to Microsoft Press, PowerPoint, Visual Basic, Windows, and Windows NT are either registered trade-marks or trademarks of Microsoft Corporation in the United States and/or other countries. Other product and company names mentioned herein may be the trademarks of their respective example companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted herein are fictitious. No association with any real company, organization, product, domain name, e-mail address, logo, person, place, or event is intended or should be book expresses the author s views and opinions. The information contained in this book is provided with-out any express, statutory, or implied warranties. Neither the authors, Microsoft Corporation, nor its resellers, or distributors will be held liable for any damages caused or alleged to be caused either directly or indirectly by this Editors: Linda Engelman and Robin Van SteenburghProject Editor: Devon MusgraveIndexer: Bill MyersPrincipal Desktop Publisher: Carl DiltzBody Part No.
3 Page iv Thursday, April 7, 2011 5:54 PMDownload from Wow! eBook < >To my wife, Ashlie, who doesn't have much to do with computer programming but who has everything to do with enriching the rest of my life in more ways than I could possibly describeFurther Praise forCode complete An excellent guide to programming style and software construction. Martin Fowler, Refactoring Steve McConnell s code complete .. provides a fast track to wisdom for programmers.. His books are fun to read, and you never forget that he is speaking from hard-won personal experience. Jon Bentley, programming Pearls, 2d ed. This is simply the best book on software construction that I've ever read. Every developer should own a copy and read it cover to cover every year. After reading it annually for nine years, I'm still learning things from this book!
4 John Robbins, Debugging Applications for Microsoft .NET and Microsoft Windows Today s software must be robust and resilient, and secure code starts with disciplined software construction. After ten years, there is still no better authority than code complete . Michael Howard, Security Engineering, Microsoft Corporation; Coauthor, Writing Secure code A comprehensive examination of the tactical issues that go into crafting a well-engineered program. McConnell s work covers such diverse topics as architecture, coding standards, testing, integration, and the nature of software craftsmanship. Grady Booch, Object Solutions The ultimate encyclopedia for the software developer is code complete by Steve McConnell. Subtitled A Practical Handbook of Software Construction, this 850-page book is exactly that.
5 Its stated goal is to narrow the gap between the knowledge of industry gurus and pro-fessors (Yourdon and Pressman, for example) and common commercial practice, and to help you write better programs in less time with fewer headaches.. Every developer should own a copy of McConnell's book. Its style and content are thoroughly practical. Chris Loosley, High-Performance Client/Server Steve McConnell s seminal book code complete is one of the most accessible works discuss-ing in detail software development methods.. Erik Bethke, Game Development and Production A mine of useful information and advice on the broader issues in designing and producing good software. John Dempster, The Laboratory Computer: A Practical Guide for Physiologists and Neuroscien-tists If you are serious about improving your programming skills, you should get code complete by Steve McConnell.
6 Jean J. Labrosse, embedded Systems Building Blocks: complete and Ready-To-Use Modules in C Steve McConnell has written one of the best books on software development independent of computer environment .. code complete . Kenneth Rosen, Unix: The complete Reference Every half an age or so, you come across a book that short-circuits the school of experience and saves you years of purgatory.. I cannot adequately express how good this book really is. code complete is a pretty lame title for a work of brilliance. Jeff Duntemann, PC Techniques Microsoft Press has published what I consider to be the definitive book on software con-struction. This is a book that belongs on every software developer s shelf. Warren Keuffel, Software Development Every programmer should read this outstanding book.
7 T. L. (Frank) Pappas, Computer If you aspire to be a professional programmer, this may be the wisest $35 investment you ll ever make. Don t stop to read the rest of this review: just run out and buy it. McConnell s stat-ed purpose is to narrow the gap between the knowledge of industry gurus and common com-mercial practice.. The amazing thing is that he succeeds. Richard Mateosian, IEEE Micro code complete should be required reading for anyone .. in software development. Tommy Usher, C Users Journal I m encouraged to stick my neck out a bit further than usual and recommend, without res-ervation, Steve McConnell s code complete .. My copy has replaced my API reference man-uals as the book that s closest to my keyboard while I work. Jim Kyle, Windows Tech Journal This well-written but massive tome is arguably the best single volume ever written on the practical aspects of software implementation.
8 Tommy Usher, embedded Systems programming This is the best book on software engineering that I have yet read. Edward Kenworth, .EXE Magazine This book deserves to become a classic, and should be compulsory reading for all develop-ers, and those responsible for managing them. Peter Wright, Program NowCode complete , Second Edition0-7356-1967-0 Steve McConnell viiContents at a GlancePart ILaying the Foundation1 Welcome to Software Construction ..32 Metaphors for a Richer Understanding of Software Development ..9 3 Measure Twice, Cut Once: Upstream Prerequisites.. 23 4 Key Construction Decisions .. 61 Part IICreating High-Quality code 5 Design in Construction .. 73 6 Working Classes .. 125 7 High-Quality Routines.. 161 8 Defensive programming .. 187 9 The Pseudocode programming Process.
9 215 Part IIIV ariables 10 General Issues in Using Variables.. 23711 The Power of Variable Names .. 259 12 Fundamental Data Types .. 291 13 Unusual Data Types .. 319 Part IVStatements14 Organizing Straight-Line code .. 347 15 Using Conditionals.. 355 16 Controlling Loops .. 367 17 Unusual Control Structures.. 391 18 Table-Driven Methods.. 41119 General Control Issues.. 431viiiTable of ContentsPart VCode Improvements 20 The Software-Quality Landscape .. 463 21 Collaborative Construction.. 479 22 Developer Testing .. 499 23 Debugging .. 535 24 Refactoring .. 563 25 code -Tuning Strategies.. 587 26 code -Tuning Techniques .. 609 Part VISystem Considerations 27 How Program Size Affects Construction .. 649 28 Managing Construction .. 661 29 Integration.
10 689 30 programming Tools .. 709 Part VIIS oftware Craftsmanship31 Layout and Style.. 729 32 Self-Documenting code .. 777 33 Personal Character .. 81934 Themes in Software Craftsmanship.. 837 35 Where to Find More Information .. 855ixWhat do you think of this book?We want to hear from you!Microsoft is interested in hearing your feedback about this publication so we can continually improve our books and learning resources for you. To participate in a brief online survey, please visit: Table of ContentsPreface .. xixAcknowledgments..xxviiList of Checklists .. xxixList of Tables.. xxxiList of Figures .. xxxiiiPart ILaying the Foundation1 Welcome to Software Construction .. What Is Software Construction?.. Why Is Software Construction Important? .. How to Read This Book.