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.
|Country:||Central African Republic|
|Published (Last):||5 September 2010|
|PDF File Size:||1.53 Mb|
|ePub File Size:||5.48 Mb|
|Price:||Free* [*Free Regsitration Required]|
These holons nkuth submitted to some rigid rules; they perform the “detail” operations which, put together, compose the function of the former luterate. Writing a literate program is a lot more work than writing a normal program. The fewer comments the better. No longer lkterate the English commentary injected into a program have to be hidden in comment delimiters at the top of the file, or under procedure headings, or at the end of lines. However, the syntactic affordances of languages doesn’t really do this justice.
I want functions to be used when a function is really needed. And finally, who ever provides commentary on the theory and design issues behind the code literwte they write the documentation? This type of subroutine is called an “open” subroutine.
Most implementations are incredibly short lived so that it seems futile to optimize the code for understanding literate programmingwhen much less programming experience, comments and help by people who know the code base is liteeate enough. The code section is a form of data reduction in that the section name is a placeholder representing the code contained in that section.
Literate project management can tell you what all these files do, do pre and post compiling options linting, concatenating, minimizing, testing, dev vs production branching, etc. The workflow looks has the following stages – Stage 1.
RobertBlair on Aug 17, You don’t get lirerate Nick – that lump of sand doesn’t understand your code at all. In other words, don’t desperately separate and literate; instead, lisperate!
Of course, other computer scientists have made contributions to the field that are every bit as substantial most notably Edsger Dijkstra, Charles Hoare and Niklaus Wirth.
That is to say, Literate Programming either is a good idea, or it isn’t. Here are some software practices related to program kmuth. But Knuth’s work brings to life the complex mathematical underpinnings of the discipline, and deals with the logistics of programming on all levels, from the conceptual design of solutions to the most intimate details of the machine.
What’s important is that you don’t need any special tools to use this style in your comment if your language is flexible enough. It required a lot of discipline, at lots of levels.
It’s more for the developer or designer that isn’t fluent in the language, but still has to interact with it. Literate programming is just a single technique to be used along with all the other well established software engineering practices.
Basically, if there are any parts of the program that you would describe differently in conversation, ;rogramming it isn’t the same thing. This is a game changer for me. In the ‘improv’ way of making it up as you go along, if you have low skill you output low value. Suppose your business depends on a litdrate. 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.
Don’t take my word for it, see for yourself. After all, who ever documents their programs in the first place!? The subroutine itself may be placed anywhere in the store.
These macros kiterate similar to the algorithms in pseudocode typically used in teaching computer science. The question was “why didn’t? That makes it hard to come up with a sensible system of organization, as we’ll put effort in to enumerate and categorize only to discover that it falls apart. Long procedures are restructuring by folding portions of the code into sections. That’s another story I can tell you about sometime.
Literate programming: Knuth is doing it wrong
Another thing to note, however, is that not only is the code changing too fast, but also that code doesn’t always do what the programmer thinks it does. The style of literate programming combines source code and documentation into a single source file.
I gave a talk on this subject at the WriteTheDocs conference: I find the structure extremely useful to re-discovering how a particular node is configured. In either case please include your postal address, so that I can mail an official certificate of deposit as a token of thanks for any improvements to which you have contributed.
Litearte of writing code containing documentation, the literate programmer writes documentation containing code.