Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Best practice for Mathematica package development

  • To: mathgroup at smc.vnet.net
  • Subject: [mg77405] Re: Best practice for Mathematica package development
  • From: Andrew Moylan <andrew.j.moylan at gmail.com>
  • Date: Thu, 7 Jun 2007 06:33:11 -0400 (EDT)
  • References: <f43e7d$mv$1@smc.vnet.net><f463fn$p7k$1@smc.vnet.net>

* What's the best way to convert old AutoGeneratedPackage notebooks
into packages in either Workbench or the new package (.m) editor built
into Mathematica 6? Notebook code contains many niceties, like
intelligent spacing of function arguments and automatic indenting,
which are lost when converting to either Workbench or Mathematica 6
package editor documents.

Related question:

* f[x,y] or f[x, y]? Why? The former looks better (when pasted) in
notebooks; the latter looks better in plain text files. Similar
questions hold for indentation etc.


On Jun 6, 8:49 pm, Andrew Moylan <andrew.j.moy... at gmail.com> wrote:
> To elaborate a little more, some of the other particular topics (aside
> from those mentioned in my original post) for which I am interested in
> best practises are:
>
> * layout of .m files in package directories, and why;
>
> * testing (use Eclipse's built-in testing stuff? a separate
> Mathematica notebook? why?);
>
> * uniqueness of exported symbol names (i.e., has this old question
> been resolved satisfactorily yet:http://groups.google.com/group/comp.soft-sys.math.mathematica/browse_...
>
> * long function definitions with (*comments*) inside them versus many
> smaller function definitions with (*comments*) between them; and
>
> * standards for features new to Mathematica 6, like syntax colouring.
>
> On Jun 5, 8:34 pm, Andrew Moylan <andrew.j.moy... at gmail.com> wrote:
>
> > What are the best standards and practices to follow when developing
> > serious Mathematica packages that are intended for many people to use?
> > Is there a handy guide, and/or template .m files, that can be used by
> > prospective package developers?
>
> > In the past I have made packages by allowing Mathematica to
> > automatically generate .m files from a notebook containing the
> > relevant definitions in initialization cells. With the advent of
> > Workbench, I assume this is no longer the best method.
>
> > I am interested in best practices related to managing options,
> > contexts, warnings and errors, interfaces in general, etc. Is there a
> > list of standards adhered to when WRI designs packages?
>
> > Of course I can often see how others have designed packages by reading
> > the .m files in their packages. Are all well-known packages as well-
> > designed as each another? Can anyone recommend a particular package as
> > a good example of how to write packages well?




  • Prev by Date: Re: Best practice for Mathematica package development
  • Next by Date: Re: Antialiasing of 3D graphics
  • Previous by thread: Re: Best practice for Mathematica package development
  • Next by thread: Hold and Simplify