Scor­pio News


January–March 1987 – Volume 1. Issue 1

Page 45 of 63

Putting on the Style by P.D. Coker

of the more grisly aspects of computing is to read some of the glos ngazines sold for the profit of the publishers and the edification(!) of the Users of plastic box computers. Apart from the ada , the program listing often so dreadfully or denrely printed in minuscule type that it isa business trying either to read them or (worse) type them in. Hulti-statement Tinee up to 250 or vo characters in length do Little for one’s understanding of program logic!

Quite « number of commercially published programs appear to have been written in Such # way that only the gost dedicated hacker’ will try to disentangle the program logic – the reason being to discourage the phanton fiddler; such Eschniques are co be deplored as ave prograns wich are Inadequacely documented

There axe four basic properties that any computer program should have, dless of whether it’ig to be offered for sale, placed in the public domin fed by the originator for his own purposes.

1 Te should be Logically constructed ble (Le, able to run without a

great deal of modification on many

yor aa

Tt should be easy to follow and well documented

3. Tt should work properly, giving correct answers or behaving in the manner indicated by the author.

4 Te should run without excessive demands upon memory or CPU time.

[A good program should be constructed so that {t is user friendly at all et Fegrettably, few are. Brown and Sampyon (1973) compare # good program with an

fable, Terge dog – not easily raffled, slow to take offense and difficult to Sivert from its chosen course (they don’t mention the large appetite of Large Gogs – excessive processing time or memory usage, perhaps?) A little unfairly, they go om to liken most peoples’ efforts at progranming to pacdler (very Hinniky about theit food, demanding only the very best and tactieat titbies, very quick-tempered, easily upset and generally more trouble then they are Worth) Ali thie is possibly unfalr to poodles but does apply to most software that “I have seen (and’ea’a loc T have weitvent}. The worst offenders seem to be Authors of programs in BASIC, closely followed by FORTRAN and PASCAL Practieioners

Good Design

Many of us, when faced with a problem which needs the attention of s computer, fend to jumpin feet firet with a cash of statements in whatever language we think we are most proficient at using. This ien’t the best vay except for the most trivial applications

Define the problem – what it Ly and the best way to go about It.

good program already available which will do what you vant (or which can be y amended for this purpose)? Do you know what you want to do

computer can help you do it – there 12 no point in erying to write a database

program 1f you don’t know what a database is. Do you really need tose &

or would s few minutes with a celculator seive just a well? If you

+ would your data be in an appropriate form or does it

Having defined the problem, one should then outline the program, specifying its purpose, the types of data input and cutput, the variables to be included and Ehe ‘matkematice which may be Reeded, At this stege, it thould aleo be possibly

This is an OCR’d version of the scanned page and likely contains recognition errors.

Page 45 of 63