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: Gokree Nazuru
Country: Benin
Language: English (Spanish)
Genre: Personal Growth
Published (Last): 25 December 2015
Pages: 420
PDF File Size: 13.17 Mb
ePub File Size: 19.74 Mb
ISBN: 926-9-93298-188-2
Downloads: 1239
Price: Free* [*Free Regsitration Required]
Uploader: Guk

EliRivers on Aug 16, My previous employer a subdivision of a global top ten defence company used literate programming.

So even if you need to change your software rapidly, you change your code and docs together. I tried using “Leo”, an outlining and literate programming text editor, for a project. It makes many people never even consider LP.

When I open a foreign code base, I have a hard time knowing where to start. But then I also realized how much need there was for examples of good-sized programs, that could be considered as reasonable models, not just small programs.


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

That stack is a mess and we need organization for it. These macros are similar to the algorithms in pseudocode typically used in teaching computer science. It was generally written correctly at the first iteration; the “literate” bit, which was the discussion of design etc. If your code is “self documenting” then you don’t know what documentation is.

There should be no restrictions on the order in which the program fragments resulting from this decomposition are presented, so that this order can be chosen so as to obtain an optimal exposition; this may even involve bringing together fragments whose location in the actual program is quite unrelated, but which have some logical connection.


These were sections of proper prose going above each chunk at the bottom level, chunks were pretty small and modular.

Schulte, Eric January The general problem with documentation is that it gets out of date as the software evolves to fit new requirements. Many projects, especially small projects by which I mean less than a year from initial ideas to having something in the hands of customers in which the final product simply isn’t known in advance and thus any design is expected to change, a lot, quickly are probably not suited – the extra drag literate programming would put on it would lengthen the time of iterative periods.

Keep it simple and straight forward as much as possible. Your mention of commit messages resonates strongly with my own professional experiences, and I’m sure with many others’ as well. If Microsoft had made source files XML, tens of thousands of programmers would already be putting pictures and hyperlinks in their code.

My original idea was that WEB would be merely a tool for documentation, but I actually found that my WEB programs were better than the programs I had been writing in other languages. A traditional computer program consists of a text file containing program code.

IDE’s are probably the best middle ground, as they “know” enough about your code to help you find the proggramming you want. The only thing worse than a big system with no documentation is a big system with documentation that is full of lies and untruths. Looking back on it now, I have a style that can more naturally accommodate a literary programming approach because I’m more likely to write a straight-line solution first. A couple of examples: The fundamental elements kbuth any computer program are, perhaps not surprisingly, time and space.


Literate programming

It also made debugging a lot easier. That works great for TeX, which hasn’t changed significantly since I’ve been liking how Visual Studio’s CodeLens now available in cheaper SKUs in brings focus to commit history specific to logical units progrzmming the code methods and classes.

The only time anyone looked directly at the source code was to check that the munging was working properly, and when debugging; there was no point working directly on a source code file, of course, because the next time you munged the literate text the source code would be newly written from that. In other words, don’t desperately separate and literate; instead, lisperate!

But if programmlng looked at the details They should just learn how to write ok – not great, just ok – prose and get it over with. Computer programming, by contrast, is so explicit and obvious.

Cheaper, no – with LP learning a new codebase takes much less time than usual. It is also a downside.