Here we have another review of one of the 80s Usborne computer books. This time we’ll learn about computer programming.
Image may be NSFW.
Clik here to view.
- Title: Introduction to Computer Programming
- Subtitle: A guide for absolute beginners
- Author: Brian Reffin Smith
- Editor: Lisa Watts
- Pages: 48
- Published: 1982
- ISBN 10: 0860206750
- ISBN 13: 978-0860206750
This book, another of the early ones, is another I remember fondly. I am pretty sure I had this one and seem to remember using it to learn Basic before I even had a computer (as it says on the cover no computer needed)!
The first pages explains how the book is a guide for absolute beginners and it details how Basic keywords will be introduced one at a time. It mentions that there are puzzle programs to solve and suggestions for programs to write and useful alterations to the given programs to try.
Of course I will be using my Orwell computer to test out the programs in the book. If you read my last review on the Usborne Guide to Understanding the Micro you’ll remember I found Orwell didn’t support the Basic CLS command to clear the screen. I’ve now added that command to Basic.
Image may be NSFW.
Clik here to view.
The first page in the book is a double page showing the very basics of how a computer works. Once again we see the cartoon robots that appear in many of these earlier Usborne books.
The next set of pages talk about how we give the computer instructions and a little about computer languages. It mentions BASIC, Pascal and PILOT as example languages. Basic I know of course. Pascall is the language I was taught at university during my degree. PILOT I have never seen anywhere and I have no idea if this language is even used anymore!
Image may be NSFW.
Clik here to view.
Next we learn about writing programs. There is an example here about how the computer needs precise instructions to work correctly. There was a similar example in the last book as well.
There is an interesting comment right at the end of the second page where they discuss bugs. It says ‘Sometimes, a bug makes a program produce a slightly different result which you may prefer. Useful bugs like this are called “pugs”.’
That’s certainly not a term I have ever heard used! Although I have often heard developers saying ‘that’s not a bug, it’s a feature’!
Image may be NSFW.
Clik here to view.
Finally we get onto our first words in Basic: PRINT, RUN and INPUT. These pages are all about using PRINT. I tested out the first program.
Image may be NSFW.
Clik here to view.
Hmm, doesn’t look like theirs. The next few boxes describe debugging the code. Interestingly the debugging example shows a different line 50. It has extra spaces in it. It describes how with Basic you can retype a line to replace it.
Image may be NSFW.
Clik here to view.
Ah, better. But not the best ASCII art I have ever seen. Note that on this page there are also new cartoon characters introduced: Mooninites!
Image may be NSFW.
Clik here to view.
Next we learn about some more Basic keywords and variables. We learn about the LET command (which is actually optional in Microsoft Basic) as well as the READ and DATA commands. I tried the simple READ/DATA example code.
Image may be NSFW.
Clik here to view.
That’s the first time I tested the READ and DATA keywords on Orwell.
Image may be NSFW.
Clik here to view.
The next page talks about the INPUT keyword and we have another example program to try. I am manually entering these programs on Orwell itself and this one is worth saving.
Image may be NSFW.
Clik here to view.
The next page describes a little more about PRINT and how you can modify how the printing with a semicolon or a comma. The semicolon I knew about but I must have forgotten all about the comma which has the same effect as doing a TAB really. On Orwell with it’s Microsoft Basic the comma inserts 3 spaces.
We also learn a little about doing sums on the computer. I tested out all the commands shown and they all work on Orwell.
Image may be NSFW.
Clik here to view.
Next we learn about doing comparisons. We have a number of little programs to enter here. I remember being 9 and writing my own variants of a lot of these little sample programs in a small book I made. I didn’t enter these into Orwell as there is nothing new here and because on the next page we get our first decent program to try! I typed this one in on my PC and used the LOAD command to get it into Orwell.
10 PRINT "ALIEN'S SQUARE ALONG" 20 INPUT A 30 PRINT "ALIEN'S SQUARE UP" 40 INPUT B 50 CLS 60 PRINT "COMMANDO'S SQUARE ALONG" 70 INPUT C 80 PRINT "COMMANDO'S SQUARE UP" 90 INPUT D 100 CLS 110 LET X=SQR((A-C)*(A-C)+(B-D)*(B-D)) 120 PRINT "YOU ARE NOW" 130 PRINT X;"SPACE UNITS APART" 140 IF X<1.5 THEN PRINT "ALIEN FOUND" 150 IF X<1.5 THEN STOP 160 GOTO 10 170 END
That one worked perfectly although it is a little boring. We also have a program designed to make the computer look clever. Lets try this one too.
5 LET C=0 10 PRINT "I WOULD LIKE TO TALK TO YOU" 20 INPUT "TELL ME ANYTHING SILLY THAT HAPPENED TO YOU THIS WEEK";A$ 30 READ B$ 40 PRINT B$; 50 INPUT C$ 60 LET C=C+1 70 IF C=6 THEN GOTO 100 80 GOTO 30 90 DATA WHY, WHY IS THAT 95 DATA WHY, CAN YOU EXPLAIN 98 DATA CAN YOU SAY WHY, WHAT WAS THE REASON 100 PRINT "SO THE REASON YOU TYPED" 110 PRINT " ";A$ 120 PRINT "WAS REALLY GIVEN BY YOUR ANSWER" 130 PRINT " ";C$ 140 PRINT "HOW ODD!" 150 PRINT "RUN ME AGAIN FOR FURTHER ENLIGHTENMENT" 160 END
Image may be NSFW.
Clik here to view.
Again I used the LOAD command to get this one running and it ran first time. I used to have a colleague who you’d have conversations like that with in the lunch room. Although the final conclusion would usually happen 10 minutes after you’d finished the rest of the conversation and everyone else had moved onto other things!
The next page is all about drawing pictures. As Orwell has no graphics mode (yet) I skipped this. We then go onto a page describing how the RND function works and there is another example program to try.
10 LET C=0 20 LET A=INT(RND(1)*20+1) 30 LET B=INT(RND(1)*20+1) 40 PRINT "ALIEN SHIP'S CODES" 45 PRINT "ARE ";A,B;"FIRE" 50 INPUT X 60 LET C=C+1 70 IF X=A*B THEN PRINT "ALIEN SHIP DESTROYED" 80 IF X<>A*B THEN PRINT "MISSED" 90 IF C<6 THEN GOTO 20 100 END
Image may be NSFW.
Clik here to view.
That one is just a simple multiplication program really but that too worked first time. The next page discusses loops and it has a simple program to test if RND really works. I tried that one as well.
10 FOR I=1 TO 1000 20 LET R=INT(RND(1)*6+1) 30 IF R=1 THEN LET A=A+1 40 IF R=2 THEN LET B=B+1 50 IF R=3 THEN LET C=C+1 60 IF R=4 THEN LET D=D+1 70 IF R=5 THEN LET E=E+1 80 IF R=6 THEN LET F=F+1 90 NEXT I 100 PRINT "FINISHED" 110 PRINT A, B, C 120 PRINT D, E, F 130 END
That one does take a while to run but run it did!
Image may be NSFW.
Clik here to view.
Next we learn about subroutines with a few more interesting little programs to try and we then go on to learn about some string manipulation commands. I tested these on Orwell and they all worked fine. Then we have a code maker program.
5 LET C$="" 7 LET D$="" 10 PRINT "TYPE IN A SHORT MESSAGE" 20 INPUT M$ 30 PRINT "NOW TYPE IN A SECRET NUMBER BETWEEN 1 AND ";LEN(M$)-1 40 INPUT N 50 LET A$=RIGHT$(M$,N) 60 LET B$=LEFT$(M$,LEN(M$)-N) 70 LET M$=A$+B$ 80 FOR I=1 TO LEN(M$) STEP 2 90 LET C$=C$+MID$(M$,I,1) 100 NEXT I 110 FOR J=2 TO LEN(M$) STEP 2 120 LET D$=D$+MID$(M$,J,1) 130 NEXT J 140 LET M$=C$+D$ 150 PRINT "CODED MESSAGE IS" 160 PRINT M$ 170 END
Image may be NSFW.
Clik here to view.
That one worked as well! Next we have some more code to try. One involves plotting lines which I can’t do yet. The other is a birthdays program where it tallies birthdays against months. We then have another page about graphics again.
Next we get to something that looks familiar. The funny poems program. This was something we saw in the Usborne Guide to Computers and I actually made the paper version of this.
Image may be NSFW.
Clik here to view.
Here we have four pages that explain how to make a Basic version of the same thing. The last page has the complete listing which of course I had to try out. I actually had a couple of bugs in this one involving the commas in the DATA statements but with those sorted out it works fine.
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
The next page is one with programming tips and it actually mentions this bug there.
Image may be NSFW.
Clik here to view.
Finally the book has the answers to the puzzles asked throughout it and then a summary of the BASIC keywords used in the book and a glossary of computer terms. And, like one of the previous books, there is a list of titles for further reading.
- Usborne Guide to Computers by Brian Reffin Smith, Usborne 1981
- Understanding the Micro by Judy Tatchell and Bill Bennett, Usborne 1982
- The Computer Book by Robin Bradbeer, Peter DeBono and Peter Laurie, BBC 1982
- Illustrating Computers by Colin Day and Donald Alcock, Pan 1982
- Illustrating BASIC by Donald Alcock, Cambridge University Press 1977
- Computer Spacegames by Daniel Isaaman and Jenny Tyler, Usborne 1982
- Computer Battlegames by Daniel Isaaman and Jenny Tyler, Usborne 1982
The latter two I shall review myself soon.
All in all I found this book to be a great introduction to Basic. It describes a lot of the basic concepts of programming and in a fun way. You really don’t need a computer to use this book (and I am sure I didn’t when I first read it) but it is much more fun if you do have one!