On Thu, 31 Mar 2005, John Ollason wrote:
My main reason for asking the question was to try to find out if there would be any interest in a modern primer, based on GPC, as an introduction to scientific programming. Years ago, with a colleague, we talked of writing a book entitled 'Brute force programming' which was designed for scientists. The design cycle was based on our appreciation of the fact that for our modelling work most of the time was spent on the development of the code, and only a small proportion spent on production running. This meant that we weren't concerned with saving bytes or running efficiently. All we wanted was to get our ideas coded and tested as conveniently (for us) as we could manage. We were teaching ISO Pascal level 0 at the time and thought that this would be the ideal language for our purposes. I am not sure that there is enough interest to make it worthwhile, or indeed, if our irresponsible approach would be valued by the wider programming community.
John O.
Having worked with a fair number of statisticians (I work for one), I've seen more than my share of brute-force programming, though the bulk of it seems to be written in Fortran 77 (being from a CS background, I like my code to be neat and tidy, though I've become more pragmatic over the years). Seems to me that teaching Pascal to engineers, scientists, etc. couldn't possibly be a bad idea (does a lot more than f77 and is much safer than C) and the brute-force approach does have advantages, as long as it's not taken to an extreme (I once rewrote a huge compound if-then-else block running to hundreds of lines as a FOR loop of about 20 lines of code). In Pascal, the brute-force code can at least be written a little more succinctly.
You should, however, make mention of the fact that quick-and-dirty programs sometimes take on a life of their own; in other words, the brute-force code you wrote might be applicable more often than you realized and you might be forced to maintain it.
I think your book idea is good and I wish you luck.
-------------------------| John L. Ries | Salford Systems | Phone: (619)543-8880 x23 | or (435)865-5723 | -------------------------