Thursday, May 11, 2006 

Book Review: Code Complete, Steve McConnell, V2.0

Due to the fact that our small company has grown 50% since I arrived, Flatirons Solution is attaching us new people (hired in the last year) with mentors. My mentor is my direct supervisor, head of our division, and the only other person working on Federal Content Management Contracts in the D.C. Area. Let's just say there wasn't a whole lot of mentoring options.

Since my mentor is a bonafide programmer, he recommended that I read "Code Complete," by Steve McConnell. The book is a great collection of recommended best practices.

As a software management-wannabe, I particularly liked the analogies for programming that Mr. McConnell emphasizes in the first 5 chapters. Specifically, managers often feel that programmers are simply labor to be exploited. "Why isn't Mary Programming? (WIMP)" is the principle that most managers and clients have. The idea that you need to plan and design seems foreign, we're paying you people to code! Of course, the author recommends that you design anyway, using the 'building a house' metaphor for what he calls "code construction."

While my recent metaphor for programming (using Agile development) has been that a program evolves and grows like a tree (the trunk being the basic code, and the branches being additional requirements), the author of Code Complete says it's like building a compelex house. While a single person scripting or coding can complete a doghouse without too much trouble, larger projects require site surveys, blueprints, and the like before the experts (electricians, plumbers, database admins) are put to use building their parts. I suppose this would work with my analogy if we specified that we were building an airport.

You know, the airport opens with much fanfare, meets the requirements at that time, and the first terminal is a beautifully designed glass-and-steel building. As the years pass, new requirements and throughput are needed, and a second and perhaps third terminal are built, based on the first, but with less fanfare and less architectural considerations, and attached to the old terminal by a tunnel or train or moving sidewalk-thing. So I submit to you that building software is like building an airport, terminal by terminal as requirements change and spirals are added.

The rest of the book, and it's a large book, addresses the various minute details of programming style. McConnell gives his opinion on when to use a class, when to use a method or function, what to name variables, where to handle errors, and all the other various questions programmers like to argue about. The theory is, that if you follow his recommendations, the author feels that your code will be correct, elegant, and understood by that poor guy who has to change it after you've left the company for greener pastures. Common programming errors, known as "CODING HORRORS" are also called out in the text, along with an amusing Freakazoid-looking programmer
icon.

If you have experience as a hard-core programmer, and would like to see Steve McConnell's (and Microsoft's) coding style guide, then read the entire book. If you would like additional anecdotes and metaphores about programming that supports a big design up front (BDUF) methodology, interspersed with admittance that adherance to agile and spiral models are more successful, read the first 6 or so chapters.

Thursday, May 04, 2006 

There have been recent news articles describing the amount of productivity lost while college-educated professionals watch their Alma Mater play basketball during march madness, and how much global productivity is lost every four years during the Soccer/Futbol/Calcio World Cup (Go Yanks!).

I would like to know how much productivity is lost by converting content into different formats. Every time our fine company responds to a proposal, we spend a few hours retooling our resume, proposal documentation, and whatever into the client's preferred format. Even people who all accept "Word" as a standard don't specify which version of Word (2000? XP? 2003? Works?) and they all have different styles (at least those who use styles.)

The next version of the internet, and the purpose of XML standards such as those described on the right list, are to remove style from content, to remove content from documents, and to save people time formatting that can be used to make sure the content is quality. Unfortunately, this is going to take a significant shift. We've been using books (and scrolls) for several thousand years.