5 ms·
This is a fantastic article. I've been wanting to write an article like this and Justin Worthe did a better job at describing org-mode and Literate Programming
by jf 8y ago
This is a fantastic article. I've been wanting to write an article like this and Justin Worthe did a better job at describing org-mode and Literate Programming than I could have.
For my part, I've written at least 3 "non trivial" literate programs using org-babel and describe them here: https://gist.github.com/jpf/d71453f535065a0d9281672152541386 https://gist.github.com/jpf/d71453f535065a0d9281672152541386
I should mention that one of my "dirty secrets" of writing literate programs is that I always start with an "illiterate" program, tweaking, changing and updating as I go along. Then, once it's something I'm ready to "chisel in stone" I start converting the code into a literate document.
I do this by checking all of my code into Git, then re-create the code inside of org-mode. Every time I "tangle" from org-babel, I do a "git diff" and make sure that I haven't changed the code by documenting it.
I do this because, while it's easy to make changes to a literate program, but it's harder to do a major refactor.