> > Peter, I appreciate your comments about subroutines, but calling a
> > subroutine for a one line function just isn't efficient. An awful lot of
> > the functions I see in programs are one or two liners that are not
> > available in other languages. Knowledge is more readily transportable
> I think a useful subroutine could be a standarized way to pack in
> the same cookie more than one value and then retrieve them
> putting the values in the right variable (but most scripting language
> are untyped) + some nice thing like generating an unique code to
> recognize visitors... but this approach is valuable only if you have to
> write more than 100 line. Programming books teach you that it's
> very difficult to manage bunch of code longer than 35 lines. Of
> course 35 could be my limit while your could be 50 but I think that
> evryone has a limit so we need subroutine.
There are many methodologies. One that I learned was to structure
your code into three to four layers.
Top: Descriptive, broad areas of activity
In interactive programs, often the main loop
Middle: Sequences of actions for each major area
Low: Detailed steps of actions
Utility: Support routines
This shop had unwritten rules AGAINST documenting the code with
comments in the code. They firmly believed that if the code was written in
a clear and lucid manner, it would be easier to follow than comments. I
disagreed, and added a lot of comments to the code I worked on. However,
that general thrust to write clear and lucid code, was indeed a goal
worthy of considerable effort. For when you can clearly describe it in
your mind before you start, it is far more likely to actually work.
[EMAIL PROTECTED] ------------------ [EMAIL PROTECTED]
----------------------- IMAGINEERING --------------------------
--- Have you analyzed your viewer's footprints in the logs? ---
--- Webmaster's Resources: http://www.mall-net.com/webcons/ ---
--- Web Imagineering -- Architecture to Programming CGI-BIN ---
---------------------------------------------------------------
____________________________________________________________________
--------------------------------------------------------------------
Join The Web Consultants Association : Register on our web site Now
Web Consultants Web Site : http://just4u.com/webconsultants
If you lose the instructions All subscription/unsubscribing can be done
directly from our website for all our lists.
---------------------------------------------------------------------