(Not logged on) | Register | Log On

You can subscribe to this discussion group using an RSS feed reader. The Joel on Software Discussion Group

A place to discuss Joel on Software

This community works best when people use their real names. Please register for a free account.

Other Groups:
Joel on Software
Business of Software
Design of Software (CLOSED)
.NET Questions (CLOSED)
TechInterview.org
CityDesk
FogBugz
Fog Creek Copilot


The Old Forum


Your hosts:
Albert D. Kallal
Li-Fan Chen
Stephen Jones

Code Complete

I do not consider myself a good programmer. I do not have any formal education, I learned programming by fiddling with Delphi and frequenting forums, and later reading books. I now mostly program in python, which I really love. I do not understand C, C++ or Java.

So, I keep reading about Code Complete being such a great book. I do not understand why good programmers constantly rave over this book. Isn't a lot of it REALLY common sense? I mean, even I would never ever consider writing code like:

if a:
  pass
else:
    do something

instead of:

if not a:
  do something

and of course I would never do something like:

for(i= 0; i < 100; i++){
do stuff;
i=100;
}

Isn't this totally obvious? To, well, everybody?

What am I missing? I would not gripe about it if this was a book geared at and recommended to newbies (after Programming 101), but this is a book for people aiming to be Rock Stars (or High Note players, or whatever), right?
Charlotte
Saturday, September 17, 2005
 
 
A couple of points:

(A) One of the first steps towards improving an organization's code readability and quality is getting everyone on the same level. Yes, most of Code Complete is evident to an experienced programmer. Less of it may be evident to an inexperienced programmer. Think of Code Complete as a coding standard for your organization, nicely packed up in a book. :)

(B) While about 75% of Code Complete is self-evident to an experienced, quality programmer (otherwise, they probably wouldn't *be* an experienced, quality programmer), there's another, smaller portion that may not be. Given the inconsistant training that exists in the industry, that smaller portion may be different for every programmer: one may not have heard of code reviews, the other may not have heard of pseudocode method design.
John Christensen Send private email
Saturday, September 17, 2005
 
 
Clearly the OP is much smarter than anyone who would read a book like Code Complete and take it seriously.  This kind of trivial book would be good for a 4 year old beginning to learn what a computer is...obviously none of this common sense information could be used by anyone of even the slightest intelligence.

I found myself to be of such high intelligence that I merely skimmed the chapters on code construction, then wrote it off as a book for idiots.

Saturday, September 17, 2005
 
 
Did you read the first or the second edition? The first edition was one of the few books I ever returned because most of its advice was ancient and very obvious. The second edition, OTOH, is greatly enhanced and has enough good tips even for experienced programmers.
Chris Nahr Send private email
Sunday, September 18, 2005
 
 
Most programmers in my experience are far too macho for this book.
These same superheroes usually produce code which looks like random text generation,...but it works!

In my opinion, yeah some of it is obvous, but it's always good to brush up from time to time & one should always strive to improve though all means available.
conantroutman
Sunday, September 18, 2005
 
 
"These same superheroes usually produce code which looks like random text generation,...but it works!"

Perhaps they're programming in Ruby...
Berislav Lopac Send private email
Sunday, September 18, 2005
 
 
I have the first edition, and agree that it was kind of obvious...

However if all the programmers in the world followed its advice, we'd be in much better shape.  But the kind of people who would buy a book like that in order to improve their coding style probably already have pretty good style.
Moosebumps Send private email
Sunday, September 18, 2005
 
 
> it was kind of obvious

I found it obvious in the sense that I agreed with it. Before I read _CC_ I had already experienced (i.e. written and read) code whose 'construction' I considered more or less good or bad; but until I saw _CC_ spell it all out for me I wouldn't always have been able to immediately see and say *why* particular code was good or bad ... for example I didn't have the vocabulary.

Later when I was doing code reviews of new hires I found that my having read _CC_ helped me to read code with a critical eye.

Also I just enjoyed reading it -- I thought it was funny, for example the icons like "Coding horror" in the margin, and the 'Socratic' dialog about whether code should be commented.

Oh, and "PDL" is still somewhere in my mind whenever I'm writing a multi-statement method or subroutine.
Christopher Wells Send private email
Sunday, September 18, 2005
 
 
I agree with Wells - obvious in the sense that I agreed upon reading it. There was stuff I already did too, but again, it was presented with a vocabulary and such. As a result, I followed the recommendations more regularly than when I was just going on intuition. One of the few CS books that I don't have any beef with.
Scott
Sunday, September 18, 2005
 
 
"Isn't a lot of it REALLY common sense?"

Common sense isn't all that common.  This is a truism you'll face through your entire life.
Mediocre Coder Send private email
Sunday, September 18, 2005
 
 
Thanks for your opinions. I can understand Mr Wells' explanation, it reminds me a lot of a language teacher I once had. I told him that a particular course was boring to me, because my grammar (in my own language) was OK already, and I never made the mistakes in the examples, and he said the exact same thing: that it is good to have a name for it. He was right. I now appreciate that course when I spot the errors in other people's language, and I sometimes notice I almost say a 'tante betje' (a name for a dutch grammar error), and it is nice to recognize the error.

Funny, I never saw the similarity until now.
Charlotte
Sunday, September 18, 2005
 
 
To see why more people should read Code Complete, go to http://www.thedailywtf.com

If most of the book seemed obvious to you, congratulations on being way smarter than the average programmer appears. Most of the things in that book tend to get picked up after many years of writing software and maintaining a lot of crappy code.
Bart Park
Sunday, September 18, 2005
 
 
+1 for Moosebumps.

Although the 1st edition is pretty obvious (I don't ahve the 2nd edition to compare), but that's the point. If everyone practiced some very simple guidelines then people's coding style would be much better.

I didn't get anything new out of the book, but it reinforced a lot of what I currently do with my code.
QADude
Sunday, September 18, 2005
 
 
Hi!

Everybody says it's obvious, however in the different companies I've worked for noone has ever read the book, much less done any of the 'obvious' things...

I've been in systems development for 26 years and both editions taught me (or at lest helped me better understanding)

Best regards,
//jorge Send private email
Sunday, September 18, 2005
 
 
Yeah, they are obvious. Here is another one, when you push 80 hours a week your code quality is going to suffer. There is no way around that.... I constantly run into companies that have 60 - 80 hour weeks as a standard, and all of them has quality issues with their code. Like someone else already stated "Common sense isn't all that common!", there are people out there who really need to read it. As for the rockstars they have a use for the book also. It is something to shove in the face of the person who doesn't understand the obvious things instead of having long discussion(and arguments) about the "why" of good pratices.
Unemployed -> back to University.
Monday, September 19, 2005
 
 
I feel that "Code Complete" is one of the most overrated books on programming in the last decade. Too much of irrelevant, not even "common knowledge" material, regardless of the reader's skill level.

Though I agree that being fact-rich, it might be a good tool to defend the good practices in the face of management.
Egor
Tuesday, September 20, 2005
 
 
I picked up the book as a reinforcement of my skills.  A lot of the material I already know from examining other's code or from classes I took in college.  However, like other previous posters commented, it's an excellent reference if you want to standardize your code or if you are looking to turn mediocre code into something that is more elegant and efficient.
Erin Justice Send private email
Tuesday, September 20, 2005
 
 
The second edition seemed to be about the same as the first. Are there major differences that I missed?

I loved the first edition!
David
Tuesday, September 27, 2005
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz