ch01-pag23

TESTING IS A vital part of programming. It’s said that you should spend as much time testing your programs as you spend writing them. In this appendix, we show you ten simple techniques, tools, and tips for finding and preventing errors, or bugs, in your programs.

Practice Proper Planning

The key to success in programming is planning. If your program is going to involve multiple scenes, scripts, or sprites, sketch it out on paper or in a drawing program before you start coding.

Another name for this rough drawing of your program is wireframe. For example, Figure B-1 shows how you might draw a wireframe for the 3-Ring Circus program that you created in Adventure 5.

image

Figure B-1 A wireframe for the 3-Ring Circus program

When you’re drawing a wireframe, don’t worry about how it looks or about getting everything perfect. The idea is just to create something visual that you can look at while you’re programming to help you ...

Get Adventures in Coding now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.