Learning by programming

One of the most educational thing you can do with a computer is write programs for it. Programming teaches you to be a logical thinker (because that's the only way to communicate with a computer) and a persistent troubleshooter because mistakes are an inevitable by-product of writing programs). Developing these skills is useful whether or not you make programming a lifetime career or hobby.

There are several different programming languages for the Apple IIGS. The most popular for beginning programmers are BASIC, Logo, and Pascal. Vocabulary and syntax vary from one language to another, but programming principles stay the same. Once you learn one language, it's relatively easy to learn others. Here's a short description of BASIC, Logo, and Pascal.

  • BASIC: An acronym for Beginners All-purpose Symbolic Instruction Code. This language is easy to learn because it allows you to write instructions for the computer in English-like words and phrases. A version called Applesoft BASIC is built into your computer, so there are no special disks to buy. Because BASIC was the first language built into personal computers, you'll find hundreds of books on the subject and many people who "speak" the same language.
     
  • Logo: This is a good first programming language because you can learn the fundamentals of programming by creating graphics. You start by learning to move a turtle (a cursor shaped like a triangle) around the screen. The turtle knows a few words like FORWARD, BACK, LEFT and RIGHT. You tell the turtle how many steps to go and how many degrees to turn. As the turtle moves, it leaves a trail on the screen. Ideally, you aren't just taught how many steps to take or how many degrees to turn to draw a square, a circle, or a triangle. The motivation for learning how many degrees make a right angle, a circle, and so on comes from your desire to draw a house, a ball, or a tree.

There are several "dialects" of BASIC. The Apple IIGS dialect is called Applesoft BASIC.

Next PageContents

82

Chapter 5: Application Programs