POV-Ray : Newsgroups : povray.advanced-users : A point on programming : Re: A point on programming Server Time
30 Jul 2024 12:31:36 EDT (-0400)
  Re: A point on programming  
From: Matt Giwer
Date: 10 Aug 1999 07:05:51
Message: <37B0079B.613E0D39@giwersworld.org>
Nieminen Mika wrote:

> Matt Giwer <mgi### [at] giwersworldorg> wrote:
> :       As another point, there is no reason to put a routine outside of
> : your loop as a macro unless there is a conditional inside your
> : loop to do to different macros.

>   There is one important (and sufficient) reason: Modularity.
>   Dividing your code into small modules (even if you use that module in
> only one place in your main code) will save you from lots of trouble if
> your code grows quite big. It also makes it easier to modify your code
> afterwards (specially if you use the module in more than one place but
> also if you only use it in one place, since you can find it more easyly).

	I would not disagree in the least. I was attempting to point out
to people who are not into programming and do not want to get
into programming that some things they see in scene files are not
the only way or the easiest way to do things. 

	What got my attention was the comment that introduced a separate
#MACRO outside of a loop when he is just asking how to do a
#WHILE. Modularity, reusability, transportability, encapsulation
are all good ideas for people into programming. And anyone
learning programming needs be indoctrinated early. 

	But they are also taught step by step and preferably not
introduced to a new concept until they have half an idea of how
it will help them. 

	My intent was to point out that it does not have to be as
complicated as some people were making it sound in their replies.
I was addressing keeping the answer simple. Not to make the
answer more complicated than the person needs to do the project.
Once successful in simple projects, then add the more advanced
material.


Post a reply to this message


Attachments:
Download 'us-ascii' (1 KB)

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.