3 ms·
Sometimes I do "semi-literate" programming where I don't even bother with the commentary. I just use a tangler so I can write the code in the order I want to
by richard_todd 4y ago
Sometimes I do "semi-literate" programming where I don't even bother with the commentary. I just use a tangler so I can write the code in the order I want to see it. I really think writing in "human-order" and tangling into "compiler-order" is the bigger benefit to the methodology. It stops you from (for example) writing a function just to break up the logic into manageable parts.
- Jtsummers 4y agoI do this when deconstructing (I call it "vivisecting") large under-documented programs. Slurp it into org-mode as one block per file, extract components and reorder. Possibly (usually in my case, but not always) adding documentation and links to other parts of the program. The program is always still in a running state (I tangle and do a git diff to see if anything, excluding the org files, has changed, then build and run if I want the extra confidence). Whether I add documentation or not, I'm able to provide better information locality, especially where information (for language reasons) is spread across files, but also makes logical sense (but not compiler sense) adjacent to each other.
- richard_todd 4y agoYeah the locality is another great point. It's really cool to have a file per major feature, and have interfaces, implementations, and unit tests all in one file co-located. And I do add documentation even in the "semi-literate" case; I just mean I don't worry about the weaver producing a proper-sounding article (since, frankly, I don't expect anyone to ever read it, anyway).