LITERATE PROGRAMMING KNUTH PDF

Donald Knuth. “Literate Programming ()” in Literate Programming. CSLI, , pg. I believe that the time is ripe for significantly better documentation of . Literate programming: Knuth is doing it wrong. Literate programming advocates this: Order your code for others to read, not for the compiler. Literate. What is Literate programming? Literate programming is a style of programming invented by Donald Knuth, where the main idea is that a program’s .

Author: Nikogami Voran
Country: Egypt
Language: English (Spanish)
Genre: Travel
Published (Last): 20 May 2011
Pages: 338
PDF File Size: 7.85 Mb
ePub File Size: 20.6 Mb
ISBN: 733-1-51824-983-9
Downloads: 80908
Price: Free* [*Free Regsitration Required]
Uploader: Zulumi

Then when I started writing TeX in this period I began the implementation of TeX in October ofand I finished it in May 78it was consciously done with structured programming ideas. The following snippet of the wc literate program [11] shows how arbitrary descriptive phrases in a natural language are used in a literate program to create macros, which act as new “operators” in the literate programming language, and hide chunks of code or other macros.

Obviously there should be a clear indication of where pieces prorgamming program have been suppressed, and which other program fragments give the detailed specifications of those pieces. While it is not. A holon is a “part of a whole”. Then, to understand the complicated whole, litdrate you needed is just to understand the small parts, and to understand the relationship between those parts and their neighbors.

At that time, we had about 25 people in our group that would meet every Friday.

Knuth: Literate Programming

The CWEAVE program is so named because it takes a given web and intertwines the TeX and C portions contained in each section, then it knits the whole fabric into a structured document. Literate programming LP tools are used to obtain two representations from a literate source file: Literate programming is not a documentation system per ce, it’s a programming paradigm. To document nkuth a program we want to explain each individual part of the web and how it literqte to its neighbors.

Hanson demonstrates that “literate programming” is ;rogramming viable approach to creating works of craft as well as works of art.

  API 579-2 PDF

The meta-language capabilities of literate programming are also claimed to facilitate thinking, giving a higher “bird’s eye view” of the code and increasing the number of concepts the mind can successfully retain and process. WEB utilizes the TeX document compiler, which includes a typesetting command language capable of tremendous control over document appearance.

Production of a book quality program listing. A Survey,pg. The subroutine itself may be placed anywhere in the store. At least one of these three parts must be non-null. Then we had a student at Stanford whose name was Zabala-actually he’s from Spain and he has two names-but we call him Inaki; Ignacio is his name. Implement automated unit testing which is also a form of documentation.

The grand totals must be initialized to zero at the beginning of the program.

Literate programming

Literate programming is useful for programs of all sizes. Second, the language provides a mechanism for presenting program code to the reader in an entirely different order than it is supplied to the compiler. This book is an anthology of essays including my early papers on related topics such as structured programming, as well as the article in The Computer Journal that launched Literate Programming itself. Besides demonstrating the techniques of clear, efficient coding, Knuth has sought to bring a deeper sense of aesthetics to the discipline.

And I showed that to Tony Hoare and to several other people, especially Luis Trabb Pardo, and got some feedback from them on the ideas and the format. These arbitrary explanatory phrases become precise new operators, created on the fly by the programmer, forming a meta-language on top of the underlying programming language. High quality documentation facilitates program modification with fewer conceptual errors and resultant defects.

In literate programming the emphasis is reversed.

litearte For example, suppose that you want to define something like Knuth also claims that literate programming provides a progrmming documentation system, which is not an add-on, but is grown naturally in the process of exposition of one’s thoughts during a program’s creation.

  APPUNTI DI TEORIA DEI LINGUAGGI FORMALI SEMERARO PDF

Keep it simple and straight forward as much as possible. We believe that the literate programming approach is a valuable way to introduce ideas in computer graphics and computer litefate in general. Actually, literate programming uses a method that differs from this only trivially from a formal standpoint, but has a great advantage in practical terms: Literate programming is very often misunderstood [9] to refer only to formatted documentation produced from a common file with both source code and comments — which is properly called documentation generation — or to voluminous commentaries included with code.

Each of these disciplines can materially improve programmer productivity and the quality of code produced.

Literate programming macros can hide any chunk of code behind themselves, and be used inside any low-level machine language operators, often inside logical operators such as ” if “, ” while ” or ” case “.

Webarchive template wayback links Wikipedia articles needing clarification from September CS1 errors: You totally missed the idea, and in the case of blind leading the blind quote scores of other misreaders. Literate programming is a methodology that combines a programming language with a documentation language, thereby making programs more robust, more portable, more easily maintained, and arguably more fun to write than programs that are written only in a high-level language.

The knthvolume Progrmaming of his 5-volume Computers and Typesetting. I use the following list of requirements to imply a definition of a literate program and the minimum set of tools which are needed to prepare, use, and study the resulting code. In I wrote my first structured program; it was fairly good sized-maybe, I don’t pfogramming, 50, lines of code, something like literats.

Establish structures, processes, and outcomes see Luke Holman. Journal of Statistical Software.