or
Sign in to turn on 1-Click ordering.
 
 
Express Checkout with PayPhrase
What's this? | Create PayPhrase
More Buying Choices
74 used & new from $13.99

Have one to sell? Sell yours here
 
   
The Practice of Programming
 
 
Tell the Publisher!
I’d like to read this book on Kindle

Don’t have a Kindle? Get your Kindle here.
 
  

The Practice of Programming (Paperback)

~ (Author), (Author)
4.0 out of 5 stars  See all reviews (52 customer reviews)

List Price: $49.99
Price: $38.99 & this item ships for FREE with Super Saver Shipping. Details
You Save: $11.00 (22%)
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
In Stock.
Ships from and sold by Amazon.com. Gift-wrap available.

Want it delivered Tuesday, November 17? Choose One-Day Shipping at checkout. Details
33 new from $25.58 41 used from $13.99

Frequently Bought Together

The Practice of Programming + Unix Programming Environment (Prentice-Hall Software Series) + C Programming Language (2nd Edition)
Price For All Three: $125.91

Show availability and shipping details

  • This item: The Practice of Programming by Rob Pike

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details

  • Unix Programming Environment (Prentice-Hall Software Series) by Rob Pike

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details

  • C Programming Language (2nd Edition) by Dennis M. Ritchie

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details


Special Offers and Product Promotions


Customers Who Bought This Item Also Bought

Programming Pearls (2nd Edition)

Programming Pearls (2nd Edition)

by Jon Louis Bentley
4.4 out of 5 stars (35)  $25.80
Programming With GNU Software

Programming With GNU Software

by Michael Kosta Loukides
4.4 out of 5 stars (10)  $35.95
Mastering Algorithms with C

Mastering Algorithms with C

by Kyle Loudon
3.4 out of 5 stars (15)  $26.37
C Programming Language (2nd Edition)

C Programming Language (2nd Edition)

by Dennis M. Ritchie
4.7 out of 5 stars (279)  $46.42
The Elements of Programming Style

The Elements of Programming Style

by P.J. Plauger
Explore similar items

Editorial Reviews

Amazon.com Review

Coauthored by Brian Kernighan, one of the pioneers of the C programming language, The Practice of Programming is a manual of good programming style that will help any C/C++ or Java developer create faster, more maintainable code.

Early sections look at some of the pitfalls of C/C++, with numerous real-world excerpts of confusing or incorrect code. The authors offer many tips and solutions, including a guide for variable names and commenting styles. Next, they cover algorithms, such as binary and quick sorting. Here, the authors show how to take advantage of the built-in functions in standard C/C++. When it comes to data structures, such as arrays, linked lists, and trees, the authors compare the options available to C, C++, Java, and even Perl developers with a random-text-generation program (using a sophisticated Markov chain algorithm) written for each language.

Subsequent sections cover debugging tips (including how to isolate errors with debugging statements) and testing strategies (both white-box and black-box testing) for verifying the correctness of code. Final sections offer tips on creating more portable C/C++ code, with the last chapter suggesting that programmers can take advantage of interpreters (and regular expressions) to gain better control over their code. A handy appendix summarizes the dozens of tips offered throughout the book.

With its commonsense expertise and range of examples drawn from C, C++, and Java, The Practice of Programming is an excellent resource for improving the style and performance of your code base. --Richard Dragan



Review

"The book fills a critical need by providing insight into pragmatic designand coding issues so that programmers become better at their craft...Programmers just out of school should be given this book on their first day of work. It will save employers thousands of dollars due to lost productivity and "mindless" debugging." -- Paul McNamee, Computer Scientist, Johns Hopkins University Applied Physics Laboratory

"The examples are just about right. Chapter 3's example (markov) is stellar; it is simple, thought-provoking, elegant, and most importantly, provides an opportunity to analyze good design... It is the most concise book of its kind and offers the most useful, no-nonsense treatment of how to program from authors who know a great deal about the topic." -- Peter Memishian, Member of Technical Staff, Sun Microsystems

"There is a tendency for many books to be in the high hundreds of pages long these days with very little justification. This text is well-written, and is not overly interdependent, thus allowing the reader to "skip around" as interests motivate.... I found [the examples] to be interesting. I like it when I don't have to spend time figuring out an example and I can concentrate on the lesson the example is trying to teach. Too many books have overly-complex examples, and this one doesn't." -- Chris Cleeland, Technical Lead, IONA Technologies, Inc.

"A great candidate to fill this widely perceived lack in the literature... Very solid and very educational, this manual is one I highly recommend to all programmers." -- Dr. Dobb's Electronic Review of Computer Books

"An outstanding book... a readable and well-written style combined with their experience and valuable expertise." -- Sys Admin

"This book is full of good common sense. In addition it is written in highly readable English. Pick up a copy, choose any chapter and start reading. I think you will then feel motivated to buy yourself a copy... Whatever language you program in, I think you will benefit from reading this book." -- Association of C & C++ Users

Rating 9/10: "Practical and enjoyable, this book captures its authors' considerable wisdom and experience." -- Slashdot.org

Read the full review for this book.

To be honest, there are quite a few books around that teach algorithms and the fundamentals of computer programming. The problem is that those books are commonly designed to support academic classes in computer science, and consequently shine on the theoretical side but leave something to be desired on the pragmatic front.

The Practice of Programming is a great candidate to fill this widely perceived lack in the literature that I commonly refer to as "for the industry." Authored by two experienced researchers of the Computing Science Research Center at the well-known Bell Labs (the name Brian Kernighan will ring a bell to the millions of C programmers), this manageable text conveys a fantastic quantity of suggestions and guidelines that will come in useful to all the neophytes of programming, and at the same time provides some sound tips and principles to the more seasoned among us. The first chapter approaches the delicate topic of good coding style; while the opinions on this are always subjective, those expressed by the authors seem generally acceptable and worth following. --Davide Marcato, Dr. Dobb's Electronic Review of Computer Books -- Dr. Dobb's Electronic Review of Computer Books


Product Details

  • Paperback: 288 pages
  • Publisher: Addison-Wesley Professional (February 14, 1999)
  • Language: English
  • ISBN-10: 020161586X
  • ISBN-13: 978-0201615869
  • Product Dimensions: 9.1 x 7 x 0.6 inches
  • Shipping Weight: 8 ounces (View shipping rates and policies)
  • Average Customer Review: 4.0 out of 5 stars  See all reviews (52 customer reviews)
  • Amazon.com Sales Rank: #143,930 in Books (See Bestsellers in Books)

More About the Authors

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

Look Inside This Book


What Do Customers Ultimately Buy After Viewing This Item?


Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
 
(2)
(1)

Your tags: Add your first tag
 

Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

 

Customer Reviews

52 Reviews
5 star:
 (27)
4 star:
 (10)
3 star:
 (6)
2 star:
 (4)
1 star:
 (5)
 
 
 
 
 
Average Customer Review
4.0 out of 5 stars (52 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

 
48 of 50 people found the following review helpful:
5.0 out of 5 stars No waste of time here, January 7, 2000
By Charles Ashbacher "(cashbacher@yahoo.com)" (Marion, Iowa United States(cashbacher@yahoo.com)) - See all my reviews
(TOP 50 REVIEWER)      
In computing, the learning curve is doubly steep. Not only do we have to learn very complex operations, but we have to learn them at a pace unrivaled in any other field. Furthermore, the equipment improves at a rate that simply boggles the mind. In this frantic environment, we rarely have time to read our code twice, much less read a book about code. Therefore, when we do read, we must make every minute count. This is one book where your count of wasted minutes would be a very small one.
Some of the tips in this book are obvious in retrospect, yet ones that you probably would not think of. My favorite is the fact that due to the changes in processors, a double precision floating point arithmetic operation can be faster than the equivalent one for integers. In the "old" days, the gospel was that you must avoid floating point operations unless absolutely necessary, to avoid the degradation of performance.
Other tips, such as methods to assure you comment what is necessary, taking a few minutes to learn simple performance features, debugging and testing guidelines; portability issues and basic algorithm analysis should cause you to pause for a moment. Even in our hectic development environments, stopping and analyzing your code is a necessity.
It is difficult to conceive of someone who will not find a tip in here that will justify the cost of the book. Unless of course, you are one of the authors. I listed it as one of the top books of the year in my On Books column that appeared in the September, 1999 issue of _Journal of Object-Oriented Programming_.
Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)



 
40 of 42 people found the following review helpful:
5.0 out of 5 stars Best book of its kind, March 1, 1999
I've long recommended Pike's "Notes on Programming in C" on my web page. This book includes most of the content from that essay and much more, but is still thin and concise.

What I like most about this book is that they justify all of their recommendations, show both good and bad examples, and keep the discussion grounded in actual code (rather than abstract principles).

Other things I liked:

- begins with a discussion of programming style and aesthetics

- they critique some of the designs that they have been involved in, such as C's stdio and string handling libraries

- they discuss the unique design issues presented by library design

- they give examples in C, C++ and Java, and give an honest appraisal of the tradeoffs involved in each language.

- FINALLY, excellent single chapter descriptions of systematic approaches to debugging and testing!

- they face up to some of the tough design choices that must be made outside the UNIX Ivory Tower (rare for these authors). For example, they sacrifice UNIX consistency in one application so that the application will behave consistently across UNIX and Windows.

Minor gripes:

- still skirts around tough design issues in error recovery and reporting; they advocate the "print a diagnostic and exit" approach (which is totally inappropriate for library code), and don't discuss the tradeoffs

- a few of the principles they cover will be trivial or obvious for experienced programmers

Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)



 
31 of 34 people found the following review helpful:
5.0 out of 5 stars Simple and excellent, January 18, 2001
By Bryan O'Sullivan (CA, United States) - See all my reviews
I am bemused by the disparaging comments of my fellow readers in regard to this book. Kernighan and Pike make clear their intent in the first paragraph of the preface to this book; it is about simplicity, clarity, and generality.

To be sure, there is tinder here for short tempers and delicate egos. If you're under the gun, trying to duct-tape together the fifth release of some huge, unwieldy application, this book does not contain the short-term quick fixes you've been hoping for. If you're righteously convinced of your own sound practices and don't care to look at someone else's methods, this book may irk you.

Kernighan and Pike have written a book about the most basic habits and outlook that a programmer should have. They have not tried to address all facets of programming. Instead, they sacrifice scope to make their points stand out all the more clearly.

Would this be a better book if they had cast their net wider? Hardly. If you start off by applying the carefully thought out, methodical approaches described clearly throughout this book, your code will still hit abstruse bumps and strange circumstances. But most problems will succumb to the same analytical ways of thinking and tools that Kernighan and Pike have laboured to describe with such clarity.

But don't imagine that I think this book is perfect; the authors have been doing many things in the same ways for a long time. Most often, this is because their methods are effective, but sometimes they are far too close to being cop-outs. For example, the idea that it's OK to just print an error message and bomb out if something goes wrong is laughable outside of the Unix command line environment, and is rarely appropriate even there.

Fundamentally, though, if you can't solve the problems at the ends of the chapters (they're easy), or you think you can't possibly benefit from reading a book that troubles to describe quicksort (which you probably learned in CS-201), then there is likely nothing for you here. At least until you think to question your perspectives. Until then, I'll confess to a sense of relief that I don't have to work with you :-)

Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)


Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews

4.0 out of 5 stars Good book to read
I think this is a good book to read. Recall a joke about programming:
1. Learn all the theories about computer science.
2. Pick up a style.
3. Read more
Published 8 months ago by Yuanchyuan Sheu

5.0 out of 5 stars Great Book!!!
This book is perfect for any computer engineer who wants to get more information about programming.
Published 17 months ago by T. Christy

3.0 out of 5 stars Good Introduction
This book isn't bad. If you have any formal academic education in the area, you will probably want to just skip the first 2 1/2 chapters: they will have nothing new for you... Read more
Published 21 months ago by Kurt Burnside Rose

5.0 out of 5 stars Destined to Become a Classic
When I began my first career as a writer, I was constantly referred to "Elements of Style" by Strunk & White. Read more
Published on October 27, 2007 by Sixties Classic Rocker

3.0 out of 5 stars Good but tries to do too much--better to read a book on each topic
If you've limited yourself to reading only one book about programming, this might be the one. It does touch on many of the down-in-the-details practical aspects of programming, in... Read more
Published on April 12, 2007 by T. Harris

5.0 out of 5 stars excellent book
Apart from Brian W. Kernigham being the author, which automatically makes it a must read, this book is full of real life examples, pointers, and crafty exercises that will benefit... Read more
Published on February 18, 2007 by Pavel V. Dudrenov

5.0 out of 5 stars Excellent Book, should be included in CS courses
After reading through this book I can honestly say that this is a book that should be included in most college computer science programs. Read more
Published on January 15, 2007 by Matthew Geimer

5.0 out of 5 stars If you buy one CS book this is it.
This is the most readable computer science book you will ever encounter. Not really a reference, but more a generalized understanding of why we do some of the things we do in the... Read more
Published on November 20, 2006 by Benjamin Ranck

4.0 out of 5 stars Probably incorrectly priced by Amazon
The back cover of the book says the price is US $25. Check out the back cover.
Published on February 9, 2006 by Aniket G. Daptari

5.0 out of 5 stars Programming Knowledge Cornucopia
An excellent book covering all of the essential areas of knowledge necessary to become a professional programmer and should be required reading for those without a formal computer... Read more
Published on December 7, 2005 by Robert Bogetti

Only search this product's reviews



Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 


Active discussions in related forums
Search Customer Discussions
Search all Amazon discussions
   




Product Information from the Amapedia Community

Beta (What's this?)


Look for Similar Items by Category


Look for Similar Items by Subject

 

Feedback

If you need help or have a question for Customer Service, contact us.
 Would you like to update product info or give feedback on images?
Is there any other feedback you would like to provide?

Your comments can help make our site better for everyone.


Your Recent History

 (What's this?)

After viewing product detail pages or search results, look here to find an easy way to navigate back to pages you are interested in.