ZX Computings - OpenLibra
ZX Computings - OpenLibra
ZX Computings - OpenLibra
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
writing, the purpose is all too<br />
clear but after a few weeks or<br />
months the memory fades.<br />
4) Is the textual material on<br />
the VDU easy to understand<br />
and pleasantly arranged?<br />
There is no excuse for sloppy<br />
presentation and curt chunks<br />
of computer jargonese<br />
interspersed with<br />
abbreviations. Just because<br />
the computer has no soul or<br />
manners this is no excuse for<br />
omitting the pretence. A little<br />
care taken in presentation will<br />
give the pleasant illusion that<br />
lurking behind the cold<br />
rectangular sheet of glass is a<br />
"being" with a heart of<br />
gold . . . kindly and paternal<br />
when the occasion warrants it<br />
and yet hesitating to deliver<br />
streams of pure vitriol if its<br />
human operator enters silly<br />
figures or presses wrong<br />
buttons. In other words, give<br />
your computer a personality.<br />
Space out the text in a<br />
readable manner, Nothing is<br />
more tiresome than a page full<br />
of closely spaced reading<br />
matter, particularly if it is<br />
composed entirely of capitals.<br />
There is no need to stuff<br />
everything on one VDU page<br />
but never allow the pages to<br />
scroll. Text creeping up from<br />
the bottom and disappearing<br />
at the top should never be<br />
tolerated; it is unpleasant to<br />
read and amateurish.<br />
Expansion<br />
5) Is the program planned<br />
with the idea of future<br />
expansion or improvement in<br />
mind? No program can ever be<br />
perfect and equally true, no<br />
program can ever be<br />
absolutely complete. There<br />
will always be the nagging<br />
doubt, particularly when it is<br />
re-run a few weeks later, that<br />
some extra facility or twist<br />
should have been added. In<br />
many cases however, this can<br />
be a difficult or even<br />
impossible task. In the first<br />
case, the program may be<br />
utterly incomprehensible when<br />
LISTed if several weeks have<br />
elapsed since it was written.<br />
Juggling with obstinate<br />
statements, temper,<br />
frustration and the other<br />
multitude of ills popular during<br />
program construction<br />
eventually leads to a transient<br />
state of euphoria when the<br />
beast finally decides to work.<br />
There is a mad rush to "get it<br />
on to tape" and indulge in a<br />
satisfying bout of selfcongratulation.<br />
It takes a little while to<br />
appreciate the value of the<br />
REM statement because at the<br />
time, it seems unnecessary. In<br />
fact some of us deliberately<br />
leave out remarks in order to<br />
prevent other people<br />
understanding how our<br />
masterpiece works. This<br />
attitude can be selfdestructive<br />
because the writer<br />
of the program may eventually<br />
become the victim. Another<br />
obstacle to future amendment<br />
is a poorly structured original<br />
and close-packed line<br />
numbers. Never start a<br />
program with line number less<br />
than 100 in case some extra<br />
stuff may have to be squeezed<br />
in at the head. Be methodical<br />
in the choice of subroutine line<br />
numbers. Stick them all<br />
together well down the<br />
bottom, say at line 9,000<br />
onwards. In this way, you will<br />
avoid the ugly embarrassment<br />
of having to leap frog over<br />
them with a wasted GOTO<br />
statement when the lines start<br />
to creep down further than the<br />
original estimate allowed.<br />
The term "program<br />
structure" of course means a<br />
lot more than the mere<br />
organisation of line numbers.<br />
Library<br />
It means laying out a program<br />
in neat little modules, each<br />
capable of being individually<br />
tested in its own right. In fact<br />
there is a specific<br />
programming philosophy with<br />
many little rules and<br />
regulations resting beneath<br />
the blanket title of<br />
"STRUCTURED<br />
PROGRAMMING". This is<br />
worth detailed study if only to<br />
know when to break some of<br />
the rules.<br />
Programs To<br />
Write<br />
Advice on what programs to<br />
write is about as difficult as<br />
advising on the best length for<br />
a piece of string. An overall<br />
piece of advice is simply to<br />
walk before you run. Don't<br />
attempt to write wildly<br />
ambitious programs unless<br />
you are quite certain you<br />
understand the full<br />
implications of the task ahead.<br />
Unfortunately, it takes some<br />
experience to know in<br />
advance whether or not a<br />
certain programming task is<br />
likely to be easy or horribly<br />
difficult; computers are odd<br />
things.<br />
For example, if someone<br />
came and asked me to write a ^<br />
program to print out a table of<br />
the singular solutions of a<br />
second order differential<br />
equation I would take the<br />
money in advance and<br />
probably deliver the goods<br />
(suitably tarted up in<br />
accordance with the previous<br />
advice) the next day. This is<br />
not because maths and<br />
physics is my strong point (I<br />
might pass O-level maths with<br />
difficulty) but because the<br />
actual maths details must<br />
reside in some text book<br />
equation somewhere or other.<br />
It would just be a case of<br />
letting the faithful old BASIC<br />
interpreter handle the sordid<br />
details once the correct<br />
sequence of brackets and<br />
operators have been entered<br />
from the text book to the<br />
VDU.<br />
Such programs are<br />
elementary number crunching<br />
exercises, impressive but<br />
routine. On the other hand, a<br />
request for "a little program to<br />
30 <strong>ZX</strong> COMPUTING SUMMER 1962 Z