Programming Books C Java PHP Python Learn more Browse Programming Books
Qty:1
  • List Price: $44.99
  • Save: $6.01 (13%)
Only 2 left in stock (more on the way).
Ships from and sold by Amazon.com.
Gift-wrap available.
C++ Programming Style has been added to your Cart
Condition: Used: Good
Comment: Fast Shipping - Safe and Secure Bubble Mailer!
Access codes and supplements are not guaranteed with used items.
Have one to sell? Sell on Amazon
Flip to back Flip to front
Listen Playing... Paused   You're listening to a sample of the Audible audio edition.
Learn more
See this image

C++ Programming Style Paperback – July 10, 1992

ISBN-13: 078-5342563658 ISBN-10: 0201563657 Edition: 1st

Buy New
Price: $38.98
15 New from $7.70 53 Used from $0.01 1 Collectible from $9.96
Amazon Price New from Used from
Hardcover
"Please retry"
Paperback
"Please retry"
$38.98
$7.70 $0.01
Free Two-Day Shipping for College Students with Amazon Student Free%20Two-Day%20Shipping%20for%20College%20Students%20with%20Amazon%20Student


Hero Quick Promo
Save up to 90% on Textbooks
Rent textbooks, buy textbooks, or get up to 80% back when you sell us your books. Shop Now
$38.98 FREE Shipping. Only 2 left in stock (more on the way). Ships from and sold by Amazon.com. Gift-wrap available.

Frequently Bought Together

C++ Programming Style + C++ Strategies and Tactics + Advanced C++ Programming Styles and Idioms
Price for all three: $114.69

Buy the selected items together

Editorial Reviews

From the Inside Flap

Almost two decades after the publication of Kernighan and Plauger's classic, The Elements of Programming Style, its compact set of rules remains the best general guidance on good programming. Today, however, our programs are larger and our programming languages have changed. We now care as much about how the components of a program fit together as we do about the algorithms and data structures used in each component. DeRemer and Kron coined the terms programming-in-the-large and programming-in-the-small to make a distinction between the large-scale and small-scale aspects of programs. By programming-in-the-small, they meant dealing with components of a program that are "one to a few pages long" - the size of a typical C++ class. By programming-in-the-large, they meant the structuring of in-the-small components into a program - in C++ terms, dealing with relationships between classes. Kernighan and Plauger concentrated their work on the issues of programming-in-the-small. Their advice about programming-in-the-large is sound, but minimal.

Modularize. Use subroutines.

This book addresses programming style, with more emphasis on programming-in-the-large, and is restricted to the domain of C++ programs. It is written for the programmer who has learned the mechanics of C++, but is experiencing difficulty in applying the language features - particularly the object-oriented features - to programming problems. Though the discussion is limited to C++, many of the observations about programming are true of other languages. I leave the treatment of language-independent style in-the-large to more ambitious authors.

I have adopted Kernighan and Plauger's method of distilling rules of programming style from the critical reading and rewriting of programs. All the programs used here are taken from textbooks, magazine articles and tutorials on C++ programming. None was created artificially for this work. Some programs are presented exactly as originally published, while others have been altered cosmetically. The alterations range from the correction of in-the-small bugs, which would only distract, to structure-preserving transformations of programs for which copyright was not obtained.

The spirit in which to approach the material is that of an "egoless" code review. We all learn by reading and reviewing each other's programs. The material is not a criticism of individual programmers - it seeks only to differentiate between good and bad programs. No doubt the programs that are presented here as "better" versions have their own shortcomings. The reader is encouraged to examine these programs critically, looking for further improvements in programming style.

0201563657P04062001

From the Back Cover

C++ supports programming-in-the-large, allowing relationships between different parts of a program to be expressed. The scope of C++ programming style therefore goes beyond traditional in-the-small issues which relate to the details of line-by-line coding. This book examines the use of the in-the-large language features of C++, which sometimes confuse even experienced programmers. The author demonstrates that unwarranted use of the more powerful language features may lead to cluttered programs which are harder to comprehend and sometimes less efficient than more straightforward alternatives. Cargill rewrites several programs, using techniques that range from improving consistency to removing redundant inheritance. The presentation simulates a code review, in which readers may independently evaluate and criticize alternative approaches to programming problems, and then compare their analyses with those of the author.

Design and coding style rules are distilled from the examples. Understanding and following these rules will help professional programmers design and write better C++ programs.

A chapter is devoted to each of the following topics:

  • abstractions
  • operator overloading
  • consistency
  • wrappers
  • unnecessary inheritance
  • efficiency
  • virtual functions
Building on the programming rules introduced in the first seven chapters, Cargill presents a case study in which a single program undergoes repeated transformations that improve its overall quality while reducing its size. The book concludes with a chapter on multiple inheritance.



0201563657B04062001

NO_CONTENT_IN_FEATURE

Shop the new tech.book(store)
New! Introducing the tech.book(store), a hub for Software Developers and Architects, Networking Administrators, TPMs, and other technology professionals to find highly-rated and highly-relevant career resources. Shop books on programming and big data, or read this week's blog posts by authors and thought-leaders in the tech industry. > Shop now

Product Details

  • Paperback: 248 pages
  • Publisher: Addison-Wesley Professional; 1 edition (July 10, 1992)
  • Language: English
  • ISBN-10: 0201563657
  • ISBN-13: 978-0201563658
  • Product Dimensions: 7.2 x 0.6 x 9 inches
  • Shipping Weight: 15.2 ounces (View shipping rates and policies)
  • Average Customer Review: 4.0 out of 5 stars  See all reviews (8 customer reviews)
  • Amazon Best Sellers Rank: #1,641,426 in Books (See Top 100 in Books)

More About the Author

Discover books, learn about writers, read author blogs, and more.

Customer Reviews

4.0 out of 5 stars
Share your thoughts with other customers

Most Helpful Customer Reviews

13 of 13 people found the following review helpful By A Customer on August 15, 1999
Format: Paperback
I've understood the syntax of C++ and the basic ideas of OO for some time now, but I have not used these tools professionally because OO design is so hard, and I have little experience. I have often wished I had a book that would help me evaluate an OO design, and determine what its weaknesses were. This is that book.
I especially like the format; the author presents an OO class and then step by step tears it down and shows you what's broken about it. For each problem and its corresponding solution, the author presents a rule of thumb that can help you avoid similar design mistakes in the future. Some of the material is specific to C++, but a lot of it is applicable to any OO language.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
14 of 15 people found the following review helpful By Rob Wehrli on September 22, 2002
Format: Paperback Verified Purchase
It is unfair to judge this book from the perspective of the "average" C++ programmer. Tom goes at least three steps further to treat programmers/readers as intelligent beings of the same species who already have the fundamental programming language "mechanics" skills. The reviewer who spewed forth about "coding style" really doesn't "get it." The whole issue of "where you put your braces" and naming conventions isn't what Tom or Tom's book is about. He already assumes that if you're programming C++ you have some idea of when you're going to press enter on the keyboard. (To make whitespace, in case you were wondering...)
The inferior thinking that confounds the world of programming is that C++ is an easy language to master. Very few programmers have much hope of aspiring to learn even 80% of the language and use it effectively. Thinking otherwise is like saying that everyone who wants to run a foot race can be Jessie Owens. Tom starts by treating readers as programming peers. That alone is an incredible benefit anytime programming is being done. Prima donas and those guys who always seem too busy to provide their "public interface" are the ones to avoid in learning anything of use regarding C++.
I pick up Tom's book every couple of months and browse it. His noted "brevity" is like a good RPG that gives subtle hints that incite thinking for yourself without following what many other books do by drawing a roadmap to one solution that worked for this one situation but may never again apply to anything useful. In my opinion, Tom's "lessons" are appropriately concise.
If you haven't read Tom's book, buy it, read it...if you're serious about your C++ skills.
Read more ›
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
9 of 10 people found the following review helpful By Avneesh Bhatnagar on July 28, 2002
Format: Paperback
I bought this book after reading through Effective C++ and More Effective C++ by Scott Meyers following the suggested reading by the author. I think that I should have read this book before purchasing the Effective C++ books. Basically it touches some fundamental issues, but due to the fact that it is slightly old, some topics such as templates are not covered very well. Meyers also gives a thorough overview of smart pointers, member function templates etc. My recommendation is that if you really want to start improving your C++ skills, forget about this book, read Scott Meyers' books and pick up Design Patterns by Erich Gamma and others.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
4 of 4 people found the following review helpful By Thing with a hook on February 22, 2007
Format: Paperback
C++ Programming Style still gets regularly mentioned as an important guide to intermediate C++. However, from the perspective of 2007, it's looking long in the tooth.

The book was published in 1992, so the modern reader will notice the old fashioned C++ - no templates (therefore no STL), no exceptions, no strings, old style .h headers. The implementation of the assignment operator relies on a check for self assignment (rather than merely using it as an optimisation), and it uses arrays polymorphically. Readers of Exceptional C++ and Effective C++ will know that these are not recommended practices in modern C++. However, I assume that you aren't going to read this without a good grounding in basic and intermediate C++ and can spot the parts which require tweaking.

Fortunately, the book is structured as a series of code reviews, so it stands out from the glut of mini-essay type books, and the general principles of class design that the book propounds remain useful. And even fairly advanced programmers probably won't spot all the problems that Cargill highlights, so you'll definitely learn something.

I'm giving it four stars because is still covers a core of C++ that is relevant and you can pick it up cheaply. But don't expect it to be fully up to date.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again

Set up an Amazon Giveaway

Amazon Giveaway allows you to run promotional giveaways in order to create buzz, reward your audience, and attract new followers and customers. Learn more
C++ Programming Style
This item: C++ Programming Style
Price: $44.99 $38.98
Ships from and sold by Amazon.com

What Other Items Do Customers Buy After Viewing This Item?