Code Complete, Second Edition
-
tgrt wrote:
No, you're spamming and you know it.
No, I'm not, and no, I don't know it. This morning my inbox had an unsolicited message with the subject "U.S., Iraqi forces battle insurgents" whose content was an encouragement to buy a particular penny stock: that's spam. It was unsolicited, the title was misleading, and I'm not interested in penny stocks. My posts, on the other hand, are solicited, not misleading, and (should be) of interest to the original poster. In this thread, for example, Captain See Sharp publicly asked for advice regarding programming practices, and used data naming techniques as an example. My post was therefore solicited since he didn't exclude me from the "public" he addressed; was not misleading since my reply was on topic; and should have been of interest to him because it presented an alternative, interesting, and logically-supported view of the very topic he raised. That's not spam in any sense of the word; it's discussion.
-
I'm thinking about buying the book Code Complete, Second Edition. How many of you have actually read it and how good was it. I know there are things like naming your booleans descriptively like isThisBookGood or buyThisBook instead of itbg_TF. Is there more to this book than that? I want to really learn something that will help me be a better architect of my software and a better coder also. What do you think? Is The Pragmatic Programmer: From Journeyman to Master good also?
█▒▒▒▒▒██▒█▒██ █▒█████▒▒▒▒▒█ █▒██████▒█▒██ █▒█████▒▒▒▒▒█ █▒▒▒▒▒██▒█▒██
I've got mixed feelings on the book. I do think there's a lot of opinion treated as fact (though there's also a lot of opinions supported by hard data). Ultimately I think it depends on what you want to read. If you're looking for a book on high-level design, I'd recommend something else. If you're after best practices of actually typing out the code, then this book is definitely one to read. Either way, it's worth skimming through as anyone can take something useful from it. Plus, you'll probably get points when you mention reading it. ;)
-
Stephen Hewitt wrote:
Assuming you're not being sarcastic (which I admit I’m having trouble discerning, I'm leaning towards sarcastic however), this seems a little inconsistent with your philosophy: to be advocating English language programming but rejecting descriptively named variables is a contradiction to say the least.
Well, it seems to me that someone who prefers "isBookGood" to "itbg_TF" should also prefer "If the book is good" to "if (itbg_TF)" or even "if (isBookGood)". Clearly, "isBookGood" is closer to the thought in the programmer's mind than "itbg_TF" which is less readable and drags in all sorts of implementation issues. But isn't "If the book is good" closer to what the programmer is thinking than "if (itbg_TF)" or "if (isBookGood)"?
The Grand Negus wrote:
Well, it seems to me that someone who prefers "isBookGood" to "itbg_TF" should also prefer "If the book is good" to "if (itbg_TF)" or even "if (isBookGood)". Clearly, "isBookGood" is closer to the thought in the programmer's mind than "itbg_TF" which is less readable and drags in all sorts of implementation issues. But isn't "If the book is good" closer to what the programmer is thinking than "if (itbg_TF)" or "if (isBookGood)"?
Nonsense. "isBookGood" is, to my eye, the best compromise between descriptiveness and unwieldiness given that the programming language's syntax and semantic rules are assumed to be constant. Someone says X = 1, another suggests X = 1.5 and you respond with "well if you're going THAT way, why not have X = 9999? That's clearly what you want".
-
The Grand Negus wrote:
Well, it seems to me that someone who prefers "isBookGood" to "itbg_TF" should also prefer "If the book is good" to "if (itbg_TF)" or even "if (isBookGood)". Clearly, "isBookGood" is closer to the thought in the programmer's mind than "itbg_TF" which is less readable and drags in all sorts of implementation issues. But isn't "If the book is good" closer to what the programmer is thinking than "if (itbg_TF)" or "if (isBookGood)"?
Nonsense. "isBookGood" is, to my eye, the best compromise between descriptiveness and unwieldiness given that the programming language's syntax and semantic rules are assumed to be constant. Someone says X = 1, another suggests X = 1.5 and you respond with "well if you're going THAT way, why not have X = 9999? That's clearly what you want".
-
destynova wrote:
givenThatTheProgrammingLanguagesSyntaxAndSemanticRulesAreAssumedToBeConstant...
...not to mention unnaturally and unnecessarily restrictive.
The Grand Negus wrote:
...not to mention unnecessarily and unnaturally restrictive.
I don't think so. I find the precise simplicity and lack of ambiguity very useful in specifying problems and solutions. 'Natural' languages, on the other hand, are so full of ambiguities and context/assumption-sensitive that programming might be very difficult indeed. With the programming languages we use nowadays, the rules are simple and enumerable - not only is it easy to write parsers and analysers to form compilers for those languages, it's also easy to understand the flow of what should happen and deterministically understand what you're doing.
-
The Grand Negus wrote:
...not to mention unnecessarily and unnaturally restrictive.
I don't think so. I find the precise simplicity and lack of ambiguity very useful in specifying problems and solutions. 'Natural' languages, on the other hand, are so full of ambiguities and context/assumption-sensitive that programming might be very difficult indeed. With the programming languages we use nowadays, the rules are simple and enumerable - not only is it easy to write parsers and analysers to form compilers for those languages, it's also easy to understand the flow of what should happen and deterministically understand what you're doing.
destynova wrote:
'Natural' languages, on the other hand, are so full of ambiguities and context/assumption-sensitive that programming might be very difficult indeed.
Might be, but isn't. We know because we've actually done it both ways.
destynova wrote:
With the programming languages we use nowadays, the rules are simple and enumerable - not only is it easy to write parsers and analysers to form compilers for those languages, it's also easy to understand the flow of what should happen and deterministically understand what you're doing.
Same as above. Having written a wide variety of programs both ways, we can categorically state from experience that for a large number problem areas - including compiler writing - natural language syntax makes the programmer's job easier and his resulting code clearer.
-
Because in this case it was actually on topic, and he didn't mention it. You did. So you were the problem in this case and not him. You have to reward good behavior if you're gonna complain about the bad behavior. Not provoke continued bad behavior.
What's in a sig? This statement is false. Build a bridge and get over it. ~ Chris Maunder
Oh come on! The implication was clear.
Steve
-
Joe Woodbury wrote:
I found it very pompous and dogmatic
Don't hold back, tell us how you really fell. :)
Joe Woodbury wrote:
As I've said in past critiques of the book,
Link? I would be interested in your take on it, I believe yours is about the only voice of dissension when it comes to Code Complete.
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
I didn't really get much (new info) out of the book... Great stuff in there for a newbie developer, but if you've been a dev for 3 years, you've run into all the tips before. I read allllll the way through the thing, hoping to come up with somethin new. But, well, I should have skimmed it. Some of the humor was enjoyable, but, man... LONG read... ...Steve
-
I'm thinking about buying the book Code Complete, Second Edition. How many of you have actually read it and how good was it. I know there are things like naming your booleans descriptively like isThisBookGood or buyThisBook instead of itbg_TF. Is there more to this book than that? I want to really learn something that will help me be a better architect of my software and a better coder also. What do you think? Is The Pragmatic Programmer: From Journeyman to Master good also?
█▒▒▒▒▒██▒█▒██ █▒█████▒▒▒▒▒█ █▒██████▒█▒██ █▒█████▒▒▒▒▒█ █▒▒▒▒▒██▒█▒██
I do not know if the book is an overall "I really want it...", book but at Amazon right now it is going at the following: Price: $27.49 & this item ships for FREE with Super Saver Shipping. at: http://www.amazon.com/Code-Complete-Second-Steve-McConnell/dp/0735619670[^] I hope thta this information is in some way helpful.
DB_Cooper1950 "Life is like a box of..."
-
S Douglas wrote:
Link? I would be interested in your take on it, I believe yours is about the only voice of dissension when it comes to Code Complete.
Don't have one readily available. The posting probably doesn't even exist any more. I think a later post was more clear than mine; the author often takes things that are purely opinion and makes them biblical truth. Unfortunately, this means the stuff that really is biblical truth or close to it loses it's prominence. Just be ready to question many of his assertions.
Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke
Joe Woodbury wrote:
Don't have one readily available.
Rather pompous of you not to be able to back up what you say with an example isn't it? At least the author of the book backs up everything he says. If anything, the problem with that book is you weren't ready to read it as your cup was already full of your own ideas reifying your own subjective opinion designed to see your code as better no matter the evidence. Go look in a mirror next time you say pompous. =) If your code is so good, send to the authors so they can put it in the next edition.
-
I'm thinking about buying the book Code Complete, Second Edition. How many of you have actually read it and how good was it. I know there are things like naming your booleans descriptively like isThisBookGood or buyThisBook instead of itbg_TF. Is there more to this book than that? I want to really learn something that will help me be a better architect of my software and a better coder also. What do you think? Is The Pragmatic Programmer: From Journeyman to Master good also?
█▒▒▒▒▒██▒█▒██ █▒█████▒▒▒▒▒█ █▒██████▒█▒██ █▒█████▒▒▒▒▒█ █▒▒▒▒▒██▒█▒██
It is an excellent book, especially if you are a beginner, or want to polish your code even more. Even though I found that I already do 90% of what is considered standard best practice, it was a great feeling to know that and learn the other 10%. It also makes your code more readable to others, which is very important today as the author points out.
-
I read the first edition, and it's indeed good. I've heard the second is even better. Rama is something of an evangelist for CC 2nd ed on CP. :)
Cheers, Vikram.
"Life isn't fair, and the world is full of unscrupulous characters. There are things worth fighting for, killing for and dying for, but it's a really small list. Chalk it up to experience, let it go, and move on to the next positive experience in your life." - Christopher Duncan.
-
It's an excellent book, although a long one. If you’ve worked in the industry for a while it amazing how many times you find yourself reading a section from it and thinking “I’ve seen that before” or “I can see the sense in that”, or something along those lines.
Steve
-
I detest it. I found it very pompous and dogmatic with the few good concepts hidden amongst some really bad ideas and generalizations. As I've said in past critiques of the book, I still say read it through with a skeptical eye then toss it in the trash.
Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke
-
Haven't a chance to peek into CC, but PP is marvellous.
-
I have the 2nd edition; it's well worth the cost. Table of Contents[^]
BW
If you're not part of the solution, you're part of the precipitate.
-- Steven Wright -
Unless you have the 1st. I read both versions cover to cover, and I found 2nd edition to be a waste since I read the 1st. I even matched up a few chapters to see if anything was changed.
McConell discusses some differences between the 2 editions here[^]. Based off that, I'd agree with you that it doesn't sound like many big changes were made. I guess calling it the 2nd edition, rather than adding a sub-title, like ':Coding in the 21st century', sort of implies that. :rolleyes:
BW
If you're not part of the solution, you're part of the precipitate.
-- Steven Wright -
I'm thinking about buying the book Code Complete, Second Edition. How many of you have actually read it and how good was it. I know there are things like naming your booleans descriptively like isThisBookGood or buyThisBook instead of itbg_TF. Is there more to this book than that? I want to really learn something that will help me be a better architect of my software and a better coder also. What do you think? Is The Pragmatic Programmer: From Journeyman to Master good also?
█▒▒▒▒▒██▒█▒██ █▒█████▒▒▒▒▒█ █▒██████▒█▒██ █▒█████▒▒▒▒▒█ █▒▒▒▒▒██▒█▒██
I guess a lot of people have commented already. I bought it based on all the positive commentary around on the book, then I looked through it and realised that I had just wasted my money. I would recommend it to anyone gettting into programming as a profession, but for anyone with a more than a couple of years experience (and having worked on more than two projects) I'd say skip it and invest your reading time elsewhere. Perhaps stop by the library and flick through their copy first.
-
I'm thinking about buying the book Code Complete, Second Edition. How many of you have actually read it and how good was it. I know there are things like naming your booleans descriptively like isThisBookGood or buyThisBook instead of itbg_TF. Is there more to this book than that? I want to really learn something that will help me be a better architect of my software and a better coder also. What do you think? Is The Pragmatic Programmer: From Journeyman to Master good also?
█▒▒▒▒▒██▒█▒██ █▒█████▒▒▒▒▒█ █▒██████▒█▒██ █▒█████▒▒▒▒▒█ █▒▒▒▒▒██▒█▒██
I own the first edition and still dip into it from time to time. However, few developers seem to be aware of it or a comparable book.
Captain See Sharp wrote:
I want to really learn something that will help me be a better architect of my software and a better coder also.
It's more about basic coding than architecture. Perhaps one of the design patterns books would be better for that.
Kevin
-
Joe Woodbury wrote:
Don't have one readily available.
Rather pompous of you not to be able to back up what you say with an example isn't it? At least the author of the book backs up everything he says. If anything, the problem with that book is you weren't ready to read it as your cup was already full of your own ideas reifying your own subjective opinion designed to see your code as better no matter the evidence. Go look in a mirror next time you say pompous. =) If your code is so good, send to the authors so they can put it in the next edition.
Stick^ wrote:
Rather pompous of you not to be able to back up what you say with an example isn't it? At least the author of the book backs up everything he says.
Not really; I read the book some years ago and I'm not going to remember specific criticisms, which were many. I seriously doubt that if you see a bad movie you remember the specifics, but rather a general impression.
Stick^ wrote:
If anything, the problem with that book is you weren't ready to read it as your cup was already full of your own ideas reifying your own subjective opinion designed to see your code as better no matter the evidence.
Quite to the contrary. When I first read the first edition many years ago I was impressed. Thus, I was quite astonished when rereading the book relatively recently. It simply did not coincide with my extensive experiences in the software industry.
Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke