Re: books on writing packages
- To: mathgroup at smc.vnet.net
- Subject: [mg56690] Re: books on writing packages
- From: nafod40 <noneya at business.com>
- Date: Wed, 4 May 2005 00:32:55 -0400 (EDT)
- Organization: Penn State University, Center for Academic Computing
- References: <d4v6iu$nsm$1@smc.vnet.net> <d57gkh$p6e$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
David Bailey wrote: > marlinswin at gmail.com 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 >>authoring? > 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.