MathGroup Archive 2005

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

Search the Archive

Re: books on writing packages

  • To: mathgroup at
  • Subject: [mg56690] Re: books on writing packages
  • From: nafod40 <noneya at>
  • Date: Wed, 4 May 2005 00:32:55 -0400 (EDT)
  • Organization: Penn State University, Center for Academic Computing
  • References: <d4v6iu$nsm$> <d57gkh$p6e$>
  • Sender: owner-wri-mathgroup at

David Bailey wrote:
> marlinswin at wrote:
>>I'd like to learn to write my own packages for both research and
>>teaching purposes. Is there any good books or references on package
> Hi,
> David Park probably said it all, but I would just like to emphasise that 
> packages are really only a symbol hiding mechanism. Everything that you 
> can write inside a package can be written without one. The advantages of 
> using one or more packages only really kick in when you have a fair 
> amount of code and several people are working on it. Furthermore, most 
> people start by creating Mathematica code outside a package and package 
> it afterwards. By the time you have written enough working code to need 
> a package, it will probably seem fairly simple to create!

One word of caution is to be careful in using the full glorious power of 
Mathematica's text formatting in creating notebooks that will become 
packages. The 'autopackage' conversion is still incredibly buggy, and 
using such things as colored fonts and italics in your code will cause 
the package to fail in random unrepeatable ways. You'll spend days 
chasing odd bugs. Hair will be pulled. You'll find that simply inserting 
a carriage return or even a single whitespace will magically fix the 
bug...for a moment. Arggh.

Same thing for something as simple as using (* comments *). Make your 
base notebook as plain vanilla as possible.

  • Prev by Date: changing algorithm, finding residuals w/FindFit
  • Next by Date: Re: Reading from a file.
  • Previous by thread: Re: books on writing packages
  • Next by thread: Re: Re: books on writing packages