Ron's Week'n'ADAM

October 15, 1997

Rich Drushel's response to my last weeks article provided
satisfying answers and comment. It's true; no man is an island,
although sometimes I wish it wasn't so.  It brings to mind an 
anecdote that was sufficient to convince me that I might be 
better off finding another hobby. I have not written a serious 
line of code since this particular experience, not because I 
didn't want to, but for reasons I'll get to in a moment.

First some background.
In the early days of Ottawa's ADAM User Friendly Group prior 
to 1987 when there was enough membership dues income to pay for 
a regular meeting hall, Guy Cousineau and I used to pull this 
"good-hacker, bad-hacker" routine. It was pretty well always 
unrehearsed and completely spontaneous, and it went something 
like this:
In my role as newsletter editor, President, Chief-Mover-and-
Shaker, and frequently lone contributor, I would publish short 
SmartBASIC routines in each month's issue of our bi-monthly rag.
Sometimes they were a little longer than short, sometimes they 
ran 5 pages. The intent was to have members type these listings 
into their ADAMs thusly adding to their software library and 
their programming knowledge. Some of us continued to believe 
that one of the most effective tools in a study of programming 
is the study of other peoples' work, both good and bad.
It was also our intent to spawn our own programming expertise
by encouraging other members to write programs for publication. 
For a while there was a fair stock of material, some good some 
bad, but all of it instructive in one way or another. I used 
to write a fair number of these 'home cooked' programs myself 
for use in the newsletter and as programming examples. The 
process of causing the computer to do something I had thought
up in the shower was both challenging and satisfying.
On occasion, Guy would cite an example of poor programming
(practice good hacker) in one of my programs already published.
I would put on my 'grim-horrible-person' expression (bad hacker)
and slink off into the corner while Guy straightened us out. It 
provided good meeting content.
In 1987 or thereabouts, one such program drew comment from a
completely unexpected source. A young lad  about 15 had joined
us. He relied on me for rides to meetings since we lived in the 
same part of town.  One night on the way in to an AUFG meeting, 
we were talking about my latest game, ADAM Wars II. It was a 
re-write of something Barry Wilson had distributed earlier, and 
at one point it actually made the NIAD PD list.  At any rate, 
to make a long story even longer, I was having trouble with a
mysterious "Stack Overflow Error" in one particular portion of
this program.  It did all sorts of things including re-write 5 
characters of the VDP character set to provide some box line 
elements I wanted, including it's own not very professional 
looking smartkey routines, and a variety of other tasks assoc-
iated with generation of a pair of random values for dice, mov-
ing a player piece around a game board, and on and on. The end
product worked well enough that I actually earned $25. from 
NIAD in payments. When the "Stack Overflow" thing was happening,
I gave copies of the program listing to a couple of people 
including the young member I was driving to meetings. He was 
into computer science at the high school level and volunteered 
to look at my program.
That was the first time I ever heard the word 'spaghetti' used 
in reference to programming; not just any programming, my 
programming. Out of the mouths of babes! I hurt easily and I 
do not suffer well.  For those of you who don't know, by the 
way, a "Stack Overflow Error" can be generated by the Smart-
BASIC interpreter under circumstances where it can't figure 
out where to return following the execution of a subroutine.
If you've written spaghetti, you've probably left yourself 
wide open to a situation where you jump around within a called 
subroutine to the point where you forget where you were 
supposed to return to when the subroutine eventually ends. 
Clear as mud? A POP statement might fix things up and a total 
re-write with a properly planned flow chart might do even
better.  As mentioned earlier, I haven't written a line since. 
My method was the 'code-now-plan-later-fly-by-the-buttseat' 
school of computer programming.  It was a method that suited 
my purposes at the time. I certainly did have a whole pile of 
fun playing about, and I discovered a whole pile of informa-
tion about what wouldn't work.  Those were the good old days.



