Skip to content
Paperback Literate Programming Book

ISBN: 0937073806

ISBN13: 9780937073803

Literate Programming

Select Format

Select Condition ThriftBooks Help Icon

Recommended

Format: Paperback

Condition: Very Good

$39.59
Almost Gone, Only 2 Left!

Book Overview

This anthology of essays from Donald Knuth, "the father of computer science," and the inventor of literate programming includes early essays on related topics such as structured programming, as well as The Computer Journal article that launched literate programming itself. Many examples are given, including excerpts from the programs for TeX and METAFONT. The final essay is an example of CWEB, a system for literate programming in C and related...

Customer Reviews

4 ratings

A book of historial value

This book is a collection of articles Prof. Knuth wrote about programming. He promoted a particular programming methodology called "literate programming", which weaves comments into codes and make them more readable and easier to maintain. This book was published in 1992, but Chapter 4, "Literate Programming", was originally published in 1984, which was an idea way ahead of his time (JavaDoc was first released in 1998, 12 years after the Knuth's article). Chapter one is Knuth's Turing Award lecture and still worth reading for his view on why programming is an art. I was wrongly impressed that Knuth is a very theoretical people and doesn't do much programming. As you would discover from these lecture and other articles in the book, he indeed did a lot of programming and arguably in a very clever and beautiful way, "the program of which I personally am most pleases and proud is a compiler I once wrote for a primitive minicomputer that had only 4096 words of memory, 16 bites per word (pg. 10)." The discussion about the "goto" statement in Chapter 3 is not relevant in today's programming and computer environment. The last few chapters are more like manuals of the WEB and CWEB programs (C version of WEB), which are the programs generating documents and source codes. These manuals may not interest readers unless they are well motivated to write program "literally." One gem should not be missed is is Chapter 10, "The Errors of TeX" (and the accompanying Chapter 11, "The Error Log of TeX). Seeing how Prof. Knuth meticulously documented all of his bugs in TeX is just amazing. Overall this book is more of historical value and for people who love Knuth and his work on literate programming.

A fundamentally new view of programming.

This book is the only one that I can say has truly changed my view of software development.The premise of this book matches my experience: technical communication with people is critical, and harder than communicating with the machines. Knuth carries that idea forward by one bold, logical step: in Literate Programming (LP), the main goal is to get technical ideas across to people. Programs are a co-product of the description process. This inverts the premise of JavaDoc and the like, in which human communication is incidental to the code.A literate program, by the way, reads like a standard human document, whether an essay or an IEEE standard specification. JavaDoc output reads like an HTML dump of a cross-linked tree data structure - which it is. JavaDoc serves a valuable purpose, but does not permit system description in the order required by human reasoning.My own experience with LP (a custom system) was very happy - I actually reached the "impossible" goal of true requirements traceability. I unified the system requirements, design, multi-language implementation, configuration control, and even tests under one document set. With HTML output, traceability was made real using interactive links. Anywhere else, traceability is mostly wishful thinking shared by the many owners of physically disconnected documents. (Process gurus - I hope you're paying attention.)LP practice, however, has not caught on. LP, in today's form, does not support programming in the large. What LP does to the compilable form of a program brings C++ name-mangling to mind. I don't know of any WYSIWYG LP systems, so today's window-icon-mouse-pointer (WIMP) programmers will have nothing to do with it. And, ironically, the people who need the most support in communicating with their peers are the ones most resistant to tools for effective communication.It's a grand vision and an exciting experiment. LP deserves more attention.

Arguing for an aesthetic appreciation of programming

Writing computer programs is easy, writing programs that are useful is hard and writing programs that are very useful as well as correct sometimes seems impossible. Knuth takes this truism even further and offers up the radical notion that the very best programs are so profound that people will one day read them as one would a piece of classic literature. If the idea of curling up by the fire with a copy of The World's Greatest Programs and spending the night in a state of rapture seems absurd, you think as I did. However, after reading this book, my mind now concedes the possibility does exist. After all, most of the great works of literature describe actions, conditions and solutions (algorithms) to problems of human-human and sometimes human-god interactions. Science fiction writers and readers have known for a long time that computers are very interesting objects. Buildings, paintings or other works of art are often admired not only for their subjective beauty, but also for the talent that it took to create them. Programming ability can be admired just as easily. However, an extremely large technical barrier exists, in that programming languages are literal, terse and lack flair. Knuth works to eliminate this problem by combining the programming and documentation languages into a structure called a WEB. He also adopts the reverse paradigm that a program should be an explanation to humans of what the computer is doing. The result does wonders for readability and introduces a bit of flair. Certainly, this is a good first step towards Knuth's ideal. The development of TEX is chronicled in great detail. It is personally comforting to read about some of the errors made in its development. Learning that the great ones make errors provides emotional security to all who hack for fun and/or profit. Some classic programming problems are used to demonstrate exactly what literate programming is meant to be. Jon Bentley, author of the `Programming Pearls' section of "Communications of the ACM", contributes two chapters that were co-authored with Donald Knuth. These pearls demonstrate the applications of literate programming to common coding problems. All are presented in a clear, easy-to-understand style. A bit of clever humor is also used. A WEB program is constructed from two distinct components. The Weave part explains what the program is doing, and the Tangle component produces the program. Of course, this suggests the line from Sir Walter Scott's poem Marmion, "O what a tangled web we weave, when first we practice to deceive." I do not know whether to consider this book the product of a dreamer or a visionary. The truth, like most of the work of pioneers, is no doubt somewhere in between. My opinion is that it is more vision than dream. And is that not a common theme among the greatest works of art and literature? Published in Mathematics and Computer Education, reprinted with permission.

Articles related to literate programming.

Excellent analysis of control structures in the classic article "Structured Programming with goto Statements." Invents the literate programming style of program documentation. Convincingly demonstrates the literate programming style with six example programs. Includes an independent program criticism and an error log. Highly recommended.
Copyright © 2023 Thriftbooks.com Terms of Use | Privacy Policy | Do Not Sell/Share My Personal Information | Cookie Policy | Cookie Preferences | Accessibility Statement
ThriftBooks® and the ThriftBooks® logo are registered trademarks of Thrift Books Global, LLC
GoDaddy Verified and Secured