Literate programming is a way of developing software where documentation comes first, then the coding. One writes the documentation of a code snippet, and then writes the implementation of the snippet. The visual appearance of the software source code would be a plain document like word, with code paragraphs in it.
I am trying to convert the dev shop I work to use only literate programming, as it brings great advantages to code readability and maintenance. However, due to the lack of tools the LP usage is limited in the company. For example, the ideal way to program literate is to write a paragraph using word markup, and then insert a subparagraph with the implementation. But i cannot seem to find any good tools for VS200x to perform LP with.
Ideally, such a tool would look just like Word 2007, but integrated into the IDE. When the coder sets the cursor on a code paragraph, it would have all the functionality provided just like we have now in our IDE.
What are good tools for LP, with .NET and VS200x in particular?
Literate programming is an approach to programming in which the code is explained using natural language alongside the source code. This is distinct from related practices such as documentation or code comments; there, the code is primary, with commentary and explanation being secondary.
Literate programming is the practice of mixing code and descriptive writing in order to execute and explain a data analysis simultaneously in the same document. The targets package supports literate programming through tight integration with Quarto, R Markdown, and knitr .
A form of literate programming, a Jupyter Notebook allows for the possibility of not only writing code but also inspecting and documenting its results as a piece of writing that is understandable for human beings.
Because most code is in plain text, you can write code using a basic word processor or text editor. However, it is much more effective to use a software application that is specifically designed for coding in a particular language.
Kudos to you for trying to improve the way your team works. As long as you're trying to do that, you have an advantage over those that do not.
I used Literate Programming for a project once. It was really hard, and the results were really good. Seemed like a reasonable tradeoff.
However, today I'd rather take a different approach: instead of prose for humans and code for machines, I'd rather write code that is so clear that humans don't mind reading it. When I feel the urge to write a comment, I think "I could make this code clearer". That means I'm writing less documentation, not more.
Well, good luck with whatever path you choose.
+1 for trying to improve your team's process
-1 for going down a dead-end path
with all due respect to Knuth, unit tests are better than documentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With