Many programmers in the UK got started around 1980 in a wave of enthusiasm inspired by the availability of novel machines such as the Sinclair ZX's and the BBC Micro. Today such computing as is taught in schools seems mainly to comprise the use of standard applications such as word processors and spreadsheets. This is sad because a great potential creative resource is going undeveloped. Instead we are increasingly sub-contracting programming to other countries. We are losing the skills in this country.
We want to demonstrate that every computer user has a powerful programmable machine in their hands and that it is not hard to use it. Can we not reignite the programming spark?
Programming is not necessarily mathematical but it does often give opportunities to apply simple mathematical thinking and therefore should help school pupils to see the usefulness of maths.
So you would like to learn how to program.
Those three things are all you need for this course. You don't have to go and buy any compiler or IDE (Interactive Development Environment), such as you may have heard people talking about. They are just trying to make it sound more daunting. Really it isn't!
And here is a more serious example:
Bad naming can have unfortunate consequences, and that is something that programmers should bear in mind when thinking of names for things in their programs.
This introduction includes many hands-on exercises to give real programming experience. Do make time to do the exercises rather than merely reading through this text. Practice is the only way to make it stick.
If you extend the examples and publish your own programs derived from them, please do the decent thing and mention the originator of this course: www.grelf.net
In this first section you will work with some complete examples. Feel free to try to extend them to do other things. That can be a useful way of learning. You will make mistakes but also discover ways out of them. However, if you want to go on and do serious programming of your own you should then work through the second part of this course, to learn how it really works, in a logical way.
Model answers for almost all of the exercises can be downloaded as a zip file from here (save the target of that link as file answers.zip and then unzip it). It is not possible to learn to program in any language without doing such exercises to find out what really happens, so please do not be tempted merely read the answers. Use them to compare against your own efforts after you have got something working.
This course is still WORK IN PROGRESS (February 2012). The pages that exist are considered finished. We have indicated where further pages are to be added soon.