Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have heard a lot of people mention Code Complete as a book worthwhile reading. Unfortunately, I am so busy that I don't have time to read it, so can anyone tell me what the key points of the book are?

share|improve this question
29  
The key point of page 824 of Code Complete 2 is that you should actually read programming books! –  azheglov Sep 23 '10 at 16:00
    
@azheglov: Is this 2 as in 2nd edition or 2 as in Code Complete 2 which should be read after Code Complete ? –  Chris Oct 22 '10 at 14:57
    
@Chris, almost 4 years later: it is 2 as in 2nd edition, revised and updated. And I hope you have read it in the meantime :-) –  Streppel May 7 at 20:15

2 Answers 2

up vote 45 down vote accepted

Code Complete is about software craftsmanship; it is an advanced-beginner/intermediate-level book, written for the working programmer, but it would still be very useful to someone who's been programming for at least a year.

Thus the key points of Code Complete (2nd ed.) are nicely summarized in its Chapter 34, Themes in Software Craftsmanship. As paraphrased from my notes:

  1. Conquer Complexity: reduce the cognitive load on your mind via discipline, conventions, and abstraction.
  2. Pick Your Process: be conscious of quality from start (requirements) to finish (deployment) and beyond (maintenance).
  3. Write Programs for People First, Computers Second: code readability is hugely important for comprehensibility, review-ability, error-rate, error-correction, modifiability, and the consequent development time and quality.
  4. Program into Your Language, Not in it: think of the What? and Why? before the How?
  5. Focus Your Attention with the Help of Conventions: conventions manage complexity by providing structure where it's needed, so that the ultimate resource - your attention - can be effectively used.
  6. Program in Terms of the Problem Domain: work at the highest level of abstraction possible; top-level code should describe the problem being solved. Distinguish OS level, programming language level, low-level implementation structures, low-level problem domain terms, and finally, high-level problem-domain terms that would make total sense to the (non-coder) user.
  7. Watch for Falling Rocks: as programming merges art and science, good judgement is vital, including heeding warning signs.
  8. Iterate, Repeatedly, Again and Again: iterate requirements, design, estimates, code, code tuning.
  9. Thou Shalt Render Software and Religion Asunder: be eclectic and willing to experiment. Don't be an inflexible zealot, it precludes curiosity and learning. Go beyond having just a hammer in your toolbox.

But the most important take-aways are in Chapter 33, Personal Character: once you consciously seek to improve as a coder, you can and will. The fastest way to do so is to take on the the attitudes of master coders (humility, curiosity, intellectual honesty, discipline, creativity), while also practicing their habits (many good habits are listed in the book, e.g. choosing good variable names).

Also, the book makes clear that the gap between average and excellent in software is immense; that fact alone should drive the conscientious coder to better himself.

That's the short of it; the long version is in the book. :) I can also send you my not-so-long, not-so-short notes if you want more details. But the book is certainly money and time well-spent, even if the writing style is tiresome at times.

Beyond Code Complete, I'd highly recommend The Pragmatic Programmer. It's for intermediate-level programmers, nicely-written and a great mix of high, medium, and low-level advice.

share|improve this answer
    
Are you sure this is an intermediate level book? It seems pretty basic, with advice like "remember to remove unused variable names" - great for someone in the first or second year of college maybe, but not (IMO) intermediate level. –  Colen Apr 15 '11 at 19:45
1  
@Colen: thanks for your comment, I should've specified it's for advanced-beginner/intermediate coders. –  limist Apr 19 '11 at 19:27
5  
@Colen: Although Code Complete deals with some simple topics mixed in with the complex ones, it's definitely not for beginners. Pretty much any developer at any level can benefit from reading it; you'd be surprised how little some "senior" developers actually know about the basics, especially if they've only ever programmed in one language or worked for one company their entire career. –  Stephen Orr Feb 28 '13 at 13:57

It's an intermediate book, a potpourri of software development best practices.

If you're a beginning programmer you won't understand a lot of the material, and if you are experienced, the book will only confirm what you already know. Consequently, the book might be of most value to intermediate programmers, who already have a bit of programming knowledge, but need a book of best practices to tie it all together.

Several pages are spent on how to format code blocks, and the relative merits of each approach. Personally, I think the great debate on where to put your curly braces is over. (or is it?)

share|improve this answer
3  
Your parenthetical earned you an upvote. :p –  Nathan Taylor Sep 11 '10 at 4:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.