Comments on scripts, modeling and Grass

Bernhard Reiter bernhard at uwm.edu
Wed Oct 27 17:26:44 EDT 1999


This is a very interesting discussion, 
I only want to add two things:

	From my perspective, we are should have more structure in this
discussion, because Rich is right about the difference between
algorithms and their implementation. The problem on how to select
the programming language you want to use is a general one and quite
common in computer science. In our discussion we mixed a few issues
that are better treated seperatly. Like modularisation, programming
style and modelling.

	Secondly I want to add to the discussion about programming
languages in generall. Yes, there are better and worse programming languages 
as someone would expect. And the style matters a lot.
A good programmer can use almost any language to write good readable
programs. But it is easier with some languages to do what you want to do.

For that matter a set of modern all purpose "glue" languages
are on the rise. You can use them for everything, but thier main 
advantage is that they can call libraries and other programs and
functions very easily.

Better known languages are:
	perl
	python
	java
	guile (/scheme)


On Wed, Oct 27, 1999 at 11:55:26AM +0100, Agustin Lobo wrote:
> Or if you write a program to calculate an FFT you can use a simple
> input and compare the result to your own computation or to the result
> produced by another FFT program: the result is predictable.  Instead,
> in modeling, the result is not predictable (yet): that's why you make
> the model. Also, you can have a CORRECT result out of a WRONG model:
> the result must be produced by processes that are physically,
> biologically, ecologically... consistent, and this should be assessed
> by other scientists being able to read the code. Which implies a
> simple syntax with, ideally, one action per line.

We have another problem here: How to model.
And yes, the model implementation has to be accessible to other
scientist. I did quite a bit of work in implementing models 
(e.g. CemoS (nonspatial exposure modelling)
http://www.usf.uni-osnabrueck.de/projects/CemoS/CemoS.en.html
and http://www.usf.uni-osnabrueck.de/projects/GREAT-ER/GREAT-ER.html )
and I can tell you that most models are not designed to be that way, 
because they start out as experiements of scientists.
We tried to do better, though.

>  Bernhard Reiter <bernhard at uwm.edu> has a different opinion:
> 
> >This is pretty much a question of style. Good C programs a very readable.
> >(C++ is more difficult.) 
> 
> I think that this could be true for very skilled C "writers" and "readers"
> conforming to the same style (and not only to the same language!). I would
> argue that the time devoted to the programming itself would be of the same
> order of magnitude that the time devoted to think on the processes to be
> modeled. Take the example of writing this message: I can concentrate
> on the idea that I want to communicate and spend a minimum time on the
> language itself (I know, most of you would prefer that I spend more
> time on improving my language..., but you get the idea)

I am talking about the ability to express yourself in a programming
language. But you are right the resulting program for the most part is
the content. That means that a good programming language has to
have the ability to express your mental model fast and accurate.

> Issue 2: Are the scripting languages around convenient alternatives?
Wether you have scripting language or not it not the questions as the
borders are more and more blurring.

[I have not referred to the programming example, as it is very
language specific and there are a lot of details to that discussion. ]

>  Bernhard Reiter <bernhard at uwm.edu>:
> >Perl generally is a greater mess than "C". It is much harder to write
> >good structured programs in perl.

> "Roderick A. Anderson" <raanders at altoplanos.net>:
> >Despite what others may think or say perl is an excellent language for
> >simple to very complex projects.  It is only as obscure as you want it to
> >be. 

True. 
But from the programming language theory and usability studies,
python is a lot better in that respect. 
	http://www.python.org/doc/Comparisons.html
Warning: This is a point where religious wars start.
I am not saying that perl is bad. It is nice, if you can handle it.

> May be we could do the following: use a short model as an example and code
> it in different scripting languages.
 
It would depend on how the integrate with the tast.
Usually you build object-orientated packages to aid such a task.

> ISSUE 3. Are "high level" languages (i.e., Splus (R as free alternative),
> Matlab (Octave as free alternative), IDL ...) adequate for GIS modeling?

Highlevel in this respect means specialisted for one topic.
This is not what you would call a highlevel programming language
among programming languages. :)
The problem with specialisted languages is that they require you to
learn more. 

You could use a "glue" language to drive both.

	Bernhard


-- 
Research Assistant, Geog Dept UM-Milwaukee, USA.    (www.uwm.edu/~bernhard)
Free Software Projects and Consulting 			     (ntevation.de)  
Association for a Free Informational Infrastructure              (ffii.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 288 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-user/attachments/19991027/9de58c53/attachment.bin


More information about the grass-user mailing list