Amstrad Computer User


The Working Amstrad

Publisher: Sunshine
Machine: Amstrad CPC464

 
Published in Amstrad Computer User #5

The Working Amstrad

The Amstrad CPC464 might be considered rather lucky to have been launched so late in the day as regards the home computing boom. Early computers suffered after their release from lack of decent software and poorly-written 'bandwagon' books. But the CPC464 already has many of the best games for other machines running on it, and this book is the latest in the Sunshine 'Working Micro' series which has been running since 1982. The pedigree shows.

The concept of the series is to avoid the usual collection of Space Invaders and Pacman beginner's programs that jerk their way across the screen, and to provide instead a thoroughly detailed guide to 'proper' programming techniques, using the facilities of the given micro. There is a need for such a book: as someone who has worked for several years on computing magazines, I can testify that programs from home users read like a six-year-old's essay rather than a best-seller, to use a literary analogy.

A common thread runs through all the example programs in the book. Modular programming is employed, the authors stressing how vital this approach is if programs are to be easy to design, test, debug, and modify. The various subroutine modules are printed separately (dot matrix listings from a working program, so you know they are accurate), together with sections on the intended function, a line-by-line description of how the module works (together with any background information that might be needed), and how to test the module independently of the rest of the program. This structured teaching approach makes it important to read the book from start to finish as a series of lessons: dipping in at random because you fancy a particular program might miss important points covered earlier.

A side effect of this presentation is that boring slabs of text are avoided, the frequent sub-headings, short blocks of listing and interspersed text breaking up the pages and making the book pleasant to look at and a joy to read.

The book covers all the major computer applications and Amstrad facilities. Chapter 1 deals with the use of interrupts and has four programs; two types of clock, an 'alarm' type program that can remember 16 different events, and a stopwatch.

Even this first chapter takes these basic examples as an excuse to wander off into the realms of geometry, shape-filling and menus.

Chapter 2 covers graphing applications, in line, pie and 3D bar form. Then comes a chapter with programs for character design, screen drawing and creation of tunes. Chapter 4 turns to more serious matters, such as a filing system (personally I've always believed an exercise book is more practical for filing than any home computer, but it's nice to see the theory explained), a stock control program, a simple word processor and a multiple-choice test generator.

Finally financial applications are dealt with in Chapter 5, which has a bank account manager and accounting package; again, of less practical use than pen and paper, in my opinion, but well-explained nonetheless.

Two things are present in the book which are depressingly absent in much technical writing: good English and good proofreading. The book is practically error-free, although it was a bit disconcerting to find the word 'not' omitted from a sentence on page 3, thus suggesting that you might want to start a program with GOTO in order to clear any variables you had just set up: also the caption for Figure 3.2 belongs on 2.3.

Quibbles, quibbles: if these were the worst I could find the publishers are doing OK. I do think the authors have made a bad decision by referring to variables in upper case in the text when they are lower case in the listings, the Amstrad doesn't mind which you use but the beginner might be confused.

They also fall into the trap of shouting "Bug" when something unexpected happens, in this case the failure of the SYMBOL AFTER command when a file is open. There are bugs in the Amstrad but this isn't one of them: it happens because SYMBOL AFTER needs HIMEM at the bottom of the symbol table, and opening a file moves it. The feature is documented in the Concise BASIC Specification (SOFT 157) together with a way to prevent it, but I admit it would have been better to have mentioned it in the User Guide.

Overall, then, an excellent book which I particularly recommend to beginners as a way of nipping any bad programming habits in the bud. If you only buy one book on programming, make it this one.