C++ Programming Style 1st Edition

4.0 out of 5 stars 8 ratings
ISBN-13: 978-0201563658
ISBN-10: 0201563657
Why is ISBN important?
ISBN
This bar-code number lets you verify that you're getting exactly the right version or edition of a book. The 13-digit and 10-digit formats both work.
Scan an ISBN with your phone
Use the Amazon App to scan ISBNs and compare prices.
Share
Loading your book clubs
There was a problem loading your book clubs. Please try again.
Not in a club? Learn more
Amazon book clubs early access

Join or create book clubs

Choose books together

Track your books
Bring your club to Amazon Book Clubs, start a new book club and invite your friends to join, or find a club that’s right for you for free.
Used: Acceptable | Details
Sold by -OnTimeBooks-
Condition: Used: Acceptable
Comment: Shipped fast and reliably through the Amazon Prime program! We take customer service seriously and have 99% positive feedback! Book may contain some writing, highlighting, and or cover damage.
Access codes and supplements are not guaranteed with used items.
Get Fast, Free Shipping with Amazon Prime
FREE delivery Tuesday, May 10 if you spend $25 on items shipped by Amazon
Or fastest delivery Friday, May 6. Order within 1 hr 58 mins
Only 1 left in stock - order soon.
Ships from and sold by triple h.
List Price: $44.99 Details
Save: $14.56 (32%)
FREE delivery May 11 - 18. Details
Or fastest delivery Monday, May 9. Order within 23 hrs 43 mins. Details

Explore books for Asian American and Pacific Islander Heritage Month

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



Learn new cuisines with virtual cooking experiences
Amazon Explore Browse now

Product details

  • Publisher ‏ : ‎ Addison-Wesley Professional; 1st edition (August 1, 1992)
  • Language ‏ : ‎ English
  • Paperback ‏ : ‎ 248 pages
  • ISBN-10 ‏ : ‎ 0201563657
  • ISBN-13 ‏ : ‎ 978-0201563658
  • Item Weight ‏ : ‎ 15.5 ounces
  • Dimensions ‏ : ‎ 7.5 x 0.75 x 9.25 inches
  • Customer Reviews:
    4.0 out of 5 stars 8 ratings

About the author

Follow authors to get new release updates, plus improved recommendations.
Brief content visible, double tap to read full content.
Full content visible, double tap to read brief content.

Discover more of the author’s books, see similar authors, read author blogs and more

Customer reviews

4.0 out of 5 stars
4 out of 5
8 global ratings

Top reviews from the United States

Reviewed in the United States on September 22, 2002
14 people found this helpful
Report abuse
Reviewed in the United States on January 18, 2013
One person found this helpful
Report abuse
Reviewed in the United States on February 22, 2007
4 people found this helpful
Report abuse
Reviewed in the United States on November 29, 2006
3 people found this helpful
Report abuse
Reviewed in the United States on February 15, 2001
9 people found this helpful
Report abuse
Reviewed in the United States on July 28, 2002
8 people found this helpful
Report abuse

Top reviews from other countries

hugh
5.0 out of 5 stars Five Stars
Reviewed in Canada on April 4, 2017