- Paperback: 960 pages
- Publisher: Microsoft Press; 2nd edition (June 19, 2004)
- Language: English
- ISBN-10: 0735619670
- ISBN-13: 978-0735619678
- Product Dimensions: 7.3 x 2.1 x 8.9 inches
- Shipping Weight: 3.3 pounds (View shipping rates and policies)
- Average Customer Review: 4.6 out of 5 stars See all reviews (299 customer reviews)
- Amazon Best Sellers Rank: #8,532 in Books (See Top 100 in Books)
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Code Complete: A Practical Handbook of Software Construction, Second Edition 2nd Edition
Use the Amazon App to scan ISBNs and compare prices.
ITPro.TV Video Training
Take advantage of IT courses online anywhere, anytime with ITPro.TV. Learn more.
Frequently bought together
Customers who bought this item also bought
About 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.
If you are a seller for this product, would you like to suggest updates through seller support?
Top Customer Reviews
McConnell's approach of talking to you, the programmer, is ideal: not too much humor, and an easy to read, but professional approach in the way he donates the contents of his brain: i.e. McConnell's lengthy experience in the field.
I read just a couple of paragraphs in a chapter before work one morning, and the advice I picked up saved so much time that same day. And it wasn't even specific to coding instruction. It was a piece of advice on a philosophy on how he personally determines how much upfront design he should settle on before coding.
Reading Software Construction material of this caliber, as compared to some, yet another, new book on a specific language that might look impressive to know, is what makes for a solid programmer.
Refreshing your overall S/W construction knowledge gives you so much more of your life back, because you will have way less bugs and a lot more fun maintaining the high-quality code you are now writing because of CC2.
I mentioned already that he covers OO, but I wanted to emphasize the excellent material he offers in this area. I am now seeing the benefit of measuring the quality of your classes by this guideline: are they true Abstract Data Types. ( rather than just trying to use the syntax that the language provides to its potential).
Great job on a rather thorough re-write of a S/W development staple.
The Good: McConnell deserves credit for writing the first (and only?) readable encyclopedia of best practices on software quality, covering topics such as how to build classes, use data and control structures, debug, refactor, and code-tune. Yes, it would be nice if the book was updated to include substantive material on languages like Ruby or Python (cf. p. 65, Python "also contains some support for creating larger programs") but, in the words of Gertrude Stein, "Not everything can be about everything" -- though Code Complete does come pretty close. This book contains an astonishing number of practical points on a variety of topics. Here is a quasi-random selection: a) don't use booleans as status variables (chs. 5, 12), b) when you feel the need to override a function and have it do nothing, don't; refactor instead (ch. 6), c) when choosing variable names, avoid homonyms (ch. 11), d) if you decide to use a goto, indenting your code properly will be difficult or impossible (ch. 17), e) trying to improve software quality by increasing the amount of testing is like trying to lose weight by weighing yourself more often (ch. 22), f) make your code so good that you don't need comments, and then comment it to make it even better (ch. 32), and finally the oft-repeated g) you should try to program into your language, not in it (ch. 34). McConnell also sprinkles the text with classic words of wisdom, e.g. "The competent programmer is fully aware of the strictly limited size of his own skull" (Edsger Dijkstra), "Never debug standing up" (Gerald Weinberg), "Copy and paste is a design error" (David Parnas), "Any fool can defend his or her mistakes -- and most fools do." (Dale Carnegie). It is important to point out that even though this volume is encyclopedia-like, it does have both a sense of humor (e.g. "the encryption algorithm is so convoluted that it seems like it's been used on itself") and a clear authorial voice (e.g. "Though sometimes tempting, that's dumb."). Another example of the latter: in ch. 33, after quoting Edward Yourdon at length, McConnell adds "This lusty tribute to programming machismo is pure B.S. and an almost certain recipe for failure".
The Bad: overall the writing is very good, but the occasional infelicity reminds us that McConnell is human (e.g. p. 369 "A loop-with-exit loop is a loop in which", p. 809 "A program contains all the routines in a program."). In a technical book of this breadth, minor mistakes are bound to creep in. For example, in ch. 10 McConnell mentions the different possible levels of a variable's scope in C++, and then adds that in Java and C# one can also use namespaces, thus effectively ignoring the existence of the namespace concept in C++ (which is baffling, given that he then discusses precisely that topic in ch. 11). Another example, this one more serious, is McConnell's recommendation that you should use a pointer - not a reference - if you want to pass by reference in C++ (ch. 13), something which is contrary to C++ best practices (see e.g. Sutter & Alexandrescu, "C++ Coding Standards", Item 25). A less technical point: in ch.2 McConnell criticizes Frederick Brooks for writing (in 1975): "Plan to throw one away; you will, anyhow". I found this to be bizarre, given that in the 1995 edition of "The Mythical Man-Month" Brooks states in no uncertain terms that he has changed his mind on this: "This I now perceive to be wrong" (p. 265). Given that Code Complete 2 was published nearly 10 years later (in 2004), criticizing Brooks for his publicly repudiated former opinion seems improper. On a different note, although some of the on-line accompanying material is fascinating (e.g. the links to the original Dijkstra and Lawrence articles in ch. 17) many of the links are just electronic versions of McConnell's checklists or bibliographies, while some are simply disappointing. To name only a couple of these, as of this writing the link on p. 856 on the economics of XP is a dead link, while the one on p. 76 is downright embarrassing (it links to a google search for "emergent design"). Finally, even though the book has a dedicated website, no list of errata is provided there. If you dig deeper, you can find one on the O'Reilly website, but that is woefully inadequate, e.g. it contains no information on separate printings.
The most common criticism one hears about this book is that any decent software developer should already know the material covered in it. Ironically enough, this is true. To quote Dr. Johnson: "People need to be reminded more often than they need to be instructed".
Have you ever looked at a class, or a method that seems to work fine but it just doesn't "feel" right? For some reason it seems as if that method or class may be hard to debug in the future or that the code is hard to understand. Or have you gone back to a class file you wrote months ago and you spend an awful lot of time trying to figure out what the heck is going on with that class file? Maybe the methods in the class are spaghetti like in nature, or maybe the names of your methods don't have a very good description so it's hard to figure out how everything ties together. I have had this problem. This book will teach you how to get out of those habits. You will learn what a solid class or method looks like. You will learn how properly naming your classes and methods can greatly reduce complexity in the long run. Everything is backed by hard evidence. I should also mention that this is just one chapter in this wonderful book.
This book really drills down proper programming practices. A lot of times you may read a passage and think to yourself "well, of course!"... but then you realize you don't practice what's contained in the passage you just read. This book is great for both new programmers and experienced programmers alike. New programmers benefit greatly because they will learn how to construct software properly without having to go through all of the hoops. Experienced programmers will also learn a great deal, as well as be reminded that some of their habits that they've developed over the years can hinder production and cause software development to become more complex then it really is.
Steve writes in a very clean style. It's very easy to read. You don't need to memorize anything in a book like this, instead you just need to gain an understanding of the concepts he brings forth. After reading this book I definitely follow a lot of his advice. When I build a new class, method or what-have-you I get a certain feeling of when it seems right and when something seems wrong. I am now much better at analyzing my code and figuring out what doesn't seem correct and I take his advice I learned in this book to help me to figure out - and correct the problem. After reading this book I feel like a lot of my rough edges as a developer have been rounded out. I feel as if I gained a years worth of experience just by reading this book.
This book is friendly for any software developer. The concepts he presents apply to all languages. This is a book that teaches you how to think about programming better and how to construct good solid code. This is one of the best books I've ever read. If you're even thinking about buying this book, then buy it.
Most Recent Customer Reviews
Code Complete is a classic in that case.Read more
of professional development strategies.Read more