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.
"Practical C++" (Score:2, Funny)
Its the only language that ive had trouble getting
cout "Hello World!";
(or equivalent)
to compile.
Re:"Practical C++" (Score:3, Insightful)
cout "Hello World!";
Thanks for the laugh.
Re:"Practical C++" (Score:3, Informative)
Re:"Practical C++" (Score:3)
#include
using namespace std;
int main()
{
printf("Hello world!\n");
}
(yes, the standard does allow you to leave out the return value from main. it will automagically put in a return 0;)
Re:"Practical C++" (Score:2)
Why bother with a language that imposes all that other bullshit???
Re:"Practical C++" (Score:3, Insightful)
Re:"Practical C++" (Score:5, Funny)
My mother is in fact a software developer and has no problems getting a "Hello World" to compile.
Re:"Practical C++" (Score:2, Funny)
public static void main ( String args [] ) {
System.out.println("omg i hate teh java!!1");
}
}
Re:"Practical C++" (Score:2)
Re:"Practical C++" (Score:2)
Re:"Practical C++" (Score:2)
cout << "Hello World!";
I've heard that the Preview button does wonders. Perhaps I should use it every now and then :-|
Re:"Practical C++" (Score:2)
Maybe that's why you're having trouble.
Re:"Practical C++" (Score:2)
I believe your problem is the following: cout << "Hello World!";
out of stock? (Score:5, Informative)
Book spoiler (Score:5, Funny)
Re:Book spoiler (Score:5, Funny)
No, no, this is C++, remember? It ends with };.
900 pages! (Score:2, Funny)
Guilt (Score:3, Informative)
Re:Guilt (Score:2)
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!
Re:One question (Score:2)
old!=obsolete (Score:5, Insightful)
However, if the book you're reading concentrates on the principlas, instead of the individual bits and pieces, age shouldn't matter.
They still use the ritchie book after all, right?
Re:old!=obsolete (Score:3, Insightful)
For example, using exceptions as error handling, and moving it away from the normal operation of the code, instead of having tons of if..else cases everywhere right next to meaningfull algorithms. exceptions seem to be a relatively recent addition to C++ compilers as far as standard compliant compilers go.
Re:old!=obsolete (Score:2)
Hell, yeah! The K&R is by far the best C programming book available. If you want to learn and understand C, there's little else that you'll need (the "Mastering Algorithms in C" book plus a good amount of expirience writing your own programs certainly does help.)
Cease and Desist (Score:2, Funny)
The code examples in this book are part of the intellectual property owned by SCO. You must pay $650.00 per code example to receive a license that allows you to use our IP. Send check or money order, no cash please.
Thank You,
Darl (Big D)
Re:Cease and Desist (Score:5, Funny)
A hit-man cost about $30,000. hmmm....
Sorry Darl McBride, it's not personaly, it's just economics.
Re:Cease and Desist (Score:5, Funny)
A hit-man cost about $30,000. hmmm....
Sorry Darl McBride, it's not personaly, it's just economics.
I clearly need to move to a nicer area. The going rate for a hit round here is less than a tenth of that. And the body would probably dissolve in the river...
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
Re:Best learner's C++? (Score:2)
I bought "Thinking in Java" because I expected it to be the same type of thoughful, insightful reading. Boy was I wrong. That book was a total waste. It really seemed that he was concerned with teaching basic programming rather than pointing out the crucial minutae of the language. (Hel
Re:Best learner's C++? (Score:2)
Re:Best learner's C++? (Score:3, Interesting)
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.)
Re:On the subject of language (Score:2, Interesting)
A common trait of quicky introductions.
KFG
The one I used (Score:4, Informative)
Re:The one I used (Score:2)
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)
Re:The C++ Programming Language (Score:2)
The pet peeve that bugs me the most (and this Practical C++ book is included) are typos in the source code. Beginning programmers must
Re:The C++ Programming Language (Score:3, Insightful)
Doug
Re:The C++ Programming Language (Score:2, Interesting)
If you want the design rationale and evolution then I can recommend "The Design and Evolution of C++", also written by Bjarne. It's very helpfull not only to know how the language works but also why it was put together that way.
Re:The C++ Programming Language (Score:3, Informative)
Go Stroustrup (Score:2)
Any author whose surname practically *is* a C string library function name gets my vote
Stroustrup Book (Score:2, Insightful)
Re:Stroustrup Book (Score:2)
Re:Stroustrup Book (Score:2)
Of course, I'm wading through Norvig's PAIP now (got a nice deal on both together at Amazon). Now that's a book which isn't exactly an easy read...
Re:Stroustrup Book (Score:2)
And to address the grandparent post:
If you can afford the special edition I recommend it, though I think the additions are available on his website if you get the 3rd edition instead.
The papers and interviews on his website also have vast amounts of good C++ info. He is the def
Re:The C++ Programming Language (Score:2)
Re:The C++ Programming Language (Score:2)
Re:The C++ Programming Language (Score:2)
Re:The C++ Programming Language (Score:2)
philosophical puzzlement (Score:5, Funny)
I'm not sure what books would be good for non-existing programmers.
Re:philosophical puzzlement (Score:5, Funny)
Abstract C++ Programming
C++ had its day (Score:4, Insightful)
For many, this C derivative is still a daily living. Thats fine. It's powerful enough.
These days, most people approach C++ as a way to "write fast code" or they desired to get to a lower level of the machine. Or, they know C and want to learn all about OO programming. NO harm there either, although I question all these motives.
For the most part though, end-user applications have no need to run in C++. I know the typical exceptions are in gaming, image processing and system internals, but this is a small subset of commercial programming.
I think elementary programming skills can be taught in C++ (i've done it), but you have to peel away so much of the language, one might as well start from C anyway, and then explain OO, and then combine the two. However, the ancestry of the syntax hangs newbies too often.
These days, I think the same goals in being "practical" could be achieved with Java for the same (if not less) effort. Plus, one learns the concepts of Events, Interfaces and a more useful standard library.
I've cranked out over 100K of C++ (haha, not hard to do with low-density langs) but in the end, I wish it would have been a longer-lived system. Many of our framework pieces are now part of the standard Java libraries, and we would have saved quite a bit of time.
But I think it's time for new programmers to move on.
Re:C++ had its day...and it is today (Score:5, Insightful)
Although you can compare pure Java with C++ as languages, it is meaningless to compare a Java framework/JDK such as J2EE with C++, as the former is an entire environment, not just the underlying language. There's lots of stuff that C++ does better than Java (generics/templates, destructors, high-performance containers, abstract algorithms). Not to mention that C++ is a completely standardized and *free* language, whereas Java is a fast moving pseudo non-free standard.
Oh, and the syntax problems you complain about are not really all that different from Java, or even C#. Yes, they are each somewhat different and some have cleaner syntaxes for specific issues, but in the grand scheme of computer languages they are almost the same. And there are syntax problems with Java too which C++ doesn't suffer...they are both strongly based upon a C foundation, like C#, Javascript, etc.
And yes, I've written very large C++ projects with many developers very successfully, and C++ has proven to be a very nice language indeed as long as you take the initial time to learn it correctly rather than out of a C++ for Dummy's tutorial.
Now if you want to talk high-level languages (both Java and C++ are low-level of approximately the same power), then you should be talking about something like Python, or more academically Haskell. But Java is by no means a high level language, just as C++ is not.
Re:C++ had its day...and it is today (Score:2)
Perhaps more significantly, I find that those who write off C++ because only a "small subset of commercial programming" can benefit from it don't know much about the world of commercial programming.
Re:C++ had its day (Score:2)
In certain discplines (handheld/cellphone development) it's an absolute neccesity. The other tools simply don't exist or lack the support needed to be truly useful.
Re:C++ had its day (Score:2, Insightful)
Ever seen a workable kernel or device driver written in Java? Of course you haven't! You get down to the that level and you'll see C interspersed with assembly. Move up a step to low level system software and it's all C with a smattering of C++. You don't find mid to high level languages until you get to the application level. (I'm not counting high level interpreted languages performing remedial scr
Re:C++ had its day (Score:2)
Re:C++ had its day (Score:3, Insightful)
Funny how you use "C derivative" in a derogatory way. You can also call Java, C#, Python, PHP, and Objective-C "C derivatives" too. They all use the same syntax style.
For the most part though, end-user applications have no need to run in C++. I know the typical exceptions are in gaming, image processing and system internals, but this is a small subset of commercial programming.
We'll ignore the fact that the browser
My favourite book is... (Score:5, Informative)
Re:My favourite book is... (Score:2)
The only thing that rubs me the wrong way is the stupid framing program in Chapter 1 and 2. I mean _come_ on_ writing a program to frame text output on an ASCII terminal? They should really be able to come up with a better example.
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!
Re:My favourite book is... (Score:2)
Accelerated C++ --> Modern C++ Design?! (Score:2)
Interesting perspective. Both Accelerated C++ and Modern C++ Design are very good for their intended audiences, but I'd have recommended about five or six other books and several years of experience using C++ between one and the other!
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.
practical? (Score:5, Funny)
Steve
This book has been out a few years.. (Score:5, Funny)
Re:This book has been out a few years.. (Score:2)
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.
Book sounds bad; read Accelerated C++ (Score:5, Interesting)
1.) Don't have a clear target audience (from the review it sounds too easy and too little details for a programmer and yet too hard for a complete beginner)
2.) Seem like the author was paid by the page. Really, even for a complete novice, a well written book can teach C++ in less than 300 pages.
Conclusion: Don't buy this book.
That said, I really like Accelerated C++ for a novice programmer. The authors obviously know their stuff and it's very clear and concise. Lot's of good (not pointless little toy programs) examples that are clearly explained. Also, an example is built throughout a chapter so you don't have to comprehend everything at once. Finally, and this is the best part, STL is used from the beginning. Why save the best part of C++ for the end?
Amazon link: Accelerated C++ [amazon.com]
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 e
For templates there is one excellent book (Score:3, Insightful)
The book talks about all the aspects of templates, has plenty of clear examples.
Apart from this I would not suggest the Stroustrup book for learning C++, but it is excellent as a reference manual.
Copy of a stupid article (Score:3, Informative)
Enough with C++/C/Java books! We need wider topics (Score:5, Insightful)
I am a hard core C++ person myself, but even I am fed up with the series of similar books on these PLs.
There are many other topics in programming that deserve better attention by the
Books on
- Code optimization techniques (both for C/C++ & assembly level and optimization for web programming and DB programming)
- Algorithms and data structures - this one will never go away whatever high level garbage collecting foolproof language/framework you end up using.
- Software design topics (design patterns and its relatives, UML, alternative paradigms such as extreme programming)
- Software project management topics
Come on people!
Re:Enough with C++/C/Java books! We need wider top (Score:2)
code optimization techniques, though i have not read Knuth i do know his thought that "premature optimization is the root of all evil". that being said, knowledge of algorithms and data structures might preclude the need to micro-optimize. Hmm, am I using preclude correctly? is it even a word? preempt maybe. anyway...
I have nothing to say on the other two topics, because I have to pee.
Re:Enough with C++/C/Java books! We need wider top (Score:4, Insightful)
about the title (Score:3, Funny)
Re:about the title (Score:3, Insightful)
suggestion (Score:2)
Teach Yourself Java in 21 days
ducks
If you wish, Mod as Troll (Score:2)
learn from the gaming industry (Score:3, Interesting)
My personal favorite is C++ for Game Programmers [amazon.com].
It's not a general-purpose book and not for the complete beginner, but it dives deeper into when and why to use different programming styles and structures.
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.
How does this compare to... (Score:2)
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:Everything you ever wanted to know about C++... (Score:2)
Don't forget
Also, and this may just be me, I've found books by Deital & Deital to be very good references for many languages. They are layed
Why such a fat book? (Score:2)
We need short books that read like this:
The standard template library (STL) provides useful collection classes. These make it easier to build common data structures. Arrays of variable size "vector"), lists ("list"), and key/value pairs ("map") are provi
Re:Why such a fat book? (Score:2)
I take your point, and I agree with it. However, I note that your own description also contains several significant technical errors, if only by omission in most cases. Complex and powerful tools require a certain level of detail to explain them, and while I certainly agree that you can go too far (and ~1,000 pages is probably some way too far here) you can also go too short (e.g., Accelerated C++, while generally very good, almost completely ignores exceptions). A
But it's missing.... (Score:2)
Speaking of C++ books... (Score:2)
I was out of town for a wedding,
duplicitous != redundant (Score:3, Insightful)
Accelerated C++ (Score:2)
It's a short 300-some pages, and isn't too inundating, while covering the topic properly: not from a non-OOP perspective.
Other good books... (Score:2)
Good overall intro to the language and supporting library (STL)
Coplien "Advanced C++"
A great "next level" book for intermediate C++ devs.
What should be in a trult practical C++ book (Score:3, Interesting)
There are a million books about how to program in c/c++, but how about how to get actual work done in c?
Why you young whelp! (Score:2, Funny)
C invented the dangling pointer. And it put the buffer overflow on the map.
Kids these days. You have everything we worked hard for handed to you on a silver platter. You have no idea where these concepts even originated. PHAH!
Re:C AND C++ ARE THE WORST LANGUAGES EVER DEVELOPE (Score:3, Funny)
Except for all other languages...
Re:C AND C++ ARE THE WORST LANGUAGES EVER DEVELOPE (Score:4, Funny)
C and C++ combine all the raw speed and power of assembly with all the grace and smooth design of assembly.
(I heard that somewhere - don't know the original source).
Re:Stereotype, that C/Cis "just faster" (Score:2, Funny)
Re:C AND C++ ARE THE WORST LANGUAGES EVER DEVELOPE (Score:2)
And without them, there probably wouldn't be any others.
Re:*pure* beginner book? (Score:2, Interesting)
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!