Home - Software Design, Testing & Engineering
Code Complete
Price: $39.99
& 2-Day * Free Nationwide Shipping! (* details)
Availability: Usually ship in 24 hours if sold by Amazon.com
Product Details
| Binding: | Kindle Edition |
|---|---|
| EAN: | |
| Label: | Microsoft Press |
| Feature: | |
| Publisher: | Microsoft Press |
| Studio: | Microsoft Press |
Editorial Reviews
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.
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.
Steve McConnell provides a balanced, thoughtful discussion of competing approaches to software development. He also provides a wealth of references to additional materials covering specific topics in more detail. In a field that is often defined by religious arguments, CC2 stays objective on most topics. At the same time, McConnell does not shy away from stating his conclusions on topics that he believes have a clear-cut ?best choice?.
Overall, this book is as much of a ?must have? as the first edition and destined to become just as famous.
CC covers pretty much every part of the software development lifecycle, from planning to code reviews to testing. These are all pretty good discussions, but the best bit is definitely the chapters on coding. Most of the examples are in Visual Basic or Java, so you'd do well to know one of those languages.
When it comes to object modelling, there's actually a reasonable set of guidelines harvestable from literature, and languages tend to diverge more on issues of packaging, so CC is at its best at the lower level procedural details of code layout, formatting, loop construction, optimisation and so on. Many books claim to provide coding guidelines, but don't do much beyond stating the obvious like (for Java) "use camel case for variable names", "start class names with capital letters" and "avoid Hungarian notation". CC is different because it actually provides useful recommendations. As an example, there's a very good discussion on when and where the use of loop-breaking constructs like break and continue ('next' in Ruby and Perl) are appropriate. Few (if any) other books provide this sort of practical detail.
It's well-written, with just the right amount of humour in its exhortations - the withering references to coders who investigate loop bugs by randomly adjusting the termination criterion up or down by one until it works raised a wry smile from this reviewer.
To summarise, this is a collection of best practices distilled from a pretty huge amount of reading, and is genuinely helpful. I would certainly point any programming beginner at this book.
Programmers on every level (from introduction to master) will benefit from reading this book. Programmers at the introduction level may find some topics advanced, but references to additional resources are close at hand. This book covers a broad range of interconnected topics ranging from: variable names, code-tuning, personal character, managing your manager, gonzo programming and much more. The emphasis is always on successful software design techniques.
McConnell doesn't shy away from presenting hard data and details; he nails the "whys" that so many other texts avoid.
Selected quotes from Code Complete:
"People have already made all the mistakes that you're making now, and unless you're a glutton for punishment, you'll prefer reading their books and avoiding their mistakes to inventing new versions of old problems." (Chapter 35)
"Once a programmer realizes that programming principles transcend the syntax of any specific language, the doors swing open to knowledge that truly makes a difference in quality and productivity." (Preface)
"The value of hands-on experience as compared to book learning is smaller in software development than in many other fields" (Chapter 35)
It's interesting to note that Code Complete is a required read to become a practitioner (intermediate) level employee in McConnell's company (Construx).
Code Complete is often compared with The Pragmatic Programmer: From Journeyman to Master [Hunt, Andrew, and Thomas, David]; the topics covered in the Pragmatic Programmer are a small subset of Code Complete. Code Complete is consistently written at a higher level, and offers more references for continual research and professional development. But don't take my word for it; read both, the Pragmatic Programmer makes a good prerequisite to Code Complete.
Hailing this book as "The Holy Grail of programming references" may seem fanatical, but I have yet to find a book that remotely measures up to Code Complete.
I pre-ordered CC2 and have spent the past 2 weeks devouring its contents. CC2 does not disappoint. McConnell has once again distilled his insights into a practical handbook that should be on every software development professional?s bookshelf.
CC2 provides numerous benefits: it?s a complete software-construction reference. It provides dozens of checklists. And it contains no hype. It?s valuable to beginning programmers, team leads, and technically oriented managers. The tone is conversational with just the right amount of humor. Throughout the book, it?s clear that Steve has ?been there, done that.? Thank you Steve!!!
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".
Alex Gezerlis
This book covers a wide range of material, from variable declaration to variable naming to software design and probably everything else concerning software construction. This book talks a lot about style, but it is backed up with hard facts not just personal preference.
The examples are written in several languages (such as C++, Java, and VB). It includes a very meaty chapter on design, as well as chapters on classes, high quality routines, and refactoring. Even though this is book is not mainly about design, it is the best design book I have read!
Each chapter has an Additional Resources section so you know where to go for more. The resources are also online on the authors website which is extremely handy.
This book teaches you how you can write good and self-describing code. I wished every program I've had to read had been written by programmers who read this book and applied that knowledge. If you're a manager buy copies for all your programmers. It will be the best investment you ever made in your programmers and projects.
There might be a tiny percentage of developers out there who could read the entire book and say they were already familiar with all the best practices within, but you're not one of them. Even if you're familiar with most of them, it's good to have them all in one book (some will serve as confirmation of something you've merely suspected to be good practice).
The bibliography is massive; including every work of note in the field. The references to such good works are sprinkled evenly throughout each chapter. This makes for a distillation of nearly 50 years of the best works in the field!
As the book says, the dedicated professional will continually build his/her craft, but I'd bet if you read only this book and consistently follow it's suggestions, you'll have a stellar career.
The focus is on actual code construction, but it touches on every aspect of software engineering including psychology/behavior.
Buy w/o hesitation.
There's also an amazing amount of practical advice about everything from code formatting, variable naming and writing control structures, all the way up to assembling and managing a programming team -- and managing your manager, too.
The second edition adds a lot of new examples in Java, and goes lighter on less common languages like Pascal and APL than did the first edition. There are also new sections about agile methods and object orientation, perfectly respectable material, although admittedly not much new or unique there.
Every programmer should be familiar with this book.
Where is that book? HERE IT IS! THIS BOOK IS BRILLIANT! BUY IT! BUY IT! BUY IT! It's bumped off my PERL book (the camel book) as my favorite computer book of all time!
Summary: Highly recommended to beginners in professional software development, moderately recommended to people with some experience, and not necessarily recommended to veterans.
I bought this book thinking that I did not have a whole lot to learn from it. I was certain I had read enough 'better coding' material in the past to know what good code was and how to produce it. I am sure you will not be surprised when I say that I ended up having a great deal to learn from this book.
Almost all of the coding advice, design strategies, and debugging techniques are backed up with real research data. At the very least, this means that even if you know the advice is sound already, you can more easily introduce the topic to other programmers, or even to management, and it has a greater chance of being taken in to consideration.
After reading this book, my code quality has definitely increased. I discovered that even the good practices I knew of before were not being put to effective use.
The book is very specific. It does not typically give you vague advice that sounds good if you don't think too hard about it. It gives you very specific, concrete advice, with examples and data to back it up.
The author seems to have put a great deal of effort into writing this book for every type of programmer (and even for people in software management positions). Every chapter introduction describes who should definitely read the chapter and who might benefit from simply skimming it over. He will also direct the reader to other chapters or specific sections of the current chapter based on the reader's knowledge and experience levels.
Finally, as others have said, I consider this a must read book for any programmer.
to write good easy to understand code. You will come away from this book with an appreciation of the thought process that should go into writing every class, routine, comment etc...
Software development steps are outlined clearly. Pitfalls to avoid are discussed and rewards obtained from good code explained. The author tells you what you need to know and most importantly why you need this information. If one applies the ideas in this book, I think you can be a better programmer.
Lastly, this is my favorite part of the book. The author lays out
an extensive reading list. I'm buying all of the books on the author's list and loving the educational experience.
This book will stay on my desk for years to come. The practices do not go out of style. Buy the book, read it, and apply the kowledge.
This book shows readers how to develop high-quality code and how to manage a highly effective development process. It would take years of experience to learn the lessons that McConnell makes plain.
Some chapters may be more difficult than others, depending on your experience level and development aptitude; but the book is well worth the effort. If you can retain the core concepts and comprehend the main idea of each chapter, you will position yourself for success in the computer field.
I also highly recommend this book for computer professionals who are languishing in their current position. This book could help refine your acumen and position you for a better, more fulfilling opportunity.
I read on to find that often, a concept was contradicted by a counter argument, both equally valid, and it was impossible not to learn from each topic, even when an initial thought was along the lines of 'I know about this'. It really is thought provoking and teaches/re-teaches what should be basic principles, the most important of which are to be open minded, willing to learn and to strive for quality.
On top of all that I enjoyed reading it.
I read a fair number of books during the course of a year and have to say this is one of the more useful and I will encourage its reading on my team.
Steve McConnell provides a balanced, thoughtful discussion of competing opinions along with a wealth of references to additional materials covering specific topics in more detail. At the same time, McConnell has a clear voice articulating his judgment on various controversial topics.
Overall, CC2 is an essential book to include in your library whether you're just starting out in your career or an old grey hair responsible for mentoring teams. In both cases, CC2 puts a mountain of software construction best practices at your fingertips.
translated as "Code Encyclopedia", which is not very accurate, but captures the spirit, this book should be kept around, and picked up every now and then just as an encyclopedia.
Other than common pracices, the most valueble part of the book is
chapter 2 "Metaphors for a Richer Understanding of Software Development"
and chapter 33 "Personal Character", for example, the auther provides the following insights:
"Coincidentally, great intelligence is only loosely connected to being a good programmer."
"The people who are best at programming are the people who realize how small their brains are. They are humble. The people who are the worst at programming are the people who refuse to accept the fact that their brains aren't equal to the task. Their egos keep them from being great programmers. The more you learn to compensate for your small brain, the better a programmer you'll be. The more humble you are, the faster you'll improve."
Chapter 35: "Where to Find More Information" also introduced me to all the great books such as Gerald Weinberg's The Psychology of Computer Programming and Jon Bentley's Programming Pearls, 2d ed. (Bentley 2000) .
The book is great, giving a lot of real world's statistical data to support and explain each point.
The book covers software construction in a great detail, explaining and discussing every possible point related to writing code.
The only criticism that was said about this book is that it didn't mention or discuss security related issues in code construction, but I think that this doesn't decrease the value of the book.
If you are a lead I would suggest Rapid Development by the same author. These books will pay for themselves many times over.
The 2nd edition has been fairly extensively updated to include commentary on the newer methodologies, but the core is the same.
If you write software of any sort for a living, buy this book.
"Code Complete" is a distillation of years of experience on Mr. McConnell's part, backed up with research and references from a wide variety of sources, including research papers, journal articles and books. His style is easy to read, he focuses on the practical aspects of the development process, presenting the pros/cons and applicability of each of his recommendations in a solution-focused manner. This isn't a book marketing some theory of what's best, but really concentrates on what works, what doesn't, and how to excel as a software development professional. His points and recommendations are clear and well-supported - and will often be eye-opening material for the reader, no matter how experienced they are in this industry.
"Code Complete" focuses on software development as a discipline, and encourages the reader to think of it as a major component of the overall software development process, including not only the initial specification / design / build / test and deploy cycle, but designing and building the code to enhance its long term "maintainability" and "enhancability". --- The initial deployment of an application is only the first step in its lifecycle: Mr. McConnell makes the strong case that designing and building an application without concern for its long term impact and viability is an expensive mistake.
It's been so long snce I read the first editon "Code Complete" that I cannot compare or contrast the two, but I can say that reading this edition has reinforced and expanded-on many of the practices I adopted years ago as a result of reading this volume and Rapid Development. It is clear the author has kept abreast of the latest research and best practices as the science of software development has evolved since the first edition was published.
When this book first came out, I strongly recommended that my team read it, and have recommended so many times for new developers and especially senior members of subsequent projects I've led. That recommendation stands - and, if anything, is even stronger: frankly, anyone who aspires to a leadership role in software development efforts and who has **not** read this book is needlessly handicapping their ability to succeed in this industry.
I have not heard of this book being used in a college course, which is perhaps understandable, given that it is designed for the benefit of professionals already out "in the field" - but it should be!
Must read for every developer!!!
This book is just one of the very few that really helps you programm in a more professional way.
The ideas and techniques presented are generally quite good, with the exception of some of the non-structured programming practices (multiple returns from a procedure/method). Since structured coding standards have been the standard--and for good reason--for many years, I was a little surprised to see some old techniques that were largely dropped from practice in the 70's after we found how damaging they became--especially in large sysems. Having said that, overall, this is a very good book.
The current crop of developer's I've worked with over the past 10 years or so should do themselves a favor and study this book as it seems that the practices in the book are no longer taught at universities. I've recently seen C# methods over 1000 lines long which is simply ignorant and has no place in code, not to mention in object oriented code. Reading this text and applying the recommendations will generally result in better code.
reading it cover-to-cover is tedious. However, what sticks in the mind *does* make a difference when coding. If you can't remember the actual advice it's enough of a prompt to dip back into the book.
If the point of the book is to enable a more experienced programmer to create more then it delivers hence the 5 stars I have given it.
However, it's format might put some people off and the first read through for, perhaps, beginners, might be hard going.
I enjoyed the book. The contents are well-explained in a simple manner with lots of real-life experience and numbers that support the coding practise recommended by the author. Regardless of what programming langauges you use, you should be able to follow the book fairly easily as the content of the book applies to general programming practise despite some chapters are dedicated to object-oriented.
You wanna know what makes a professional programmer? You'll find the answer in this book.
The book is very simply wrtten and doesn't attempt to preach - it just provides lots of practical examples of writing better code. You don't need to read it cover-to-cover, just find what you're interested in and it's there.
Given the demands of today's software development environment, namely high-quality code in ever-decreasing timeframes, I recommend this to anyone who is serious about their profession.
We use this book in our Software Design and Analysis class. Everyone seems to find it useful. And although it is a Microsoft Press book it gives examples in other languages. It is mostly Java and C/C++.
We all have "seen the trees", plenty of them. But sometimes you ask yourself: How big is the forest? This book gives a rough idea of the knowledge scope for a decent software engineer.
In addition, many ideas or suggestions you might have come up with throughout the years, this book will validate/destroy. If you are good, you will keep "agreeing" with the book, cursing the fact that you did not read the book before you came up with your own solution. If you are not so good, this book will teach you how to better yourself.
When I first bought the book I started in the chapters about variable names and comments and eventually went back and read the earlier chapters. If the first few chapters turn you off to the book try hopping around at first and come back to those chapters.
Every software engineer would benefit from this book! This book shows you how to write code correctly, as you write your application/system, to save time and improve quality/maintainability.
Most developers do not write good code. Most are hacks! If you don't think you have time to read a book like this or that it isn't worth it, you may very well be one of these hacks.
The content has changed considerably, as has some of his opinions of what is considered "best practice". Some of the "new" ones are things I have been doing for years and disagreed with him at the time. Unfortunately, many of the conventions he has adopted have been tainted by the "Java" world, in particular naming, formatting and commenting conventions. Some of these points are only religious in nature, but some, he devotes just two lines to Hungarian notation (the first edition was filled with the virtues of it), he dismisses as out of fashion and continues on his new course. The examples are filled with names which would have been easier to use a prefix than call them all "colourX", he has just adopted a new notation that consists of words rather than abreviations but conveys no further information about the variable. Mind you, he still uses variables called "i" - this is Hungarian in it's simplest form Steve!
Some of his formatting, particularly wrapping onto a second line, makes code become almost impossible to understand by cluttering the left side of an assignment with data from the right side. He then makes a point about making code clear to the eye...
The book is filled with quotes and results from studies done by many companies, I don't know the value of studies on code comprehensionability done in the 80's is that relevant to today, but he uses these to backup most of what he says.
The book contains very comprehensive bibliographies at the end of each chapter and so is a great starting point, browsing through the lists I found many books which I have already read myself. I have to question, with so many quotes and references from others, if this is truly an "original" work. How many of his thoughts are his "own" and how many are just a regurgitation of others.
Having said all this, it is still an excellent book that everyone who considers themselves a "programmer" should read. Well done Steve, I will be waiting for the third edition...maybe you will find "best practices" lie somewhere between the first and second editions.
I read this book every now and then when I am developing new code.
This one is the real deal. This book will make you a better programmer, immediately. If there is one book I would recommend to everyone who writes code, regardless of all other factors, this book would be it. A classic and truly a joy to read. Buy this book; you will not be disappointed.
Create your own review




