21 February 2010 View Comments

Cool Way to Learn Computer Programming


This website will introduce you to some of the most important ideas in computer programming in an interactive, visual way through a guided activity. The activity is about a language for describing pictures. You will use a computer program that lets you type a sentence in the language, and shows you the picture that it describes. The aim of this activity is to let you understand something of what it is like to write a computer program, why it is that computer programming is difficult, and (we hope) why computer programming is a fascinating activity that can be totally absorbing.

To succeed in this activity, you will need to be prepared to think very carefully about what will happen when you write different expressions in our language of pictures. After a while, we will reach sentences that are sufficiently complicated that you will not be able to predict in complete detail what the computer will draw. Part of the point of this activity is that, although the rules for interpreting sentences in the language are simple and known, the effect of applying them systematically can be difficult to imagine. Because you will be using a computer, when we ask you to think about what picture will appear, it will be very easy just to type in the sentence, press the button and see. That’s all very well, but you will get a lot more out of the activity if you can explain to yourself why the computer draws the pictures it does.

Computers are very literal creatures, and you will soon discover that, unless you type in each expression exactly as you see it written on the worksheet, the computer will very likely complain that it does not understand what you mean, usually by giving a rather cryptic “error message”. Any little mistake, such as a spelling error or a missing bracket, will prevent the computer from doing what you want. This is just a fact of life when using computers; people have tried to make computer programs that can correct small errors, but (like the spelling checkers that come with word processors) the ‘corrections’ are often even less correct than the original mistakes, so that idea is usually more trouble than it is worth. At first, it seems humiliating that the computer is always complaining about ‘errors’ in your work, but computer programmers soon become used to just correcting the mistake and trying again.


Launch GeomLab

shot3

You are now ready to begin work on the first worksheet.

Let’s see how to draw the Escher picture “Square Limit”:

limit3-400

Tags:
blog comments powered by Disqus