The unfortunately grey cover of Code Complete 2 tells you there will be no Electric Buggaloo here.
The second edition of Code Complete is out and its as good as the first edition. If I had to hand someone just one book on software engineering this would be it. BUY BUY BUY BUY!
This book covers code construction issues. Even better it contains lots of code examples and statistics. None of this high level ideas, heuristics and hand waving. He gets down into the nitty gritty and takes on things like variable naming, proper use of conditionals and loops, how to draw your subroutine lines. Anything that involves writing code is fair game. Refactoring. Testing. Pair programming. Error handling. Debugging.
What's different from the first edition? The examples are primarily in C++ (with some Java and Visual BASIC thrown in for, ummm, variety?) but have no fear, they never get complicated and rarely language specific. Any decent Perl programmer will be able to read the examples and the advice is language agnostic for the most part. He's adapted the text a bit for the new more flexible methodologies that involve a lot of change and a lot less explicit design.
However, the author does have a bias towards C++ and this sometimes leads to tips and pointers that are useless for those of us who have high falutin' features like MEMORY PROTECTION. For example, in the chapter on Offensive Programming he talks about filling your objects with garbage before deleting them to find code trying to use the object after its been destroyed. ITS TWO THOUSAND FOUR! We might not have personal robots or flying cars but at least we should be able to rely on the computer to handle memory management! But such things are few and short.
Anyhow, great book. When I was learning how to program in '96 it was the pink camel and Code Complete. And look how I turned out. And now in a petty aside. Please don't let it influence your opinion of the book. Perl gets a pretty short shrift. Here's his description: At least he didn't call it PERL. Compare to Python. s/Python/Perl/ and it still fits. I want Guido's PR department. No, I want Microsoft's. To his credit he doesn't advocate any programming language. And there's even a table of "Ratio of High-Level-Language Statements to Equivalent C Code" showing C++ and Java at 1:2.5 but Perl, Python and Smalltalk at 1:6! He even makes the link between natural language and computer language: Ooop. There's that blind spot again. Desite his laying out an argument for using high level languages with natural language features, section 4.1 is the first and last time you'll hear about them in this book. Everything from here on out is C++, Java and Visual Basic with the occassional Fortran or C annecdote. With the possible exception of Visual Basic, that set of languages is possibly the *least* expressive and *lowest* level of the modern set. C++ only seems liberating to a C programmer. Java only looks like an improvement to a C++ programmer. Anyhow, like I said, it doesn't detract from the usefulness of the book to Perl programmers.
uh uh, good good...