How to introduce programming?


20 Oct
20Oct

Learning how to code is a life skill. If taught properly, it can change a pupil’s life for the better, while introduced at a wrong level or without the relevance that makes everything come together it can become torture and an exercise in frustration.

Of course, coding supports the main strands of computational thinking, such as decomposition, sequencing, pattern matching, abstraction, etc. The first thing to keep in mind is “decomposition” – most GCSE-level programming tasks are overwhelming and not obvious to a regular pupil. Things need to be broken down into strands and each strand needs to be practiced till the pupil is confident. Word problems that need to be turned into algorithms need to be scanned for key words, then inputs/output identified, then variables and their types need to be planned. After that, using “abstraction”, you would describe processing stages of the problem, e.g. 1. Input, 2. Validation, 3 calculation, 4 Report result, etc. These stages will become procedures in a structured, procedural programming paradigm, it then becomes a skeleton, on which all other code is added. 

Regardless of the language syntax, be it Python, Visual Basic, Java or Scratch, most of the techniques used to manipulate data are remarkably similar.

The following are the common programming strands:

  • Assignment and variable types, including arrays/lists and  dictionaries (associative arrays or hashes)
  • Operators on variables (which depend on the variable type): arithmetic, string, and Boolean, and graphic objects
  • Selection, nested selection
  • Iteration (conditional, unconditional), nested iteration
  • Procedures/modular programming, functions vs subroutines, local/global variable scope, parameter passing vs global variables
  • Sequencing as the outcome of decomposition—breaking a complex human-scale problem into a series of basic steps that can be executed by a computer. This includes knowing how to describe a sequence in an industry standard way, such as pseudocode and/or flowcharts.
  • Persistence—storing data for future access, reading previously stored data, organising this data into records/tables (flatfile or relational databases), CRUD (Create, Read, Update, Delete), data consistency,  non-redundancy
  • Debugging and IDE facilities and simplify coding and debugging
  • Testing and project management

Real life application is also important, so have a look how a simple 16-word script can keep telemarketers occupied.

Every coding task, all the way to A level and beyond will feature a combination of these strands but at the early stages, it's best to practice them in isolation. Here is a resource that looks at Assignment.

Comments
* The email will not be published on the website.