Review – Usborne Introduction to Computer Programming.

November 17th, 2013

Here we have another review of one of the 80s Usborne computer books. This time we’ll learn about computer programming.

IMG_0833_1

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.

IMG_0835_1

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!

IMG_0836_1

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’!

IMG_0837_1

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.

IMG_4441_1

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.

IMG_4443_1

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!

IMG_0840_1

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.

IMG_4444_1

That’s the first time I tested the READ and DATA keywords on Orwell.

IMG_0841_1

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.

IMG_4446_1

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.

IMG_0842_1

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

IMG_4448_1

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

IMG_4449_1

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!

IMG_4450_1

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

 

IMG_4451_1

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.

IMG_0801_1

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.

IMG_4453_1

IMG_0847_1

IMG_0848_1

The next page is one with programming tips and it actually mentions this bug there.

IMG_0849_1

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.

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!

 

9 Responses to “Review – Usborne Introduction to Computer Programming.”

  1. bill Says:

    This was one of my favorite books as a kid and you posted it this the day before my birthday. Thanks!

    Here. We re-typeset The Aquarius Extended Basic Manual a few yeas back. You might enjoy that.
    http://files.igame3d.com/Aquarius/aquarius_extended_basic_manual.pdf

  2. Simon Says:

    I should have a lot more coming. I am currently doing “Computer Battlegames”. Great books!

  3. Ian Says:

    I had this book when I was 12 years old! Didn’t have a computer at the time, but read it front to back. When I finally got a computer, none of the programs worked. I didn’t realize that my TI-99/4A wouldn’t run program written for the TRS-80 🙂

    Later, I got their Machine Code For Beginners book and loved that one too.

  4. Simon Says:

    I am about to do a review for Computer Battlegames. The programs do need a little tweaking sometimes. In that one it at least shows you the lines where. I will do the Machine Code book too but I need to add a monitor to my Orwell computer first I guess!

  5. Asciimation » Blog Archives » Review – Usborne Creepy Computer Games. Says:

    […] Computer Programming […]

  6. Brian Reffin Smith Says:

    Hello… I just saw this. I’m the person who wrote the book, though what you have is obviously a later, revised edition. Glad that you and others found it useful. I wrote several for aus borne, but the most important for me was the first one, just about computers. It was actually translated into, I think, 27 languages, and apparently had a huge influence on a generation, which makes me very happy since I tried to subvert a number of notions about computers. I only got a small fixed sum for writing it though, the norm at Usborne. You’ll see in that book there’s much about creativity, art, etc., and also shows NSA-like abuses. Also, half the robots are female, and girls are shown using the computer, unheard of in those days!

    Best wishes,
    Brian

  7. Simon Says:

    Hi Brian, thanks for the comment and of course thanks for the book. Was definitely one of the first that got me on my way in computers way back then. I’ll see if I can find the earlier edition now and can compare what the differences are. I still have more of the books to review from the rest of the series.

    Simon

  8. Tom Says:

    This book (the Dutch translation, called “Introductie tot computer programmeren – BASIC voor beginners”) introduced me to computer programming when I was 11 years old. Thanks a lot!

  9. Euhill Says:

    Here’s a Wikipedia article on PILOT. http://en.wikipedia.org/wiki/PILOT