in reply to Re^3: An Introduction to Literate Programming with perlWEB
in thread An Introduction to Literate Programming with perlWEB
Well, this is what I would tell you about words and code:
Unless you're working from a fixed spec (which is more the exception than the rule, I'd say) the API of a module is going to change as you're working on it. If you keep the pod describing what a sub does in the same file as the sub, I think you're much more likely to remember to revise the docs when the API changes.
Further, it's often a very good idea to use some comments throughout the code. The "paragraph style" works well: a "topic sentence" in english, followed by detailed explication in the form of code. Comments at the end of a line of code are good places for things like TODO notes and even hints to perl beginners ("hash slice", "schwartzian transform").
As for things like this:
The code is description of the actual algorithms used and their implementation. And should be the only such description. It cares not for the external abstraction.My personal opinion is that techies really need to watch these kind of religious beliefs -- we're always trying to squeeze the world into these neat, idealized doctrines, but the world always fights back. For example, if you were to take what BrowserUK is saying seriously, you would insist that perlguts should not exist.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: An Introduction to Literate Programming with perlWEB
by BrowserUk (Patriarch) on Jan 20, 2009 at 02:28 UTC | |
by doom (Deacon) on Jan 21, 2009 at 20:17 UTC | |
by BrowserUk (Patriarch) on Jan 22, 2009 at 12:12 UTC |