Re: books on writing packages

*To*: mathgroup at smc.vnet.net*Subject*: [mg56759] Re: books on writing packages*From*: AES <siegman at stanford.edu>*Date*: Thu, 5 May 2005 06:02:03 -0400 (EDT)*Organization*: Stanford University*References*: <d59keo$6ce$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

In article <d59keo$6ce$1 at smc.vnet.net>, "David Park" <djmp at earthlink.net> wrote: > When working on some subject, I always organize my notebooks in Sections > (always using Automatic Grouping!) My first Section is an Initialization > section. My second Section is always a Routines section. As I write routines > I gather them in the Routines section (and write usage messages for them). > Sometimes, if I have multiple notebooks, I copy the Routines section from > notebook to notebook. After a while, I pick out the routines that seem > really general and useful and move them to a package. > > So simply by organizing your notebooks in a sensible way (i.e., the default > way that WRI has set up for us) it is easy to build up routines and > transistion to packages. > > David Park Agreed, this is the sensible way to do this, and how I generally do it. But two gripes about the result: 1) In PhD dissertations, journal papers, books, reports, the (sometimes lengthy) "Routines" are most commonly are sent to the end, e.g. are stuck in Appendices, and the Initialization (or Introduction) section is immediately followed by the important (to the reader) sections such as Calculations and Results. Among other things that lets you easily select and print the Introduction, the Calculations and the Results to toss in a file folder or (three-hole-type) notebook, leaving off the lengthy Routines stuff. Mathematica doesn't make it easy to organize its notebooks that way. 2) In my (limited) experience if I use Automatic Grouping and try to close groups to see only the section headings (to get an overview of the notebook structure and faster scrolling to , this doesn't work right (i.e., the way I want it!) unless the cell structure is strictly hierarchical. E.g., if I have repeated cell sequences in the form Section Text (a few paragraphs introducing the section) Subsection Subsection closing these groups so I'll see just the Section headings does not close the Text cells, although it does close the Subsections (maybe I'm not doing things right?). Also, closing the Routines section, then running the notebook from the top (to get a fresh start) opens the Routines section, doesn't it?