Chapter 5. Theory interlude: problem solving and debugging
This chapter covers
- Confidently building your own programs
- Bringing ideas all the way from concept to finished program
- Testing and debugging techniques to find and fix errors
- The program-building progression in a full running program
In the past three chapters, you’ve been immersed in the essentials of TI-BASIC. From input and output commands to conditional statements and flow control, you now know the essential building blocks that go into any calculator (or computer) program. But if knowing the commands is like knowing the vocabulary of a language, and knowing how to use each command is like learning sentence structure, there’s one more step that’s key: you need to know how to put your sentences together into a coherent, flowing essay or novel. In addition, there’s a world of difference between a story that makes sense and a story that is action-packed and full of detail without wasting a single word. In this chapter, you’ll learn to construct the TI-BASIC equivalent of an enthralling story: a program that is fast, small, well-planned, and well-written. You’ll learn to track down the programming equivalents of spelling and grammatical errors: typos and mistakes in how your program works; I’ll also show you how to cut out unnecessary filler to optimize your programs.