Chapter 0: General Notes

Section 0: General Notes

About the programs

Like other aspects of the exposition in this book, I have gone to considerable effort to make the programs in these notes as clear and concise as possible. And I believe the final programs will be useful both to execute, and to read and study—if necessary without a computer. Most of the programs involve only built-in Mathematica functions, and so can be run in Mathematica without setting up any further definitions. (Many programs nevertheless contain variables that need to be assigned their values before the programs are run—as can be done for example with Block[{k = 2}, program]. When subsidiary functions are used, these functions also typically need to be defined before the programs are run—even though in these notes I often show the necessary definitions after the programs. Note that most of the programs do not explicitly do input checking or error generation. Only occasionally do the programs significantly sacrifice efficiency for elegance.) A good first step in understanding any program is to run it on a few inputs. The symbolic character of the Mathematica language also allows programs to be taken apart, so that their pieces can be run and analyzed separately. Careful study of the various programs in these notes should provide good background not only for implementing what I discuss in the book, but also for doing high-level programming of any kind. Many of the programs use several of the programming paradigms available in Mathematica—making it essentially impossible to capture their essence in any lower-level language. Note that a given program can essentially always be written in Mathematica in many different ways—though often other ways end up being vastly longer than the ones presented here. Material about the programs should be available at the book website—including for example some of the automated tests run to check the programs, as well as annotations about how the programs work.

Image Source Notebooks:

From Stephen Wolfram: A New Kind of Science [citation]