Industrial-Sized Deals TextBTS15 Shop Women's Handbags Learn more nav_sap_SWP_6M_fly_beacon Andra Day $5 Off Fire TV Stick Off to College Essentials Shop Popular Services tmnt tmnt tmnt  Amazon Echo Starting at $99 Kindle Voyage Disney Infinity 3.0 Shop Back to School with Amazon Back to School with Amazon Outdoor Recreation Deal of the Day
Sell yours for a Gift Card
We'll buy it for $12.28
Learn More
Trade in now
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

The Elements of Programming Style, 2nd Edition Paperback – January 1, 1978

22 customer reviews

See all 3 formats and editions Hide other formats and editions
Amazon Price New from Used from
Paperback
"Please retry"
$100.11 $34.75
Unknown Binding
"Please retry"

Save up to 40% on professional, scholarly and scientific resources.
Wiley's Summer Savings Event
Save up to 40% on professional, scholarly and scientific resources. Learn more.

Editorial Reviews

Elements of programming.

NO_CONTENT_IN_FEATURE

Best Books of the Month
Best Books of the Month
Want to know our Editors' picks for the best books of the month? Browse Best Books of the Month, featuring our favorite new books in more than a dozen categories.

Product Details

  • Paperback: 168 pages
  • Publisher: McGraw-Hill; 2nd edition (January 1, 1978)
  • Language: English
  • ISBN-10: 0070342075
  • ISBN-13: 978-0070342071
  • Product Dimensions: 0.5 x 6 x 8.2 inches
  • Shipping Weight: 8 ounces
  • Average Customer Review: 4.4 out of 5 stars  See all reviews (22 customer reviews)
  • Amazon Best Sellers Rank: #618,638 in Books (See Top 100 in Books)

Important Information

Ingredients
Example Ingredients

Directions
Example Directions

More About the Authors

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

Customer Reviews

Most Helpful Customer Reviews

34 of 36 people found the following review helpful By A Williams on October 13, 2001
Format: Paperback
I firmly believe that computer programming is a craft, perhaps an art but certainly not a science. As you learn the craft you need to learn the wisdom of those that have gone before you. This book becomes essential.
It spells out, first with a counter example found in a piece of code published elsewhere and then with the code rewritten, over 70 pearls of wisdom that should be engraved into our consciousness; for many years every morning when I logged on to start work as a commercial Unix programmer one of these rules was randomly chosen as my message of the day, if I didn't understand the short rule I dragged out the book and refreshed my memory.
Brian Kernighan has co-authored three books almost essential to learning our craft, this volume, "Software Tools" and "The Unix Programming Environment". "Elements of Programming Style" spells out the fundamental rules, "Software Tools" shows you how to apply them to a number of simple projects and extends the rules to software design and finally "The Unix Programming Environment" shows you how to use them in an operating system designed to reward you for your effort.
The examples in either PL/I or Fortran expound the simple rules clearly and expertly in a manner typical of Kernighan's writing. That the languages used are old and most of the rules long accepted lore are not a drawback to this volume. Anyone who knows C, Pascal or even Perl should easily understand the code and programmers turn out code just as bad today in any number of languages.
These things make this book highly recommended reading for anyone who wishes to call them self "programmer." A final word of warning, don't lend this book to anyone, you'll never get it back - I've bought four copies so far.
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
13 of 13 people found the following review helpful By Daniel Mall on February 15, 2001
Format: Paperback
Published in 1978. 168 pages. These 77 rules represent the definitive basis of good programming style and best programming practices. Included in this famous set of rules are gems such as "say what you mean", "write clearly", "use the telephone test", "make sure comments and code agree", and "make it right before you make it faster". Each rule is described in the context of a small program or code fragment. The authors expertly illuminate their rules by correcting these deficient programs. All of the example code in FORTRAN or PL/I was taken from prior publications. The rules are programming language independent (76/77); the only exception is "avoid the FORTRAN arithmetic IF." This book solidified many of the ideals expressed in the structured programming movement.
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
8 of 8 people found the following review helpful By alkmaar on September 18, 2006
Format: Paperback
I dare say many rules Mr. Kernighan preached almost three decades ago are still NOT followed by the programming community at large. For examples, "Modularize. Use subroutines." "Each module should do one thing well." and "Don't patch bad code--rewrite it." A widespread, bad practice of 90% of the programmers today is still writing functions that are way too long! And they very often keep modifying existing functions--inserting new logic into them--to make already bad code even worse; they seldom give it a second thought about rewriting the whole damn crap!

Another set of rules from the book: "Make sure code and comments agree." and "Don't over-comment." Many programmers seldom do the first thing, resulting in widespread mismatches between the actual codes and surrounding comments. This applies to Java code as well. The comment style recommended by Java--that is, mixing code and comments that can be extracted into so-called self documentation--is an outright violation of the "don't over-comment" rule. (This is intended to be a criticism of Java-style comments.) Good code should document itself clearly; with perhaps a little help from judiciously added few comments that are not self-evident from the code itself.

The book uses FORTRAN and PL/I code examples. There are things that no longer apply today. But the fundamental rules and styles are still well applicable today and in the future.
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
3 of 3 people found the following review helpful By Yawgmoth on September 12, 2013
Format: Paperback
This is almost a must-read for computer scientists, computer engineers, software engineers, and anyone who will code for a living. Almost. I was very tempted to give this book a four, but the content is too good and not replicated in aggregate in any other source of which I'm aware.

The problem is that some of the FORTRAN and PL/I syntax are virtually unreadable to the modern programmer. Many of the examples and their lessons were still very clear, but others were almost impossible to parse. By the end, I probably learned enough FORTRAN in PL/I that I could go back and "decompile" most of the example programs. Additionally, many of the problems the authors describe at length were solved in C or C++, and more are absent in higher-level languages, and therefore likely inaccessible to newer students and more novice programmers. If someone were to write a "third edition" in C or C++ and swap some of the antiquated FORTRAN issues for modern C-and-C-like-language issues or even object-oriented issues, it could serve as a valuable, accessible guide for the current generation.

Despite these issues, I am inclined to give the book five stars, given my limited choices on a five-point scale. It is incredibly valuable, and will likely be one of the few I use for reference in the years to follow.
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

Most Recent Customer Reviews


What Other Items Do Customers Buy After Viewing This Item?

Want to discover more products? Check out these pages to see more: elements of language answer book, more programming pearls, pj plauger