9 ms·
Your comment illustrates another reason literate programming never took off :-) Until a reader has spent enough time reading and getting familiar with the conve
by svat 8y ago
Your comment illustrates another reason literate programming never took off :-) Until a reader has spent enough time reading and getting familiar with the conventions, how to navigate, etc (in my case it was several dozen hours), they experience a lot of resistance against simply reading the literate program, and keep wanting to read “the real code”.
Ultimately a program is a set of instructions to a computer, and when we as humans look at a program we're trying to conceptualize how these instructions are organized. (Essentially, “translate” them into a mental map.) We have so much more experience doing this with “real” code, knowing what we can ignore and when, and being able to do this at well — e.g. with things like function docstrings or public/private declarations, we're able to read them once and then have them basically fade away from our consciousness so we don't read them again. When faced with unfamiliar conventions, it takes a while to get that ability again.
- javajosh 8y agoPerhaps literate programs shine when they help us build that mental map. One way is positively describing parts of the map with metaphor or intent (where the OP shines). Another way is by discussing alternatives that weren't used. Yes, this can be a lot of content and sometimes crowds out the code, as in this example.