Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_34.ADF » P/+PT2

P/+PT2

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_34.ADF
Filename: P/+PT2
Read OK:
File size: 0F16 bytes
Load address: 2B206576
Exec address: D325450
Duplicates

There are 2 duplicate copies of this file in the archive:

File contents
     Whenever I test a routine, I always make the following checks:

- What happens if an illegal value is passed to a routine, eg. if 11 is
given as input for a routine which only accepts values from 1 to 10?
- What happens if a decimal, such as 2.5 is given when only whole numbers
are allowed?
- What happens if the user types a  string for a numeric input?

Your program should be able to deal with all of these situations.

     When you are totally satified that one routine is working, build on
it and add on another routine. Then test it again. Generally, I get
worried if I write code for more than about half an hour without testing
to see if it works. We all make mistakes, and there are bound to be bugs
in your code. If you test your software and it does not work, you know
that there is a problem with the code which you added since the previous
test. The smaller the amount of code that this is, the easier your bug
will be to find. Just as in a scientific experiment you only ever change
one variable at any one time, you should only change one aspect of your
program at any one time. That way there is only one possible source of
problems. When you make a small alteration, never fall into the trap of
thinking "It was only a small alteration: its bound to work, so I won't
bother to test it." You will regret it if you do.
     Shipwrecked (EUG 30) was developed in this way, in very small
steps. To illustrate my point, these were the steps in which I developed
the code:

- I wrote a routine to read the type of block in any given square on the
Shipwrecked map. For example I could ask it the value of the block in
square (5,8), and it would report block type 3.
- I added onto this a routine to read the graphic data for the reported
block type, in the example this would be block 3, and then plot it onto
the relavant square on the screen. That way I could ask for block (5,8) to
be drawn on the screen, and a block would appear. Naturally I had to test
it to ensure that the right block was drawn, and that it was drawn in the
right place on the screen.
- Next I added a simple loop to display all of the blocks in a ten by ten
square. This meant it displayed the whole screen. This also had to be
tested. I could now ask for the second screen across in the third row
down, and get this screen drawn on the screen.
- Then I added a white square onto the screen, which could be moved around
with the keyboard. If the square went off the side of the screen the
program moved onto the next screen across. This was quite a large step
forward, and took a lot of testing to get it working.
- I added gravity, so that if there was no solid ground below the square
it fell downwards.
- I drew several pictures of a man, and replaced the white square with
them. I made the program just display the same one of them all the time at
first, so you always got the same frame, and the man looked very stiff.
When I had tested this, I made the program select the relevant frame to
display, and so animate the man and make his legs seem to move.

     When testing a program, make good use of trial and error. If an
effect doesn't look quite right, fiddle around with the code until it
looks better. Even if an effect looks okay, it is still often a bit of fun
to fiddle with the variables to see what strange effects you can get.
Sometimes you get something better than what you had originally!
     Make good use of your friends in testing your software. If you are
not sure which of two effects looks better, ask around. Get your friends
to test your programs for you as well. Invite them over to play your new
game, and see how long it takes them to crash it! That is the method I
used to test Shipwrecked to the limits. Vigorous testing is undoubtably
the key to successful programming.

My next Programming Technique article will be about Graphics.
00000000  20 20 20 20 20 57 68 65  6e 65 76 65 72 20 49 20  |     Whenever I |
00000010  74 65 73 74 20 61 20 72  6f 75 74 69 6e 65 2c 20  |test a routine, |
00000020  49 20 61 6c 77 61 79 73  20 6d 61 6b 65 20 74 68  |I always make th|
00000030  65 20 66 6f 6c 6c 6f 77  69 6e 67 20 63 68 65 63  |e following chec|
00000040  6b 73 3a 0d 0d 2d 20 57  68 61 74 20 68 61 70 70  |ks:..- What happ|
00000050  65 6e 73 20 69 66 20 61  6e 20 69 6c 6c 65 67 61  |ens if an illega|
00000060  6c 20 76 61 6c 75 65 20  69 73 20 70 61 73 73 65  |l value is passe|
00000070  64 20 74 6f 20 61 20 72  6f 75 74 69 6e 65 2c 20  |d to a routine, |
00000080  65 67 2e 20 69 66 20 31  31 20 69 73 0d 67 69 76  |eg. if 11 is.giv|
00000090  65 6e 20 61 73 20 69 6e  70 75 74 20 66 6f 72 20  |en as input for |
000000a0  61 20 72 6f 75 74 69 6e  65 20 77 68 69 63 68 20  |a routine which |
000000b0  6f 6e 6c 79 20 61 63 63  65 70 74 73 20 76 61 6c  |only accepts val|
000000c0  75 65 73 20 66 72 6f 6d  20 31 20 74 6f 20 31 30  |ues from 1 to 10|
000000d0  3f 0d 2d 20 57 68 61 74  20 68 61 70 70 65 6e 73  |?.- What happens|
000000e0  20 69 66 20 61 20 64 65  63 69 6d 61 6c 2c 20 73  | if a decimal, s|
000000f0  75 63 68 20 61 73 20 32  2e 35 20 69 73 20 67 69  |uch as 2.5 is gi|
00000100  76 65 6e 20 77 68 65 6e  20 6f 6e 6c 79 20 77 68  |ven when only wh|
00000110  6f 6c 65 20 6e 75 6d 62  65 72 73 0d 61 72 65 20  |ole numbers.are |
00000120  61 6c 6c 6f 77 65 64 3f  0d 2d 20 57 68 61 74 20  |allowed?.- What |
00000130  68 61 70 70 65 6e 73 20  69 66 20 74 68 65 20 75  |happens if the u|
00000140  73 65 72 20 74 79 70 65  73 20 61 20 20 73 74 72  |ser types a  str|
00000150  69 6e 67 20 66 6f 72 20  61 20 6e 75 6d 65 72 69  |ing for a numeri|
00000160  63 20 69 6e 70 75 74 3f  0d 0d 59 6f 75 72 20 70  |c input?..Your p|
00000170  72 6f 67 72 61 6d 20 73  68 6f 75 6c 64 20 62 65  |rogram should be|
00000180  20 61 62 6c 65 20 74 6f  20 64 65 61 6c 20 77 69  | able to deal wi|
00000190  74 68 20 61 6c 6c 20 6f  66 20 74 68 65 73 65 20  |th all of these |
000001a0  73 69 74 75 61 74 69 6f  6e 73 2e 0d 0d 20 20 20  |situations...   |
000001b0  20 20 57 68 65 6e 20 79  6f 75 20 61 72 65 20 74  |  When you are t|
000001c0  6f 74 61 6c 6c 79 20 73  61 74 69 66 69 65 64 20  |otally satified |
000001d0  74 68 61 74 20 6f 6e 65  20 72 6f 75 74 69 6e 65  |that one routine|
000001e0  20 69 73 20 77 6f 72 6b  69 6e 67 2c 20 62 75 69  | is working, bui|
000001f0  6c 64 20 6f 6e 0d 69 74  20 61 6e 64 20 61 64 64  |ld on.it and add|
00000200  20 6f 6e 20 61 6e 6f 74  68 65 72 20 72 6f 75 74  | on another rout|
00000210  69 6e 65 2e 20 54 68 65  6e 20 74 65 73 74 20 69  |ine. Then test i|
00000220  74 20 61 67 61 69 6e 2e  20 47 65 6e 65 72 61 6c  |t again. General|
00000230  6c 79 2c 20 49 20 67 65  74 0d 77 6f 72 72 69 65  |ly, I get.worrie|
00000240  64 20 69 66 20 49 20 77  72 69 74 65 20 63 6f 64  |d if I write cod|
00000250  65 20 66 6f 72 20 6d 6f  72 65 20 74 68 61 6e 20  |e for more than |
00000260  61 62 6f 75 74 20 68 61  6c 66 20 61 6e 20 68 6f  |about half an ho|
00000270  75 72 20 77 69 74 68 6f  75 74 20 74 65 73 74 69  |ur without testi|
00000280  6e 67 0d 74 6f 20 73 65  65 20 69 66 20 69 74 20  |ng.to see if it |
00000290  77 6f 72 6b 73 2e 20 57  65 20 61 6c 6c 20 6d 61  |works. We all ma|
000002a0  6b 65 20 6d 69 73 74 61  6b 65 73 2c 20 61 6e 64  |ke mistakes, and|
000002b0  20 74 68 65 72 65 20 61  72 65 20 62 6f 75 6e 64  | there are bound|
000002c0  20 74 6f 20 62 65 20 62  75 67 73 0d 69 6e 20 79  | to be bugs.in y|
000002d0  6f 75 72 20 63 6f 64 65  2e 20 49 66 20 79 6f 75  |our code. If you|
000002e0  20 74 65 73 74 20 79 6f  75 72 20 73 6f 66 74 77  | test your softw|
000002f0  61 72 65 20 61 6e 64 20  69 74 20 64 6f 65 73 20  |are and it does |
00000300  6e 6f 74 20 77 6f 72 6b  2c 20 79 6f 75 20 6b 6e  |not work, you kn|
00000310  6f 77 0d 74 68 61 74 20  74 68 65 72 65 20 69 73  |ow.that there is|
00000320  20 61 20 70 72 6f 62 6c  65 6d 20 77 69 74 68 20  | a problem with |
00000330  74 68 65 20 63 6f 64 65  20 77 68 69 63 68 20 79  |the code which y|
00000340  6f 75 20 61 64 64 65 64  20 73 69 6e 63 65 20 74  |ou added since t|
00000350  68 65 20 70 72 65 76 69  6f 75 73 0d 74 65 73 74  |he previous.test|
00000360  2e 20 54 68 65 20 73 6d  61 6c 6c 65 72 20 74 68  |. The smaller th|
00000370  65 20 61 6d 6f 75 6e 74  20 6f 66 20 63 6f 64 65  |e amount of code|
00000380  20 74 68 61 74 20 74 68  69 73 20 69 73 2c 20 74  | that this is, t|
00000390  68 65 20 65 61 73 69 65  72 20 79 6f 75 72 20 62  |he easier your b|
000003a0  75 67 0d 77 69 6c 6c 20  62 65 20 74 6f 20 66 69  |ug.will be to fi|
000003b0  6e 64 2e 20 4a 75 73 74  20 61 73 20 69 6e 20 61  |nd. Just as in a|
000003c0  20 73 63 69 65 6e 74 69  66 69 63 20 65 78 70 65  | scientific expe|
000003d0  72 69 6d 65 6e 74 20 79  6f 75 20 6f 6e 6c 79 20  |riment you only |
000003e0  65 76 65 72 20 63 68 61  6e 67 65 0d 6f 6e 65 20  |ever change.one |
000003f0  76 61 72 69 61 62 6c 65  20 61 74 20 61 6e 79 20  |variable at any |
00000400  6f 6e 65 20 74 69 6d 65  2c 20 79 6f 75 20 73 68  |one time, you sh|
00000410  6f 75 6c 64 20 6f 6e 6c  79 20 63 68 61 6e 67 65  |ould only change|
00000420  20 6f 6e 65 20 61 73 70  65 63 74 20 6f 66 20 79  | one aspect of y|
00000430  6f 75 72 0d 70 72 6f 67  72 61 6d 20 61 74 20 61  |our.program at a|
00000440  6e 79 20 6f 6e 65 20 74  69 6d 65 2e 20 54 68 61  |ny one time. Tha|
00000450  74 20 77 61 79 20 74 68  65 72 65 20 69 73 20 6f  |t way there is o|
00000460  6e 6c 79 20 6f 6e 65 20  70 6f 73 73 69 62 6c 65  |nly one possible|
00000470  20 73 6f 75 72 63 65 20  6f 66 0d 70 72 6f 62 6c  | source of.probl|
00000480  65 6d 73 2e 20 57 68 65  6e 20 79 6f 75 20 6d 61  |ems. When you ma|
00000490  6b 65 20 61 20 73 6d 61  6c 6c 20 61 6c 74 65 72  |ke a small alter|
000004a0  61 74 69 6f 6e 2c 20 6e  65 76 65 72 20 66 61 6c  |ation, never fal|
000004b0  6c 20 69 6e 74 6f 20 74  68 65 20 74 72 61 70 20  |l into the trap |
000004c0  6f 66 0d 74 68 69 6e 6b  69 6e 67 20 22 49 74 20  |of.thinking "It |
000004d0  77 61 73 20 6f 6e 6c 79  20 61 20 73 6d 61 6c 6c  |was only a small|
000004e0  20 61 6c 74 65 72 61 74  69 6f 6e 3a 20 69 74 73  | alteration: its|
000004f0  20 62 6f 75 6e 64 20 74  6f 20 77 6f 72 6b 2c 20  | bound to work, |
00000500  73 6f 20 49 20 77 6f 6e  27 74 0d 62 6f 74 68 65  |so I won't.bothe|
00000510  72 20 74 6f 20 74 65 73  74 20 69 74 2e 22 20 59  |r to test it." Y|
00000520  6f 75 20 77 69 6c 6c 20  72 65 67 72 65 74 20 69  |ou will regret i|
00000530  74 20 69 66 20 79 6f 75  20 64 6f 2e 0d 20 20 20  |t if you do..   |
00000540  20 20 53 68 69 70 77 72  65 63 6b 65 64 20 28 45  |  Shipwrecked (E|
00000550  55 47 20 33 30 29 20 77  61 73 20 64 65 76 65 6c  |UG 30) was devel|
00000560  6f 70 65 64 20 69 6e 20  74 68 69 73 20 77 61 79  |oped in this way|
00000570  2c 20 69 6e 20 76 65 72  79 20 73 6d 61 6c 6c 0d  |, in very small.|
00000580  73 74 65 70 73 2e 20 54  6f 20 69 6c 6c 75 73 74  |steps. To illust|
00000590  72 61 74 65 20 6d 79 20  70 6f 69 6e 74 2c 20 74  |rate my point, t|
000005a0  68 65 73 65 20 77 65 72  65 20 74 68 65 20 73 74  |hese were the st|
000005b0  65 70 73 20 69 6e 20 77  68 69 63 68 20 49 20 64  |eps in which I d|
000005c0  65 76 65 6c 6f 70 65 64  0d 74 68 65 20 63 6f 64  |eveloped.the cod|
000005d0  65 3a 0d 0d 2d 20 49 20  77 72 6f 74 65 20 61 20  |e:..- I wrote a |
000005e0  72 6f 75 74 69 6e 65 20  74 6f 20 72 65 61 64 20  |routine to read |
000005f0  74 68 65 20 74 79 70 65  20 6f 66 20 62 6c 6f 63  |the type of bloc|
00000600  6b 20 69 6e 20 61 6e 79  20 67 69 76 65 6e 20 73  |k in any given s|
00000610  71 75 61 72 65 20 6f 6e  20 74 68 65 0d 53 68 69  |quare on the.Shi|
00000620  70 77 72 65 63 6b 65 64  20 6d 61 70 2e 20 46 6f  |pwrecked map. Fo|
00000630  72 20 65 78 61 6d 70 6c  65 20 49 20 63 6f 75 6c  |r example I coul|
00000640  64 20 61 73 6b 20 69 74  20 74 68 65 20 76 61 6c  |d ask it the val|
00000650  75 65 20 6f 66 20 74 68  65 20 62 6c 6f 63 6b 20  |ue of the block |
00000660  69 6e 0d 73 71 75 61 72  65 20 28 35 2c 38 29 2c  |in.square (5,8),|
00000670  20 61 6e 64 20 69 74 20  77 6f 75 6c 64 20 72 65  | and it would re|
00000680  70 6f 72 74 20 62 6c 6f  63 6b 20 74 79 70 65 20  |port block type |
00000690  33 2e 0d 2d 20 49 20 61  64 64 65 64 20 6f 6e 74  |3..- I added ont|
000006a0  6f 20 74 68 69 73 20 61  20 72 6f 75 74 69 6e 65  |o this a routine|
000006b0  20 74 6f 20 72 65 61 64  20 74 68 65 20 67 72 61  | to read the gra|
000006c0  70 68 69 63 20 64 61 74  61 20 66 6f 72 20 74 68  |phic data for th|
000006d0  65 20 72 65 70 6f 72 74  65 64 0d 62 6c 6f 63 6b  |e reported.block|
000006e0  20 74 79 70 65 2c 20 69  6e 20 74 68 65 20 65 78  | type, in the ex|
000006f0  61 6d 70 6c 65 20 74 68  69 73 20 77 6f 75 6c 64  |ample this would|
00000700  20 62 65 20 62 6c 6f 63  6b 20 33 2c 20 61 6e 64  | be block 3, and|
00000710  20 74 68 65 6e 20 70 6c  6f 74 20 69 74 20 6f 6e  | then plot it on|
00000720  74 6f 0d 74 68 65 20 72  65 6c 61 76 61 6e 74 20  |to.the relavant |
00000730  73 71 75 61 72 65 20 6f  6e 20 74 68 65 20 73 63  |square on the sc|
00000740  72 65 65 6e 2e 20 54 68  61 74 20 77 61 79 20 49  |reen. That way I|
00000750  20 63 6f 75 6c 64 20 61  73 6b 20 66 6f 72 20 62  | could ask for b|
00000760  6c 6f 63 6b 20 28 35 2c  38 29 20 74 6f 0d 62 65  |lock (5,8) to.be|
00000770  20 64 72 61 77 6e 20 6f  6e 20 74 68 65 20 73 63  | drawn on the sc|
00000780  72 65 65 6e 2c 20 61 6e  64 20 61 20 62 6c 6f 63  |reen, and a bloc|
00000790  6b 20 77 6f 75 6c 64 20  61 70 70 65 61 72 2e 20  |k would appear. |
000007a0  4e 61 74 75 72 61 6c 6c  79 20 49 20 68 61 64 20  |Naturally I had |
000007b0  74 6f 20 74 65 73 74 0d  69 74 20 74 6f 20 65 6e  |to test.it to en|
000007c0  73 75 72 65 20 74 68 61  74 20 74 68 65 20 72 69  |sure that the ri|
000007d0  67 68 74 20 62 6c 6f 63  6b 20 77 61 73 20 64 72  |ght block was dr|
000007e0  61 77 6e 2c 20 61 6e 64  20 74 68 61 74 20 69 74  |awn, and that it|
000007f0  20 77 61 73 20 64 72 61  77 6e 20 69 6e 20 74 68  | was drawn in th|
00000800  65 0d 72 69 67 68 74 20  70 6c 61 63 65 20 6f 6e  |e.right place on|
00000810  20 74 68 65 20 73 63 72  65 65 6e 2e 0d 2d 20 4e  | the screen..- N|
00000820  65 78 74 20 49 20 61 64  64 65 64 20 61 20 73 69  |ext I added a si|
00000830  6d 70 6c 65 20 6c 6f 6f  70 20 74 6f 20 64 69 73  |mple loop to dis|
00000840  70 6c 61 79 20 61 6c 6c  20 6f 66 20 74 68 65 20  |play all of the |
00000850  62 6c 6f 63 6b 73 20 69  6e 20 61 20 74 65 6e 20  |blocks in a ten |
00000860  62 79 20 74 65 6e 0d 73  71 75 61 72 65 2e 20 54  |by ten.square. T|
00000870  68 69 73 20 6d 65 61 6e  74 20 69 74 20 64 69 73  |his meant it dis|
00000880  70 6c 61 79 65 64 20 74  68 65 20 77 68 6f 6c 65  |played the whole|
00000890  20 73 63 72 65 65 6e 2e  20 54 68 69 73 20 61 6c  | screen. This al|
000008a0  73 6f 20 68 61 64 20 74  6f 20 62 65 0d 74 65 73  |so had to be.tes|
000008b0  74 65 64 2e 20 49 20 63  6f 75 6c 64 20 6e 6f 77  |ted. I could now|
000008c0  20 61 73 6b 20 66 6f 72  20 74 68 65 20 73 65 63  | ask for the sec|
000008d0  6f 6e 64 20 73 63 72 65  65 6e 20 61 63 72 6f 73  |ond screen acros|
000008e0  73 20 69 6e 20 74 68 65  20 74 68 69 72 64 20 72  |s in the third r|
000008f0  6f 77 0d 64 6f 77 6e 2c  20 61 6e 64 20 67 65 74  |ow.down, and get|
00000900  20 74 68 69 73 20 73 63  72 65 65 6e 20 64 72 61  | this screen dra|
00000910  77 6e 20 6f 6e 20 74 68  65 20 73 63 72 65 65 6e  |wn on the screen|
00000920  2e 0d 2d 20 54 68 65 6e  20 49 20 61 64 64 65 64  |..- Then I added|
00000930  20 61 20 77 68 69 74 65  20 73 71 75 61 72 65 20  | a white square |
00000940  6f 6e 74 6f 20 74 68 65  20 73 63 72 65 65 6e 2c  |onto the screen,|
00000950  20 77 68 69 63 68 20 63  6f 75 6c 64 20 62 65 20  | which could be |
00000960  6d 6f 76 65 64 20 61 72  6f 75 6e 64 0d 77 69 74  |moved around.wit|
00000970  68 20 74 68 65 20 6b 65  79 62 6f 61 72 64 2e 20  |h the keyboard. |
00000980  49 66 20 74 68 65 20 73  71 75 61 72 65 20 77 65  |If the square we|
00000990  6e 74 20 6f 66 66 20 74  68 65 20 73 69 64 65 20  |nt off the side |
000009a0  6f 66 20 74 68 65 20 73  63 72 65 65 6e 20 74 68  |of the screen th|
000009b0  65 0d 70 72 6f 67 72 61  6d 20 6d 6f 76 65 64 20  |e.program moved |
000009c0  6f 6e 74 6f 20 74 68 65  20 6e 65 78 74 20 73 63  |onto the next sc|
000009d0  72 65 65 6e 20 61 63 72  6f 73 73 2e 20 54 68 69  |reen across. Thi|
000009e0  73 20 77 61 73 20 71 75  69 74 65 20 61 20 6c 61  |s was quite a la|
000009f0  72 67 65 20 73 74 65 70  0d 66 6f 72 77 61 72 64  |rge step.forward|
00000a00  2c 20 61 6e 64 20 74 6f  6f 6b 20 61 20 6c 6f 74  |, and took a lot|
00000a10  20 6f 66 20 74 65 73 74  69 6e 67 20 74 6f 20 67  | of testing to g|
00000a20  65 74 20 69 74 20 77 6f  72 6b 69 6e 67 2e 0d 2d  |et it working..-|
00000a30  20 49 20 61 64 64 65 64  20 67 72 61 76 69 74 79  | I added gravity|
00000a40  2c 20 73 6f 20 74 68 61  74 20 69 66 20 74 68 65  |, so that if the|
00000a50  72 65 20 77 61 73 20 6e  6f 20 73 6f 6c 69 64 20  |re was no solid |
00000a60  67 72 6f 75 6e 64 20 62  65 6c 6f 77 20 74 68 65  |ground below the|
00000a70  20 73 71 75 61 72 65 0d  69 74 20 66 65 6c 6c 20  | square.it fell |
00000a80  64 6f 77 6e 77 61 72 64  73 2e 0d 2d 20 49 20 64  |downwards..- I d|
00000a90  72 65 77 20 73 65 76 65  72 61 6c 20 70 69 63 74  |rew several pict|
00000aa0  75 72 65 73 20 6f 66 20  61 20 6d 61 6e 2c 20 61  |ures of a man, a|
00000ab0  6e 64 20 72 65 70 6c 61  63 65 64 20 74 68 65 20  |nd replaced the |
00000ac0  77 68 69 74 65 20 73 71  75 61 72 65 20 77 69 74  |white square wit|
00000ad0  68 0d 74 68 65 6d 2e 20  49 20 6d 61 64 65 20 74  |h.them. I made t|
00000ae0  68 65 20 70 72 6f 67 72  61 6d 20 6a 75 73 74 20  |he program just |
00000af0  64 69 73 70 6c 61 79 20  74 68 65 20 73 61 6d 65  |display the same|
00000b00  20 6f 6e 65 20 6f 66 20  74 68 65 6d 20 61 6c 6c  | one of them all|
00000b10  20 74 68 65 20 74 69 6d  65 20 61 74 0d 66 69 72  | the time at.fir|
00000b20  73 74 2c 20 73 6f 20 79  6f 75 20 61 6c 77 61 79  |st, so you alway|
00000b30  73 20 67 6f 74 20 74 68  65 20 73 61 6d 65 20 66  |s got the same f|
00000b40  72 61 6d 65 2c 20 61 6e  64 20 74 68 65 20 6d 61  |rame, and the ma|
00000b50  6e 20 6c 6f 6f 6b 65 64  20 76 65 72 79 20 73 74  |n looked very st|
00000b60  69 66 66 2e 0d 57 68 65  6e 20 49 20 68 61 64 20  |iff..When I had |
00000b70  74 65 73 74 65 64 20 74  68 69 73 2c 20 49 20 6d  |tested this, I m|
00000b80  61 64 65 20 74 68 65 20  70 72 6f 67 72 61 6d 20  |ade the program |
00000b90  73 65 6c 65 63 74 20 74  68 65 20 72 65 6c 65 76  |select the relev|
00000ba0  61 6e 74 20 66 72 61 6d  65 20 74 6f 0d 64 69 73  |ant frame to.dis|
00000bb0  70 6c 61 79 2c 20 61 6e  64 20 73 6f 20 61 6e 69  |play, and so ani|
00000bc0  6d 61 74 65 20 74 68 65  20 6d 61 6e 20 61 6e 64  |mate the man and|
00000bd0  20 6d 61 6b 65 20 68 69  73 20 6c 65 67 73 20 73  | make his legs s|
00000be0  65 65 6d 20 74 6f 20 6d  6f 76 65 2e 0d 0d 20 20  |eem to move...  |
00000bf0  20 20 20 57 68 65 6e 20  74 65 73 74 69 6e 67 20  |   When testing |
00000c00  61 20 70 72 6f 67 72 61  6d 2c 20 6d 61 6b 65 20  |a program, make |
00000c10  67 6f 6f 64 20 75 73 65  20 6f 66 20 74 72 69 61  |good use of tria|
00000c20  6c 20 61 6e 64 20 65 72  72 6f 72 2e 20 49 66 20  |l and error. If |
00000c30  61 6e 0d 65 66 66 65 63  74 20 64 6f 65 73 6e 27  |an.effect doesn'|
00000c40  74 20 6c 6f 6f 6b 20 71  75 69 74 65 20 72 69 67  |t look quite rig|
00000c50  68 74 2c 20 66 69 64 64  6c 65 20 61 72 6f 75 6e  |ht, fiddle aroun|
00000c60  64 20 77 69 74 68 20 74  68 65 20 63 6f 64 65 20  |d with the code |
00000c70  75 6e 74 69 6c 20 69 74  0d 6c 6f 6f 6b 73 20 62  |until it.looks b|
00000c80  65 74 74 65 72 2e 20 45  76 65 6e 20 69 66 20 61  |etter. Even if a|
00000c90  6e 20 65 66 66 65 63 74  20 6c 6f 6f 6b 73 20 6f  |n effect looks o|
00000ca0  6b 61 79 2c 20 69 74 20  69 73 20 73 74 69 6c 6c  |kay, it is still|
00000cb0  20 6f 66 74 65 6e 20 61  20 62 69 74 20 6f 66 20  | often a bit of |
00000cc0  66 75 6e 0d 74 6f 20 66  69 64 64 6c 65 20 77 69  |fun.to fiddle wi|
00000cd0  74 68 20 74 68 65 20 76  61 72 69 61 62 6c 65 73  |th the variables|
00000ce0  20 74 6f 20 73 65 65 20  77 68 61 74 20 73 74 72  | to see what str|
00000cf0  61 6e 67 65 20 65 66 66  65 63 74 73 20 79 6f 75  |ange effects you|
00000d00  20 63 61 6e 20 67 65 74  2e 0d 53 6f 6d 65 74 69  | can get..Someti|
00000d10  6d 65 73 20 79 6f 75 20  67 65 74 20 73 6f 6d 65  |mes you get some|
00000d20  74 68 69 6e 67 20 62 65  74 74 65 72 20 74 68 61  |thing better tha|
00000d30  6e 20 77 68 61 74 20 79  6f 75 20 68 61 64 20 6f  |n what you had o|
00000d40  72 69 67 69 6e 61 6c 6c  79 21 0d 20 20 20 20 20  |riginally!.     |
00000d50  4d 61 6b 65 20 67 6f 6f  64 20 75 73 65 20 6f 66  |Make good use of|
00000d60  20 79 6f 75 72 20 66 72  69 65 6e 64 73 20 69 6e  | your friends in|
00000d70  20 74 65 73 74 69 6e 67  20 79 6f 75 72 20 73 6f  | testing your so|
00000d80  66 74 77 61 72 65 2e 20  49 66 20 79 6f 75 20 61  |ftware. If you a|
00000d90  72 65 0d 6e 6f 74 20 73  75 72 65 20 77 68 69 63  |re.not sure whic|
00000da0  68 20 6f 66 20 74 77 6f  20 65 66 66 65 63 74 73  |h of two effects|
00000db0  20 6c 6f 6f 6b 73 20 62  65 74 74 65 72 2c 20 61  | looks better, a|
00000dc0  73 6b 20 61 72 6f 75 6e  64 2e 20 47 65 74 20 79  |sk around. Get y|
00000dd0  6f 75 72 20 66 72 69 65  6e 64 73 0d 74 6f 20 74  |our friends.to t|
00000de0  65 73 74 20 79 6f 75 72  20 70 72 6f 67 72 61 6d  |est your program|
00000df0  73 20 66 6f 72 20 79 6f  75 20 61 73 20 77 65 6c  |s for you as wel|
00000e00  6c 2e 20 49 6e 76 69 74  65 20 74 68 65 6d 20 6f  |l. Invite them o|
00000e10  76 65 72 20 74 6f 20 70  6c 61 79 20 79 6f 75 72  |ver to play your|
00000e20  20 6e 65 77 0d 67 61 6d  65 2c 20 61 6e 64 20 73  | new.game, and s|
00000e30  65 65 20 68 6f 77 20 6c  6f 6e 67 20 69 74 20 74  |ee how long it t|
00000e40  61 6b 65 73 20 74 68 65  6d 20 74 6f 20 63 72 61  |akes them to cra|
00000e50  73 68 20 69 74 21 20 54  68 61 74 20 69 73 20 74  |sh it! That is t|
00000e60  68 65 20 6d 65 74 68 6f  64 20 49 0d 75 73 65 64  |he method I.used|
00000e70  20 74 6f 20 74 65 73 74  20 53 68 69 70 77 72 65  | to test Shipwre|
00000e80  63 6b 65 64 20 74 6f 20  74 68 65 20 6c 69 6d 69  |cked to the limi|
00000e90  74 73 2e 20 56 69 67 6f  72 6f 75 73 20 74 65 73  |ts. Vigorous tes|
00000ea0  74 69 6e 67 20 69 73 20  75 6e 64 6f 75 62 74 61  |ting is undoubta|
00000eb0  62 6c 79 0d 74 68 65 20  6b 65 79 20 74 6f 20 73  |bly.the key to s|
00000ec0  75 63 63 65 73 73 66 75  6c 20 70 72 6f 67 72 61  |uccessful progra|
00000ed0  6d 6d 69 6e 67 2e 0d 0d  4d 79 20 6e 65 78 74 20  |mming...My next |
00000ee0  50 72 6f 67 72 61 6d 6d  69 6e 67 20 54 65 63 68  |Programming Tech|
00000ef0  6e 69 71 75 65 20 61 72  74 69 63 6c 65 20 77 69  |nique article wi|
00000f00  6c 6c 20 62 65 20 61 62  6f 75 74 20 47 72 61 70  |ll be about Grap|
00000f10  68 69 63 73 2e 0d                                 |hics..|
00000f16
P/+PT2.m0
P/+PT2.m1
P/+PT2.m2
P/+PT2.m4
P/+PT2.m5