Simulating Ecological and Evolutionary Systems in C.

Will Wilson. Cambridge University Press, Cambridge. 2000. Pp. 301. Price £18.95, paperback. ISBN 0 521 77658 9.

What is not clear from the title of this book is that it tries to act as a guide to learning C, building from quite simple concepts in the early chapters – ‘while’ loops, ‘if’ statements and simple mathematical operators – to more powerful features of C such as pointers, structures, headers and arrays. I don’t know how many times a student or colleague has expressed a desire to learn some programming, or frustration that they can’t try out a simple idea with a few lines of code. These potential programmers will be very interested by this book because instead of being subjected to exercises matching names of cats with their owners in order to learn the language, the examples are all biological and right from the start you feel that your code is doing something interesting.

I am sure that C is the right programming language to learn for most theoretical biologists, considering the investment of time. It might not be the most modern of languages but it is very widely available, excellent at the number crunching characteristic of ecological modelling, is compatible (mostly) with C ++ to give access to visual programming packages and object orientation, and is quicker than Java.

Wilson uses a Unix environment to execute his C code and some things, usually well flagged, will be specific to Unix systems, or less useful if you are using a PC environment. One example is that quite a few pages are dedicated to explaining how to write PostScript files. This is quite a good method if you don’t have access to a graphics package to visualise your results but in the context of this book I felt it was not really appropriate.

Other aspects of the book should be applauded. The discussion on the use of random numbers is extensive and vital. Any model with a stochastic element must have a good random number generator or the results are meaningless. This is very well illustrated by using three different random number generators in the same simple model when the short repeat cycle in the numbers from the weakest random number function is exposed. At the end of each chapter there is a useful set of exercises to carry out. Often these take the form of ideas to expand the program, collect more data or add a new twist.

There is a heavy bias to ecological rather than evolutionary systems, although there is a whole chapter dedicated to two models on the maintenance of gynodioecy. In the absence of a book devoted to evolutionary modelling or population genetics, I think this volume is going to give anyone using it ideas, even if they don’t have a strong interest in ecology.

My biggest criticism with the book is the very large content of maths. In the introduction the author makes it clear that the book grew from a taught course from which students without a strong background in maths were excluded. Be warned, if you don’t have a good grasp of mathematics at a high level the discussions of the results of the simulation models and many of the rationales for using particular approaches will be indecipherable to you.

I am certain that this book will sell well and if used as a companion to another C programming book will be useful to many. However, it is not helpful enough to be used as a course in C on its own and with the very heavy maths content I suspect that only the dedicated or the maths graduate will work through to the end.