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 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.

Author: Barisar Kinos
Country: Russian Federation
Language: English (Spanish)
Genre: Sex
Published (Last): 7 February 2015
Pages: 115
PDF File Size: 5.46 Mb
ePub File Size: 5.28 Mb
ISBN: 207-5-14683-401-4
Downloads: 40274
Price: Free* [*Free Regsitration Required]
Uploader: Arashijar

Often a complex parser program is needed to re-arrange the code into computer acceptable form — such is the case of Knuth’s WEB. But if you looked at the details Suppose you need to change it And with it, our humanity and ability to be subtly manipulated by forces beyond our comprehension and below our level of conscious perception! You don’t have to define or even declare functions before their first use in the file, you can easily extract any part of the code into a function or method and you can place it anywhere you want.

This is because to understand the code you need to know the context it was written in. Often, some of the subtleties of an algorithm can be unclear or hidden until it is implemented, so seeing an actual implementation is a good way to acquire a solid understanding of that algorithm’s details. We use rubocop to ensure that methods are short and simple, and every such method that is public is accompanied by a tomdoc section.

If you found that you couldn’t quite fit what was needed into something, the design needed revisiting. And I assumed that you do it anyway, because there’s no real downside for this in many languages.


If your source code files, version control commits, code review comments on those commits, and bug discussion threads are all cross-referenced in a unified Web interface, many problems just go away. This means that it should be possible to rearrange program text with respect to the order in which it will be orogramming to the computer, for otherwise the parts that deal with the actions at the outer level of a subroutine will be pushed apart by the pieces ilterate the details of inner levels.

Kntuh had heard rumors about my work and he wrote to Stanford suggesting that I keep publication in mind.

Knuth: Literate Programming

I had a discussion with him in approximately ; I’m trying to remember the exact time, maybeyes,perhaps when I visited Newcastle? Document source code using an API documentation standard doxygen. I played with literate programming for a bit and I had a similar experience: This type of subroutine is called an “open” subroutine. In the first style, the program, stripping away documentation, is pretty much a working code as is. I had learned from a Belgian man I had literage him a few years earlier, someone from Liegeand he had a system-it’s explained in my paper on literate programming.

Especially the last point in parentheses is crucial: This neologism is from Greek “holos”, i. Literate programming is really valuable but you only understand that once you really try it.

Consider it to be the standard of excellence that you expect from a professional programmer.

This book received the Productivity Award from Computer Language magazine,awarded to products that significantly increase programmer productivity. He sent me a report, which was pages long, about his system-it was inspired by “The Ghost in the Machine”.

The effect of this simple shift of emphasis can be so profound as to change one’s whole approach to programming. But there are no such constraints on prose. A bad product will threaten the existence of an organization. It sounds very much like an intellectual over experiential persuit.


Ask HN: Why did literate programming not catch on? | Hacker News

He would pick a handful of requirements, and would then ask to see the complete chain from there; the breakdown of requirements from their level to the more functional level, the design that purported to meet those literare, the code that implemented that design, the tests of that code, and then the tests of the original top-level requirements.

Don’t take my word for it, see for yourself. That’s probably the biggest weakness of literate programming: There had to be compromises.

The documentation parts of the program description should allow for the same programing of expression that one would have in an ordinary technical paper. The difficulty comes from attempting to solve ill-specified or constantly changing requirements by glueing together a constantly changing set of frameworks and tools.

The Art of Donald E.

Literate programming

Actually, literate programming uses a method that differs from this only trivially from a formal standpoint, but has programming great advantage in practical terms: The LP work or the program? That example was the key to me for this idea of thinking of a program as hypertext, as we would now say it.

Numbers like P68 and Q78 in this list refer to the corresponding papers in my list of publications. In fact it has me contemplating whether I should attempt something similar for my code base.