14

Various books and web pages claim that Ken Thompson said:

"One of my most productive days was throwing away 1000 lines of code."

It's found for instance in The Art of UNIX Programming by Eric S. Raymond, p. 24.

Is there any evidence that Ken Thompson, known for Unix and C, has said or written these words?

19
  • 4
    Why would this be "notable"?? Apr 12, 2019 at 21:42
  • 11
    @DanielRHicks A famous quote attributed to a famous person by multiple sources is not "notable" by your standards?
    – Mark Amery
    Apr 12, 2019 at 21:44
  • 10
    @DanielRHicks If you are a computer programmer, Ken Thompson is REALLY famous. Apr 12, 2019 at 21:48
  • 4
    @BarryHarrison - I'm not a computer programmer any more, having retired a few years back, but I've heard of Mr Thompson, and heard his quote a half-dozen times or so. Further, on days when I deleted a lot of code (probably never 1000 lines in a day, except when simply clearing old files) I found quite cathartic, if not "productive" in the literal sense. Ugly, unnecessary code can be quite a bottleneck to progress in any programming effort, so a good programmer deleting code is in no way exceptional or "notable". It would be like Trump saying "I nominated 3 new cabinet members today." Apr 12, 2019 at 22:00
  • 9
    @DanielRHicks A famous old-school programmer deliberately choosing to characterize deleting lots of code as one of his most productive days is notable precisely because it implies an endorsement of the opinion you give here - that "unnecessary code" is often a burden and that its deletion is often important for progress. That's part of the accepted wisdom of programmers, but is non-obvious to others and is - like most opinions about good software development practice - disputable. I, at least, would find it interesting to know whether Thompson really said it or not.
    – Mark Amery
    Apr 12, 2019 at 22:18

1 Answer 1

11

To answer this question, I started by searching for old internet references of the quote. The oldest confirmed reference of the quote was here on page 68 of the pdf. This pdf is a "public HTML draft" of the book The Art of UNIX Programming by Eric S. Raymond, p. 24.

On pg. 1, the most recent entry in the revision history is listed as "Revision 0.87; 30 June 2003; Kirk McKusick contributed a summation of the BSD lawsuit." Further below by 1 line: "Revision 0.86; 26 June 2003; Cleanup release." And further below by a further 1 line: "Revision 0.85; 24 June 2003; Review and cameos from Ken Thompson."

Assuming that the version of the manuscript is Revision 0.87, Revision 0.85 would have already included the quote as it is unrelated to the "BSD lawsuit" (UNIX System Laboratories, Inc. v. Berkeley Software Design, Inc.) and shouldn't be added as part of a "cleanup." Thus, Ken Thompson reviewed the book when it contained his quote(s; there are two of his quotes in the book). If Ken Thompson had pointed out the quote was misattributed to him, it most likely would have been removed (the dedication reads "To Ken Thompson and Dennis Ritchie, because you inspired me."). Yet, it is still in the book (i.e. wasn't removed) so it is likely the quote is correctly attributed.

@Fizz wrote

My impression is that that book is the origin of the quote. (The other books which contain the quote are more recent). Raymond's book is somewhat authoritative, but still is a pretty new book (from 2003). Either Thompson said it in private... or maybe Raymo[n]d made it up.

The internet search concurs that the quote likely originated with the book. However, the comment introduces the possibility that Thompson said it in private. Looking at Revision 0.66, the description is "Cameo quote from Brian Kernighan. Various minor corrections."

The only quote attributed to Brian Kernighan and unsourced is the following:

On the other hand, the ‘user-friendly’ GUIs of other operating systems have their own problems. Finding the right buttons to push is like playing Adventure: the interfaces are just as burdensome as any Unix command line interface, save that one can in theory find the treasure by sufficient exploration. In Unix, one needs the manual.

For this quote, the earliest web reference was, again, this manuscript. The use of another cameo quote would make it likely that the Ken Thompson quote is also a cameo quote: said to the author in private (possibly during Ken Thompson's review and starting as an offhanded discussion) and kept in the published version.

4
  • I will be very interested if anybody can find Revision 0.85 and Revision 0.84. It might disprove this theory or give it further plausibility. Apr 13, 2019 at 22:41
  • Also, please let me know if the answer seems like a bunch of nonsense or if it is plausible. I would like to see your thoughts and improve the answer. Apr 13, 2019 at 22:44
  • 1
    Nice dig. Only made possible because the revision log was public
    – Fizz
    Apr 14, 2019 at 6:01
  • @Fizz Thanks. And yes, I agree. Without access to old revisions, this can't be answered. Apr 14, 2019 at 6:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .