emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Seeking advice for conditional code


From: Sebastien Vauban
Subject: Re: [O] Seeking advice for conditional code
Date: Fri, 01 Feb 2013 09:24:55 +0100
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.92 (windows-nt)

Hi François,

François Pinard wrote:
> "Sebastien Vauban"
>
>> For curiosity, why aren't you considering tangling?
>
> Quick half of a reply, I'll revise the rest of your message later.
>
> That would be far too much of a change for the habits of the team, or at
> least, this is how I perceive the equilibrium between developers.

OK, you're not alone on that. This explains that.

All I now write (be it SQL, Bash, AWK scripts or ...) is d'office LP'ed, but I
have the chance to be alone on that. Convincing others may prove to be (too)
difficult.

> Moreover, some of us are not even Emacs users.

That's not a real show-stopper per se, as you could tangle code with markers
(via the "comments" parameter), so that the source code could be directly
edited by anyone, and later untangled (that is, written back in your "full
document").

> When writing a program, the feeling still has to be that we write a
> program, rather than a document describing the program, and from which
> the program could be extracted.  Python is rather descriptive as a
> language, and while comments are useful, they might be less needed than
> in other languages.  This is debatable, of course :-).
>
> The documentation is meant for users, and it was strongly suggested that
> we try to keep the documentation within the program as much as possible,
> as a way to ease keeping the documentation and the program in good
> sync.  Some of us really enjoy Org mode, and this is how came the idea
> of this compromise of writing Python doc-strings using Org.

"My" answer:

    #+begin_quote
    Let us change our traditional attitude to the construction of programs:
    Instead of imagining that our main task is to instruct a computer what to
    do, let us concentrate rather on explaining to human beings what we want a
    computer to do.

    The practitioner of literate programming can be regarded as an essayist,
    whose main concern is with exposition and excellence of style. Such an
    author, with thesaurus in hand, chooses the names of variables carefully
    and explains what each variable means. He or she strives for a program
    that is comprehensible because its concepts have been introduced in an
    order that is best for human understanding, using a mixture of formal and
    informal methods that reinforce each other.

    --- Donald Knuth
    #+end_quote

One important aspect here, is that, with LP, you can present your program in
an order which makes sense for the "story". It can be tangled in a totally
different order.

Best regards,
  Seb

-- 
Sebastien Vauban




reply via email to

[Prev in Thread] Current Thread [Next in Thread]