Practical C++ 307
Practical C++ | |
author | Rob McGregor |
pages | 900 |
publisher | QUE |
rating | 7/10 |
reviewer | Jess Sightler |
ISBN | 0789721449 |
summary | Provides a practical guidebook to learning C++ |
Section I -- Programming 101
At first glance, the book appears to be written for people with experience programming, however reading through this section clearly dispels that myth. Here we have a section which goes over everything from for loops to if conditionals while simultaneously using verbose, duplicitous language at every step. Perhaps this was intended as a means of reinforcement, however, it seems most of the effort here would be wasted.The technical depth is what you would expect for a novice, but without enough hand-holding and examples to make a novice feel comfortable. Making matters worse, there are numerous typos in this section, including quite a few in the examples (making them uncompilable without corrections). Some of these appear to be type-setting errors, however, there are enough to potentially confuse novice developers.
I believe that the combination of weak examples, and significant typographical errors are strong enough to give a novice much difficulty in learning the C++ language.
Having said that, the section should be provide no difficulty for any programmer with a good knowledge of any vaguely similar language (eg, Perl, Java, PHP, etc).
Section II -- Beyond the Basics
Ah, now we're getting down to Brass Tacks... this section goes over everything from Function overloading to Structure and Unions. The section on function members within structures also does an excellent job of preparing the reader for the upcoming introduction of Object Oriented concepts.
The sections on Memory management, both from an allocation standpoint, and from a bit manipulation standpoint are first-rate. Details are perhaps not as strong as they could have been, however the material is very accessible, and clearly described.
Probably my only complaint with this chapter is the overly general section on compiling and debugging programs. However, as this book does attempt to be somewhat compiler/debugger agnostic, this is forgivable. From here, we dive into the real power of C++, Object Orientation.
Section III
From the beginning, this book treats Objects as an extension of the structure syntax taught previously (with the default of Public switched to Private). This, along with the classic Plans vs. Product description of the difference between a Class and an Object are quite clear and robust.
Again, this is a solid chapter, describing the details of getting a system of classes up and running, as well as some sample data structure implementations.
And then finally, the last section is a slightly less than 200 page description of the STL. This section is probably the book's weakest part, as it is just strong enough to give you a taste of what is available, but often not strong enough to grasp the details. It's a good start, but much more attention should have been made to this subject (potentially even at the cost of some of the wasted words on how a 'for' loop works). It makes a decent introduction for someone with very limited STL background, however, there is not enough depth to reach a strong level of understanding here.
Summary
Overall, this is a solid book for an existing programmer to pick up C++ concepts. A programmer with a strong knowledge of an existing procedural language (such as C) would have no trouble digesting the concepts of this book. Having said that, the poor typographical issues, and verbose wording often muddle an otherwise good book.
You can purchase Practical C++ from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
out of stock? (Score:5, Informative)
In case of slashdotting (Score:-1, Informative)
Section I -- Programming 101
At first glance, the book appears to be written for people with experience programming, however reading through this section clearly dispels that myth. Here we have a section which goes over everything from for loops to if conditionals while simultaneously using verbose, duplicitous language at every step. Perhaps this was intended as a means of reinforcement, however, it seems most of the effort here would be wasted.
The technical depth is what you would expect for a novice, but without enough hand-holding and examples to make a novice feel comfortable. Making matters worse, there are numerous typos in this section, including quite a few in the examples (making them uncompilable without corrections). Some of these appear to be type-setting errors, however, there are enough to potentially confuse novice developers.
I believe that the combination of weak examples, and significant typographical errors are strong enough to give a novice much difficulty in learning the C++ language.
Having said that, the section should be provide no difficulty for any programmer with a good knowledge of any vaguely similar language (eg, Perl, Java, PHP, etc).
Section II -- Beyond the Basics
Ah, now we're getting down to Brass Tacks... this section goes over everything from Function overloading to Structure and Unions. The section on function members within structures also does an excellent job of preparing the reader for the upcoming introduction of Object Oriented concepts.
The sections on Memory management, both from an allocation standpoint, and from a bit manipulation standpoint are first-rate. Details are perhaps not as strong as they could have been, however the material is very accessible, and clearly described.
Probably my only complaint with this chapter is the overly general section on compiling and debugging programs. However, as this book does attempt to be somewhat compiler/debugger agnostic, this is forgivable. From here, we dive into the real power of C++, Object Orientation.
Section III
From the beginning, this book treats Objects as an extension of the structure syntax taught previously (with the default of Public switched to Private). This, along with the classic Plans vs. Product description of the difference between a Class and an Object are quite clear and robust.
Again, this is a solid chapter, describing the details of getting a system of classes up and running, as well as some sample data structure implementations.
And then finally, the last section is a slightly less than 200 page description of the STL. This section is probably the book's weakest part, as it is just strong enough to give you a taste of what is available, but often not strong enough to grasp the details. It's a good start, but much more attention should have been made to this subject (potentially even at the cost of some of the wasted words on how a 'for' loop works). It makes a decent introduction for someone with very limited STL background, however, there is not enough depth to reach a strong level of understanding here.
Summary
Overall, this is a solid book for an existing programmer to pick up C++ concepts. A programmer with a strong knowledge of an existing procedural language (such as C) would have no trouble digesting the concepts of this book. Having said that, the poor typographical issues, and verbose wording often muddle an otherwise good book.
Guilt (Score:3, Informative)
I concur (Score:5, Informative)
In terms of going over bit manipulation, memory addresses, pointers, etc. it really goes into detail that I wouldn't expect for an entry-level reference. Then again it's so thorough it really isn't just an entry-level reference!
Best learner's C++? (Score:5, Informative)
Best learner's C++ book has to be "Thinking in C++" by Bruce Eckel. I always touted his "Thinking in Java" as the premier book for the learning java developer, but his success started with TiC++. Best of all? Its available free electronically [bruceeckel.com] on his website (but I always went out and spent the $30 for the paperback version to support him).
If you pick up the book, you'll understand the language just a little more. He writes the book just how you'd like to learn, not like some math book that blandly gives out information in a manner that puts you to sleep. You can thank me later after reading it
On the subject of language (Score:5, Informative)
From the review:
Here we have a section which goes over everything from for loops to if conditionals while simultaneously using verbose, duplicitous language at every step.
Umm, you do know that duplicitous means "Given to or marked by deliberate deceptiveness in behavior or speech", right? Or did you mean redundant?
(The quoted definition was provided by http://www.dictionary.com.)
The one I used (Score:4, Informative)
The C++ Programming Language (Score:3, Informative)
The C++ Programming Language (Special 3rd Edition) [amazon.com]
by Bjarne Stroustrup
A reference is too hard too read, but this looks like it might be the right level - hopefully pretty steep, but with some language design chit-chat thrown in. What do others think of this book? (And what languages have you learned, a VB for dummies alum isn't going to give the same advice as Guy Steele)
My favourite book is... (Score:5, Informative)
Out of stock in the stores - available online (Score:3, Informative)
My favourite C++ introduction book (Score:3, Informative)
I just had to read up on C++. I'm no expert programmer, but having experience from C and Java (in addition to having learnt the basics of Object-Oriented methodology) I wanted a book that didn't try too hard to explain everything from the bottom.
I found C++: The core language from O'Reilly incredibly useful in this respect. In its 200 pages, it might not cover every aspect of C++, but it will give you enough to go on so that you can start using the language. Being short and focused, it will give you a good understanding of the basics a lot faster than any larger book could, IMHO.
Copy of a stupid article (Score:3, Informative)
Re:The C++ Programming Language (Score:3, Informative)
Re:My favourite book is... (Score:3, Informative)
If you're interested in Accelerated C++, make sure you get a newer revision -- lots of errata in earlier copies:
See http://www.acceleratedcpp.com/details/errata.html [acceleratedcpp.com] for a listing.
I just ordered this from Amazon.ca... hopefully their copy is newer!
You can't be serious. (Score:5, Informative)
See Accu's booklist [accu.org], EfNet #c++'s book list [rafb.net], or Yechiel Kimchi [technion.ac.il]'s list of bad books for opposing opinions.
Everything you ever wanted to know about C++... (Score:2, Informative)
"The C++ Programming Language" by Stroustrup
"Effective C++: 50 Specific Ways to Improve Your Programs and Design" by Meyers
"More Effective C++: 35 New Ways to Improve Your Programs and Designs" by Meyers
"C++ Templates: The Complete Guide" by David Vandevoorde
Re:My favourite book is... (Score:3, Informative)
What I've taken away from that book is the incredible power and elegance of policy-based design. Every working C++ programmer should understand it, I think.
Re:learner's library (Score:2, Informative)
D'oh!
All the books I've read have told me that C++ is a high level language! I must be reading the wrong books!
About those authors... (Score:3, Informative)
Most definitely... since they were part of the group that helped develop the language from the beginning. They work down the hall from Stroustrup, and they are brilliant, brilliant people.
Koenig has done all kinds of work in almost every aspect of the language and the library (if you've ever wondered why your compiler isn't finding names correctly, that's because it isn't doing Koenig lookup properly), and Moo wrote one of the first "native code" C++ compilers ever, meaning that it doesn't translate to C before going to machine code.
Re:C AND C++ ARE THE WORST LANGUAGES EVER DEVELOPE (Score:2, Informative)
Re:C AND C++ ARE THE WORST LANGUAGES EVER DEVELOPE (Score:1, Informative)
A better simple rule, IMO, is to avoid new and delete (and their array versions) entirely. If you use containers from the standard library and/or good smart pointers, memory allocation problems should disappear completely. If you're using new and delete, there's more to doing it correctly than just making sure every new has a delete -- exceptions are an important consideration.
Re:"Practical C++" (Score:3, Informative)
good c++ programmers avoid new (Score:2, Informative)
The standard has autoptr. Boost (www.boost.org) has loads more useful variants. 99% of the time, heap memory (i.e. allocated via new) instead of stack memory (automatic variables) is only used so that you can allocate variable amounts of memory. By using smart pointers, you can have the flexibility of new as well as the safety of automatic variables (they deallocate out of scope).
When used as class member variables, smart pointers provide clear ownership of resources, helping programme design.
new and delete are also classically used to manage buffers. This should be done entirely with strings, vectors and deques nowadays.
For modern c++ programmes, run of the mill memory errors are really inexcusable, just as they are in Perl (my other favourite language). I am a full time programmer and have not had a memory/buffer error in years (yes, I have written countless kLOC and, yes, my programs have all sorts of other bugs ;-] )