[Tutor] Lotka-Volterra Model Simulation Questions

Alan Gauld alan.gauld at btinternet.com
Sat Sep 29 11:16:40 CEST 2012


On 29/09/12 09:41, Oscar Benjamin wrote:

>  > so use names that say so, like preyPop and predatorPop
>  > Its only a few extra letters typing but makes things much more readable.
>
> As a mathematician I'd have to disagree with you there Alan. This model
> already has an established notation:

I did say I had no idea about the original algorithm so yes, if the 
variable names are industry standardised and the people working with the 
code are familiar with them then it may be better to stick with them, 
even if nobody else on the planet understands the resultant code.

As to using short names to keep things on a single line, there is a huge 
body of research in Comp Science that shows that meaningful names 
outweigh single line expressions every time in terms of reliability, 
comprehension, ease of maintenance etc. Of course we shouldn't go 
overboard but keeping to a single line is not a good reason, on its own, 
to use single char variable names. Industry standards however
may be...


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/



More information about the Tutor mailing list