[REBOL] Re: Problem Solving (was: Autogenerating TOC)
From: jelinem1::nationwide::com at: 17-Nov-2000 10:08
In the usually simple tasks I give to REBOL, I've found that more often
than not it helps to start writing the code backwards - that is, write the
function first, the one that will actually write the HTML pages.
Forget about the mechanics of reading in the directories and filenames, and
think instead of the most convenient form (ie data structures) you would
like the information when you create the HTML pages. Make this a
parameter(s) to the output function. THEN your main function will be about
reading in the data and populating this desired data structure.
In other words, I've found it helpful to break a simple task (such as
yours) into two stages: reading the data into a REBOL structure, then
writing the data out from this structure. I don't even try to combine these
two steps anymore. It's faster just to separate these two things from the
- Michael Jelinek