Cover of The Practice of Programming

The Practice of Programming

by Brian W. Kernighan · first published 1999

184mentions
90recommended by
128HN commenters
2007–2026first – last mentioned

70% recommend28% neutral2% critical

Why HN recommends it

Concise, practical advice on everyday programming craft, much like Code Complete but shorter and more compact. Suits working developers and newcomers who want a first read on style, debugging and design.

Summarised by Claude from recommending comments

A compendium of practical matters of importance to working programmers.

Affiliate links. As an Amazon Associate I earn from qualifying purchases.

Mentions per year

130 2007: 1 mention2008: 5 mentions2009: 11 mentions2010: 12 mentions2011: 8 mentions2012: 10 mentions2013: 13 mentions2014: 7 mentions2015: 3 mentions2016: 4 mentions2017: 12 mentions2018: 9 mentions2019: 10 mentions2020: 10 mentions2021: 5 mentions2022: 11 mentions2023: 8 mentions2024: 12 mentions2025: 11 mentions2026: 2 mentions200720172026

What Hacker News says

  • dmitryminkovsky · Mar 22, 2019 · Recommends

    …condone single-stepping through code to find the bug. Reminds me of this quote from the introduction to Log4j docs [0]: > As Brian W. Kernighan and Rob Pike put it in their truly excellent book "The Practice of Programming": >> As personal choice, we tend not to use debuggers beyond getting a stack trace or the value of a variable or two. One reason is that it is easy to get lost in details of complicated data structures…

    on “I Don't Like Debuggers (2000)” ↗
  • msbarnett · Mar 26, 2012 · Recommends

    …reasons as mahmud. You say you don't know of a book "which cover the nuts and bolts in such a thorough way". I can name one that covers almost the same territory: Kernighan and Pike's excellent The Practice of Programming. You could certainly argue that it doesn't cover the same territory in such a "thorough" way, if by thorough we mean "needlessly bloated". The Practice of Programming manages to say, in 288 pages, everything…

    on “Books Programmers Don't Really Read But Recommend” ↗
  • gregjor · Mar 26, 2012 · Recommends

    …Fundamentals of Generic Programming (with James Dehnert) is a masterpiece. I have some favorites that show my age: Software Tools by Kernighan and Plauger. Can be thought of as the poor-man's Dragon book. The Practice Of Programming by Kernighan and Pike. As if the UNIX way needed any defending after almost 40 years. Reliable Software Through Composite Design and Composite/Structured Design by Glenford Myers. You have to get past…

    on “Books Programmers Don't Really Read But Recommend” ↗
  • f00zz · Jul 27, 2020 · Recommends

    In Kernighan and Pike's "The Practice of Programming" there's a chapter that covers the implementation in different languages of a random text generator using markov chains. It's a nice exercise and a lot of fun to play with. I'm guessing that not many…

    on “Are we in an AI Overhang?” ↗
  • NtochkaNzvanova · Jul 17, 2022 · Recommends

    …and Stack Overflow for lists of the best computer science and software engineering books. A few examples that tend to show up on these lists: - Bentley, "Programming Pearls" - Kernighan and Pike, "The Practice of Programming" - McConnell, "Code Complete" - Brooks, "The Mythical Man-Month" - Abelson and Sussman, "Structure and Interpretation of Computer Programs" - Gamma et al., "Design Patterns" - Fowler, "Refactoring"…

    on “Ask HN: Are older programming books useful?” ↗
  • silentbicycle · Sep 9, 2008 · Recommends

    Congrats! If you haven't yet, check out _The Unix Programming Environment_ and _The Practice of Programming_, both by Rob Pike and Brian Kernighan (K of K&R). They're concise, highly informative books about using the Unix toolset to their maximum potential. The former was written back when computers were slow…

    on “Shoestring Budget? Starting to feel growth issues on your back-end? Embrace unix and C” ↗
  • silentbicycle · Sep 29, 2010 · Recommends

    You can't go wrong with any programming books Brian Kernighan co-wrote, really. I have _The ANSI C Programming Language_ ("K&R"), _The Practice of Programming_, _The AWK Programming Language_, and _The Unix Programming Environment_, and they're all great. Concise, with a lot of depth that reveals itself on repeat reading. Ieursalimschy's _Programming in Lua_…

    on “Why you should learn at least a little bit of Awk” ↗
  • binomial · Nov 28, 2010 · Recommends

    …On Lisp Philip Greenspun, Philip and Alex's Guide to Web Publishing Grune and Jacobs, Parsing Techniques: A Practical Guide Daniel Hillis, The Connection Machine Kernighan and Pike, The Practice of Programming Kernighan and Pike, The Unix Programming Environment Kernighan and Plauger, Software Tools in Pascal Donald Knuth, Literate Programming Glenn Krasner (editor), Smalltalk-80: Bits of History,…

    on “Which programming book you just couldn’t stop reading from start to end?” ↗
  • mzs · Apr 30, 2013 · Recommends

    TAOCP Knuth C Programming Language by Kernighan and Ritchie The Practice of Programming Kernighan and Pike

    on “Why SICP Matters” ↗
  • msbarnett · May 28, 2013 · Recommends

    …is a false dichotomy. There are far cleaner ways to achieve portability, and ifdefs are almost always a sign of 'doing it wrong'. See, for example, Kernighan and Pike talking about portability in The Practice of Programming.

    on “Results of the Debian systemd survey” ↗
  • gregjor · Aug 12, 2013 · Recommends

    You can read what Kernighan wrote here: http://books.cat-v.org/computer-science/elements-of-programm... Also see Software Tools and The Practice Of Programming.

    on “Don't Comment Your Code - Write Better Code” ↗
  • ramgp · Dec 28, 2013 · Recommends

    …Remote: Office not Required by Jason Fried & DHH The Art of Unit Testing by Roy Osherove Code Complete 2 by Steve McConnell Refactoring: Improving the Design of Existing Code by Martin Fowler The Practice of Programming by Brian Kernighan & Rob Pike JavaScript: The Good Parts by Douglas Crockford Code Simplicity by Max Kanat-Alexander An Introduction to Programming in Go by Caleb Doxsey at http://www.golang-book.com/…

    on “Ask HN: What book changed your life in 2013?” ↗
  • zenbowman · May 7, 2014 · Recommends

    Agreed. I find the best advice comes from people who have built significant systems that are both complex and innovative for their time. Rob Pike and Dennis Kernighan's The Practice of Programming is one of my favorites for this reason. They tend to recommend solutions that are highly dependent on the problem to be solved. Trying it the other way round, i.e. fitting the problem to an idealized…

    on “I don't love the single responsibility principle” ↗
  • mathnode · Jun 5, 2017 · Recommends

    - The Pragmatic Programmer - The Practice of Programming - The Mythical Man Month - The Cathedral and the Bazaar - The Art of Motorcycle Maintenance - Introduction to Algorithms - Hackers and Painters Some of these do contain mixed language code examples,…

    on “Ask HN: What language-agnostic programming books should I read?” ↗
  • fao_ · Dec 23, 2018 · Recommends

    It sounds like it could be burnout. Nevertheless I de-facto recommend you read "The Practice of Programming" by Pike and Kernighan. I would also you recommend learning how to learn (there is a good coursera course on it), and also I would recommend finding a good course on learning to search for things. The…

    on “Ask HN: Have I lost my skills in programming?” ↗

Keyboard shortcuts

/
Focus search
j / k
Next / previous book
Enter
Open focused book
Esc
Close / go back
g h
Go to Home
g t
Go to Top all-time
g m
Go to Most recommended
g r
Go to Rising
g f
Go to For You
?
Show this help