Teaching Programming

Computing without computers It is tempting to use computers for almost everything in computing lessons. However, providing activities such as role-play and creative writing, and using pencil and paper, can help clarify topics that can later be reinforced through computer use. For example, you could act out a binary search. The pupils can then discuss the algorithm used and try to implement it. CS Unplugged (www.csunplugged.org) and CS4FN (www.cs4fn.org) both have a range of resources for engaging pupils in active non-computer-based tasks. 

For some pupils, the fact that there are often several possible answers to a problem can be daunting. Others aren’t used to the ‘rapid fail – correct – fail better’ model of computer programming. Aim to create a classroom environment of mutual respect, and acceptance that people learn through their mistakes. It is not unusual for professional programmers to spend over 50% of their time locating and fixing mistakes in their programs. This can be very challenging TEACHING 3 Papert, S., Mindstorms: Children, Computers, and Powerful Ideas, (Basic Books, 1993), page 21. 3 TEACHING for the novice, and it is important to teach pupils techniques for locating and correcting the mistakes they have made. This is not the same as testing, which can tell us that the program does not do what we intended, but cannot tell us why. 

When pupils begin programming, they often need assistance in debugging. This can quickly become chaotic if their default is to immediately ask the teacher for help. One way to alleviate this problem is to implement a ‘brain, buddy, book (or internet), then teacher’ model, where pupils can only seek help from the teacher once they have exhausted the other routes of support. 

There are lots of websites to teach programming, but you might find that making a custom support site or video will help your pupils progress at their own pace. Encourage pupils to show their understanding by explaining their code line by line to one another. This is sometimes called rubber ducking or rubber duck debugging: see www. c2.com/cgi/wiki?RubberDucking. You will not know (and do not need to know) the answers to all the questions raised by pupils in a computing classroom. It is important that pupils see you using strategies to debug program code, to find answers and to model different possible solutions. As a teacher, you know how to structure and enable learning, and in the computing classroom it is important for you to research ways to support your pupils’ learning. One method is to purposely insert mistakes in your code and ask pupils to use the techniques you have taught them to find those mistakes.

 Let your pupils explore. Much learning happens through guided exploration. Giving pupils the basic instructions to change the colour of text or create simple graphics will allow them to customise tasks and put their stamp on their work, even when you are only asking for simple functionality such as working out the average of some numbers.

There are a broad range of languages available and you must pick at least one that is textual.

 • Visual languages such as Scratch and Kodu are an excellent starting point, but be aware that many pupils may have experience of these from primary school. 

• General-purpose textual languages such as Python, Visual Basic.NET and Java allow for a wide range of project work, including graphics, apps and games. 

• The formula language of spreadsheets is a textual programming language (albeit a limited one) that provides some insight into functional programming. Most spreadsheets offer a textual scripting language such as VBA or JavaScript to create more complex functionality. 

• Several languages (such as Logo) control the behaviour of a turtle or robot while at the same time introducing the idea of a textual language. Many general-purpose languages also offer this functionality. 

• Javascript is a fully featured programming language and can be used to teach programming. HTML and CSS are examples of specialised and declarative text-based markup languages that cannot be used to solve computational problems.

No comments:

Post a Comment