A Literate Programming Environment For Existing Repositories

Bruce H. Cottman, Ph.D.
Level Up Coding
Published in
7 min readAug 11, 2021

--

Literate programming is a superset of DevOps or Change Integration/Change Deployment (CI/CD). I detail how to implement literate programming by customizing nbdev for existing Github repositories. Example code can be used for other vendor repositories, such as Gitlab and Bitbucket.

Figure 1. The book cover of “Literate Programming” by Donald. Source: Author screenshot.

What is literate programming?

Literate programming is a programming paradigm introduced by Donald Knuth 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 — Wikipedia

Literate programming, as originally conceived, places documentation, code, and test together in one media.

What is nbdev?

nbdev is a library that allows you to develop a python library in Jupyter Notebooks, putting all your code, tests, and documentation in one place. — nbdev project.

--

--

I write my blog utilizing decades of experience in investment, programming, and data science.