[KLUG Members] PHP and new scam from Permissioned Media

Adam Williams members@kalamazoolinux.org
31 Oct 2002 05:20:04 -0500


>How do you put together a php script?  

It depends upon the scope of the problem.

>Do you first write it up on paper
>as a flow chart, then name variables and describe what has to be done with
>the variables?  

For large/complex problems even flowcharts get very unwieldy.  UML
provides for entity relationship and use-case diagrams which I
personally find more helpful than "flowcharts" most of the time.

>Then maybe cut and paste from previous scripts (known to
>be working) to start writing code for each individual process?

It is best to write objects for the things you typically need to work
with, and just include them.  Cut-n-pasted code gets *REALLY* hard to
maintain after not-to-long.  Make one conceptual change = must change
the code in ~101 places.... not fun, and you will miss one, or two, or
three.

>I'm sure there is no one right way to do it, everyone probably has their
>own style.

Again, "right" depends largely on the problem at hand.