Donald Knuth. “Literate Programming ()” in Literate Programming. CSLI, , pg. I believe that the time is ripe for significantly better documentation of . 3 Oct Literate programming: Knuth is doing it wrong. Literate programming advocates this: Order your code for others to read, not for the compiler. Literate Programming is also the name of DonKnuth’s book (ISBN One speculation for the reason behind Knuth’s pushing of LP is that according to Stanford’s.
|Published (Last):||7 September 2012|
|PDF File Size:||3.31 Mb|
|ePub File Size:||3.81 Mb|
|Price:||Free* [*Free Regsitration Required]|
Tomash Publishers reprint series, pg. There are various other implementations of the literate programming concept some of them don’t have macros and hence violate Order of human logic proggramming.
Literate programming: Knuth is doing it wrong
literxte Besides providing a documentation tool, CWEB enhances the C language by providing the ability to permute pieces of the program text, so that a large system can be understood entirely in terms of small sections and their local interrelationships. At best, a professor might publish very small routines as examples of how to write a program. Parts of the program that belong together logically should appear near to each other in the description, so that they are visible from the part of the documentation that discusses their function.
Showing of 8 reviews.
The system, pbrt, is written using a programming methodology called literate literaet that mixes prose describing the system with source code that implements it. Overall this book is more of historical value and for people who love Knuth and his work on literate programming. Obviously there should be a clear indication of where pieces of program have been suppressed, and which other program fragments give the detailed specifications of those pieces.
His page report was very philosophical for the first 99 pages, and on page he started with an example.
Production of a book quality program listing. Kmuth a literate program is a lot more work than writing a normal program. The same example was later rewritten for the noweb literate programming tool. Macros in a literate source file are simply title-like or explanatory phrases in a human language that describe human abstractions created while solving the programming problem, and hiding chunks of code or lower-level macros.
Literacy in programming means different things in different circumstances. Generate software requirements and design description see IEEE standards.
From the programming language point of view the most obvious method of identification would be to use identifiers, resulting in a simple system of parameter-less macros, with as only unusual aspect that uses of the macro are allowed to precede the definition, and indeed do so more often than not.
Write a customer review.
The program description should describe parts of the algorithm as they occur in the design process, rather than in the completed program text. Knuth carries that idea forward by one bold, logical step: And we could polish those until Get fast, free shipping with Amazon Prime. Your recently viewed items and featured recommendations. This may seem like a trivial change, but in fact literate programming is quite different from other ways of structuring software systems.
Llterate book on Literate Programming a series of monographs by the author presenting follows in the tradition and do not disappoint the reader who enjoys Knuth.
It is the difference between performing and exposing a magic trick. Process gurus – I hope you’re paying attention. And if you do report an error via email, please do not include attachments of any kind; your message should be readable on brand-X operating systems for loterate values of X. This inverts the premise of JavaDoc and the like, in which human communication is incidental to the code.
Examine source code lliterate lines, complexity, etc. But if you looked at the details Retrieved January 4, The documentation parts of the program description should allow for the same freedom of expression that one would have in an ordinary technical paper.
Journal of Statistical Software. It should be an unusual but not exceptional case when a module contains no documentation.
The literate program should have logical subdivisions. This means that in the course of reading this book, you will read the full implementation of the pbrt rendering system, not just a high-level description of it. The subroutine itself may be placed anywhere in the store. The most obvious and natural way to do this is to suppress the program text for those inner levels, leaving an outline of the outer level, while the inner levels may be specified and documented elsewhere; this is a bit like introducing subroutines for the inner levels, but without the semantic implications that that would have.
There had to be compromises.