The Practice of Programming
Brian W. Kernighan
Rob Pike

ISBN-10: 020161586X
ISBN-13: 9780201615869

Publisher: Addison-Wesley Professional
Copyright: 1999
Format: Paper; 288 pp
Published: 02/04/1999

Suggested retail price: $49.99
Buy from myPearsonStore

With the same insight and authority that made their book The Unix Programming Environment a classic, Brian Kernighan and Rob Pike have written The Practice of Programming to help make individual programmers more effective and productive. This book is full of practical advice and real-world examples in C, C++, Java, and a variety of special-purpose languages. Kernighan and Pike have distilled years of experience writing programs, teaching, and working with other programmers to create this book. Anyone who writes software will profit from its principles and guidance.



1. Style.

Names.

Expressions and Statements.

Consistency and Idioms.

Function Macros.

Magic Numbers.

Comments.

Why Bother?



2. Algorithms and Data Structures.

Searching.

Sorting.

Libraries.

A Java Quicksort.

O-Notation.

Growing Arrays.

Lists.

Trees.

Hash Tables.

Summary.



3. Design and Implementation.

The Markov Chain Algorithm.

Data Structure Alternatives.

Building the Data Structure in C.

Generating Output.

Java.

C++.

Awk and Perl.

Performance.

Lessons.



4. Interfaces.

Comma-Separated Values.

A Prototype Library.

A Library for Others.

A C++ Implementation.

Interface Principles.

Resource Management.

Abort, Retry, Fail?

User Interfaces.



5. Debugging.

Debuggers.

Good Clues, Easy Bugs.

No Clues, Hard Bugs.

Last Resorts.

Non-reproducible Bugs.

Debugging Tools.

Other People's Bugs.

Summary.



6. Testing.

Test as You Write the Code.

Systematic Testing.

Test Automation.

Test Scaffolds.

Stress Tests.

Tips for Testing.

Who Does the Testing?

Testing the Markov Program.

Summary.



7. Performance.

A Bottleneck.

Timing and Profiling.

Strategies for Speed.

Tuning the Code.

Space Efficiency.

Estimation.

Summary.



8. Portability.

Language.

Headers and Libraries.

Program Organization.

Isolation.

Data Exchange.

Byte Order.

Portability and Upgrade.

Internationalization.

Summary.



9. Notation.

Formatting Data.

Regular Expressions.

Programmable Tools.

Interpreters, Compilers, and Virtual Machines.

Programs that Write Programs.

Using Macros to Generate Code.

Compiling on the Fly.



Epilogue.


Appendix: Collected Rules.


Index. 020161586XT04062001

Brian W. Kernighan works in the Computing Science Research Center at Bell Laboratories, Lucent Technologies. He is Consulting Editor for Addison-Wesley's Professional Computing Series and the author, with Dennis Ritchie, of The C Programming Language.

Rob Pike works in the Computing Science Research Center at Bell Laboratories, Lucent Technologies. He was a lead architect and implementer of the Plan 9 and Inferno operating systems. His research focuses on software that makes it easier for people to write software.



020161586XAB04062001

With the same insight and authority that made their book The Unix Programming Environment a classic, Brian Kernighan and Rob Pike have written The Practice of Programming to help make individual programmers more effective and productive.

The practice of programming is more than just writing code. Programmers must also assess tradeoffs, choose among design alternatives, debug and test, improve performance, and maintain software written by themselves and others. At the same time, they must be concerned with issues like compatibility, robustness, and reliability, while meeting specifications.

The Practice of Programming covers all these topics, and more. This book is full of practical advice and real-world examples in C, C++, Java, and a variety of special-purpose languages. It includes chapters on:

  • debugging: finding bugs quickly and methodically
  • testing: guaranteeing that software works correctly and reliably
  • performance: making programs faster and more compact
  • portability: ensuring that programs run everywhere without change
  • design: balancing goals and constraints to decide which algorithms and data structures are best
  • interfaces: using abstraction and information hiding to control the interactions between components
  • style: writing code that works well and is a pleasure to read
  • notation: choosing languages and tools that let the machine do more of the work

Kernighan and Pike have distilled years of experience writing programs, teaching, and working with other programmers to create this book. Anyone who writes software will profit from the principles and guidance in The Practice of Programming.



020161586XB04062001

View a Sample Chapter PDF:

Pearson Higher Education offers special pricing when you choose to package your text with other student resources. If you're interested in creating a cost-saving package for your students, contact your Pearson Higher Education representative for pricing and ordering information.

This title is a member of the Addison-Wesley Professional Computing Series, which also contains the titles below . You can also visit the Addison-Wesley Professional Computing Series page.

  • 0201379279Advanced CORBA® Programming with C++
    Henning & Vinoski
    © 1999 | Addison-Wesley Professional | Paper; 1120 pages | Instock
    ISBN-10: 0201379279 | ISBN-13: 9780201379273
    Brief Description | Buy from myPearsonStore

  • 0321525949Advanced Programming in the UNIX Environment: Paperback Edition, 2/E
    Stevens & Rago
    © 2008 | Addison-Wesley Professional | Paper; 960 pages | Instock
    ISBN-10: 0321525949 | ISBN-13: 9780321525949
    Buy from myPearsonStore

  • 0201433079Advanced Programming in the UNIX® Environment, 2/E
    Stevens & Rago
    © 2005 | Addison-Wesley Professional | Cloth; 960 pages | Instock
    ISBN-10: 0201433079 | ISBN-13: 9780201433074
    Brief Description | Buy from myPearsonStore

  • 0131411543Advanced UNIX Programming, 2/E
    Rochkind
    © 2004 | Addison-Wesley Professional | Paper; 736 pages | Instock
    ISBN-10: 0131411543 | ISBN-13: 9780131411548
    Brief Description | Buy from myPearsonStore

  • 0131429019The Art of UNIX Programming
    Raymond
    © 2004 | Addison-Wesley Professional | Paper; 560 pages | Instock
    ISBN-10: 0131429019 | ISBN-13: 9780131429017
    Brief Description | Buy from myPearsonStore

  • 020172152XBuilding Secure Software: How to Avoid Security Problems the Right Way
    Viega & McGraw
    © 2002 | Addison-Wesley Professional | Cloth; 528 pages | Instock
    ISBN-10: 020172152X | ISBN-13: 9780201721522
    Brief Description | Buy from myPearsonStore

  • 0201498413C Interfaces and Implementations: Techniques for Creating Reusable Software
    Hanson
    © 1997 | Addison-Wesley Professional | Paper; 544 pages | Instock
    ISBN-10: 0201498413 | ISBN-13: 9780201498417
    Buy from myPearsonStore

  • 0201634988Design Patterns CD: Elements of Reusable Object-Oriented Software
    Gamma, Helm, Johnson & Vlissides
    © 1998 | Addison-Wesley Professional | CD-ROM Only; 2 pages | Instock
    ISBN-10: 0201634988 | ISBN-13: 9780201634983
    Brief Description | Buy from myPearsonStore

  • 0201633612Design Patterns: Elements of Reusable Object-Oriented Software
    Gamma, Helm, Johnson & Vlissides
    © 1995 | Addison-Wesley Professional | Cloth; 416 pages | Instock
    ISBN-10: 0201633612 | ISBN-13: 9780201633610
    Brief Description | Buy from myPearsonStore

  • 0321334876Effective C++: 55 Specific Ways to Improve Your Programs and Designs, 3/E
    Meyers
    © 2005 | Addison-Wesley Professional | Paper; 320 pages | Instock
    ISBN-10: 0321334876 | ISBN-13: 9780321334879
    Brief Description | Buy from myPearsonStore

  • 0201749629Effective STL: 50 Specific Ways to Improve Your Use of the Standard Template Library
    Meyers
    © 2001 | Addison-Wesley Professional | Paper; 288 pages | Instock
    ISBN-10: 0201749629 | ISBN-13: 9780201749625
    Brief Description | Buy from myPearsonStore

  • 020163466XFirewalls and Internet Security: Repelling the Wily Hacker, 2/E
    Cheswick, Bellovin & Rubin
    © 2003 | Addison-Wesley Professional | Paper; 464 pages | Instock
    ISBN-10: 020163466X | ISBN-13: 9780201634662
    Brief Description | Buy from myPearsonStore

  • 020163497XForensic Discovery
    Farmer & Venema
    © 2005 | Addison-Wesley Professional | Cloth; 240 pages | Instock
    ISBN-10: 020163497X | ISBN-13: 9780201634976
    Brief Description | Buy from myPearsonStore

  • 0321618092Forensic Discovery
    Farmer & Venema
    © 2005 | Addison-Wesley Professional | On-line Supplement | Estimated Availability: 12/27/2004
    ISBN-10: 0321618092 | ISBN-13: 9780321618092
    URL: http://safari.informit.com


  • 0201563339Gigabit Networking
    Partridge
    © 1994 | Addison-Wesley Professional | Paper; 416 pages | Estimated Availability: 10/30/1993
    ISBN-10: 0201563339 | ISBN-13: 9780201563337
    Brief Description | Buy from myPearsonStore

  • 0201634481Interconnections: Bridges, Routers, Switches, and Internetworking Protocols, 2/E
    Perlman
    © 2000 | Addison-Wesley Professional | Cloth; 560 pages | Instock
    ISBN-10: 0201634481 | ISBN-13: 9780201634488
    Buy from myPearsonStore

  • 0201633620Large-Scale C++ Software Design
    Lakos
    © 1996 | Addison-Wesley Professional | Paper; 896 pages | Instock
    ISBN-10: 0201633620 | ISBN-13: 9780201633627
    Buy from myPearsonStore

  • 020163371XMore Effective C++: 35 New Ways to Improve Your Programs and Designs
    Meyers
    © 1996 | Addison-Wesley Professional | Paper; 336 pages | Instock
    ISBN-10: 020163371X | ISBN-13: 9780201633719
    Buy from myPearsonStore

  • 020161586XThe Practice of Programming
    Kernighan & Pike
    © 1999 | Addison-Wesley Professional | Paper; 288 pages | Instock
    ISBN-10: 020161586X | ISBN-13: 9780201615869
    Brief Description | Buy from myPearsonStore

  • 0201379236STL Tutorial and Reference Guide: C++ Programming with the Standard Template Library, 2/E
    Musser, Derge & Saini
    © 2001 | Addison-Wesley Professional | Cloth; 560 pages | Instock
    ISBN-10: 0201379236 | ISBN-13: 9780201379235
    Brief Description | Buy from myPearsonStore

  • 0201633469TCP/IP Illustrated, Volume 1: The Protocols
    Stevens
    © 1994 | Addison-Wesley Professional | Cloth; 600 pages | Instock
    ISBN-10: 0201633469 | ISBN-13: 9780201633467
    Brief Description | Buy from myPearsonStore

  • 020163354XTCP/IP Illustrated, Volume 2: The Implementation
    Wright & Stevens
    © 1995 | Addison-Wesley Professional | Cloth; 1200 pages | Instock
    ISBN-10: 020163354X | ISBN-13: 9780201633542
    Brief Description | Buy from myPearsonStore

  • 0201634953TCP/IP Illustrated, Volume 3: TCP for Transactions, HTTP, NNTP, and the UNIX® Domain Protocols
    Stevens
    © 1996 | Addison-Wesley Professional | Cloth; 352 pages | Instock
    ISBN-10: 0201634953 | ISBN-13: 9780201634952
    Buy from myPearsonStore

  • 020163337XTcl and the Tk Toolkit
    Ousterhout
    © 1994 | Addison-Wesley Professional | Paper; 480 pages | Out of Stock
    ISBN-10: 020163337X | ISBN-13: 9780201633375
    Brief Description

  • 0201633388UNIX® Systems for Modern Architectures: Symmetric Multiprocessing and Caching for Kernel Programmers
    Schimmel
    © 1994 | Addison-Wesley Professional | Paper; 432 pages | Instock
    ISBN-10: 0201633388 | ISBN-13: 9780201633382
    Brief Description | Buy from myPearsonStore

  • 0131411551Unix Network Programming, Volume 1: The Sockets Networking API, 3/E
    Stevens, Fenner & Rudoff
    © 2004 | Addison-Wesley Professional | Cloth; 1024 pages | Instock
    ISBN-10: 0131411551 | ISBN-13: 9780131411555
    Brief Description | Buy from myPearsonStore

Pearson Higher Education offers special pricing when you choose to package your text with other student resources. If you're interested in creating a cost-saving package for your students, browse our available packages below, or contact your Pearson Higher Education representative to create your own package.



Copyright ©2008 Pearson Education. All rights reserved. Legal Notice | Privacy Policy | Permissions