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?
-
52The key point of page 824 of Code Complete 2 is that you should actually read programming books! – azheglov Sep 23 '10 at 16:00
-
1@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
-
1@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 07 '14 at 20:15
2 Answers
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:
- Conquer Complexity: reduce the cognitive load on your mind via discipline, conventions, and abstraction.
- Pick Your Process: be conscious of quality from start (requirements) to finish (deployment) and beyond (maintenance).
- 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.
- Program into Your Language, Not in it: think of the What? and Why? before the How?
- 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.
- 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.
- Watch for Falling Rocks: as programming merges art and science, good judgement is vital, including heeding warning signs.
- Iterate, Repeatedly, Again and Again: iterate requirements, design, estimates, code, code tuning.
- 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/value 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.

- 4,636
- 25
- 22
-
1Are 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
-
2@Colen: thanks for your comment, I should've specified it's for advanced-beginner/intermediate coders. – limist Apr 19 '11 at 19:27
-
11@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. – Steve Hill Feb 28 '13 at 13:57
-
1
-
This is a good summary of the themes in the book. Can you please share your not-so-long, not-so-short notes? – software_writer Apr 04 '18 at 21:56
-
@BenKoshy -- Code Complete is a foundational work backed up by a good amount of expensive research done by big (and impressive) companies. I have the 1st Edition, the Second Edition, and the Kindle Second Edition. And I usually make a point to try to read it every year -- that's how important I think it is. And I do not consider it verbose at all. – MicroservicesOnDDD May 30 '22 at 04:07
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?)

- 198,589
- 55
- 464
- 673