Slashdot Mirror


Practical C++

jsight writes with his review of Rob McGregor's Practical C++, published by QUE. He writes "Some books attempt to do one thing really well, and others attempt a little of everything. This book is clearly an example of the latter, in full force. Weighing in at a hefty 900 pages, you would expect this book to be crammed with chapters and details on every aspect of the STL and basic C++. In the following review, I am going to cover where it succeeds in doing this, and where it fails." (This book has been out for a few years; what books would make more sense today for a C++ learner's library?) 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.

8 of 307 comments (clear)

  1. One question by Anonymous Coward · · Score: 1, Interesting

    What other books are on your shelf?

    Thank you,
    Mr Blinky

  2. Book sounds bad; read Accelerated C++ by afay · · Score: 4, Interesting

    From this review, this book sounds horrible. I can't stand books that:

    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++

    --
    Best slashdot comment
  3. Re:The C++ Programming Language by johnjaydk · · Score: 2, Interesting
    The Bjarne book is good. No doubt about that. It's a bit steep for someone with no previous exposure to OOP but it covers a lot of good stuff.

    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.

    --
    TCAP-Abort
  4. Re:On the subject of language by kfg · · Score: 2, Interesting

    Interesting. I read it to mean "simplified to the point where the author knowingly said things that weren't strictly true."

    A common trait of quicky introductions.

    KFG

  5. learn from the gaming industry by Tekmage · · Score: 2, Interesting

    My personal favorite is C++ for Game Programmers.

    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.

    --
    --The more you know, the less you know.
  6. Re:*pure* beginner book? by kilgortrout · · Score: 2, Interesting

    I don't know if it's still available, but my first programming book was: "C++ How To Program", by Deitel/Deitel which was originally published in 1994. It's an excellent book and if it's been republished/updated, might be worth a look. It's designed for people with little or no programing experience.

  7. Re:Best learner's C++? by Ed+Avis · · Score: 2, Interesting

    I found Stroustrup's book The C++ Programming Language to be quite good, at least if you already know some of the language. It's not quite a tutorial and not quite a reference manual but works nicely as a blend of both.

    --
    -- Ed Avis ed@membled.com
  8. What should be in a trult practical C++ book by frenchgates · · Score: 2, Interesting

    Why do most of the books ignore the practical aspects of of C++ that end up wasting tons of programming time, especially for beginners? Primarily I'm talking about things like how to keep tons of #include files under control and debug problems with them in your own code or existing code you are using or evaluating. How to organize source code into various directories for use by multiple projects. When and how to create compiled libraries. How to make DLLs on different operating systems as opposed to applications. And on and on.

    There are a million books about how to program in c/c++, but how about how to get actual work done in c?

    --
    Syntax error: loose != lose, affect != effect, then!=than