I showed you my source code, pls respond
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.8 KiB

  1. +++
  2. title = "Literate Programming"
  3. author = ["Christopher James Hayward"]
  4. lastmod = 2021-02-01T16:14:03-05:00
  5. draft = false
  6. +++
  7. - Programming paradigm
  8. - Programs expressed in natural language with code snippets
  9. - Produces machine readable code and human readable documentation
  10. ## Introduction {#introduction}
  11. Described in its introduction[^fn:1] as a
  12. > Programming paradigm in which a computer program is given an explanation of its logic in a natural language, such as English, interspersed with snippets of macros and traditional source code, from which compilable source code can be generated.
  13. Knuth describes a **practitioner** in the introduction of his 1984 paper[^fn:1] as
  14. > An essayist concerned with exposition and excellence of style. Someone who carefully selects the name for each variable and describes their meaning. They will strive for a program that is comprehensible because concepts are introduced in a manner best for human understanding.
  15. ## Concept {#concept}
  16. ```text
  17. _____
  18. | | -> Send to Boss
  19. _____ | doc | -> Copy to Team
  20. | | -> Weave -> |_____| -> Copy to Support
  21. | org | _____
  22. |_____| -> Tangle -> | | -> Test on CI
  23. | src | -> Copy to CDN
  24. |_____| -> Send to Customer
  25. ```
  26. Illustrated above we see the process of **weaving** and **tangling** the literate source file, and how each of the produced components is handled respectively.
  27. | File | Description |
  28. |------|------------------------------|
  29. | org | Literate document / file |
  30. | src | Machine readable source code |
  31. | doc | Human readable documentation |
  32. ## Resources {#resources}
  33. [^fn:1]: Knuth, D. E. (1984). Literate Programming. The Computer Journal, 27(2), 97–111. <https://doi.org/10.1093/comjnl/27.2.97>