Skip to main content

16 June 2022

Cognitive Load and A-Level programming

Javier De Las Heras profile image
Written by

Javier De Las Heras

Firstly, just to mention the three types of cognitive load (Garner):

  • Intrinsic cognitive load is determined by the mental demands of the task (Chandler & Sweller, 1996); programming is a domain with a high intrinsic cognitive load and this needs to be taking into account when teaching it. The intrinsic cognitive load cannot be reduced, however something can be done about the extraneous cognitive load.
  • Extraneous cognitive load is generated by how the new knowledge is taught; poor lesson planning leads to a high extraneous cognitive load. If a high extraneous cognitive load is combined with a high intrinsic cognitive load then this can lead to working memory overload. This is often what happens with novice programmers when the lesson is not designed appropriately.
  • Germane Cognitive Load is when the way the information is presented is optimum and the demand of the concept is not too high, then there is some working memory available to use for conscious processing. An example is the use of partially completed solutions in the learning of problem solving.

The evidence and theory from cognitive science says that presenting new material in small steps is an effective strategy to use with all students to avoid cognitive load. Sweller et al. (2011) summarised this research on cognitive load and the applications of this within education. Cognitive Load Theory builds on the multi-store model of human memory (Atkinson and Shiffrin, 1968) where the working memory receives, rehearse and retrieves information from either the sensory memory or the long-term memory. Long-Term Memory (LTM) holds a permanent and massive body of knowledge and skills in what is called schema. Working memory is the part of the brain that receives the immediate information through our senses. Working memory allows us to think creatively and solve problems, however, it has two limitations. Firstly, it is short-lived. Secondly, it is only capable of processing up to approximately seven things at a time (Miller, 1956), meaning that if too much new materials are presented, it will be overloaded.

It is well known that experts employ automated retrieval processes to recall information from highly organized schema in LTM; During recalling activities, knowledge is retrieved from Long-Term Memory into working memory, therefore, regular recalling and retrieving practice improves the efficiency and storage of knowledge within schema that will be needed by working memory when solving a problem. This process gradually become automated so novices can progress towards expert status. Consequently, there are two main strategies to alleviate the limits of working memory; schema acquisition, which allows us to chunk information into meaningful units, and automation of procedural knowledge (Wilson & Cole, 1996).

Finally, just to share some specific strategies that could reduce cognitive load in programming:

  • Use of Worked Examples and ask the students to annotate them.
  • Repeated practice using partially completed coded solutions for students to complete using the previous worked examples. Provide coding scaffolding or cheat-sheets when needed.
  • Remove gradually scaffolding or cheat-sheets from practice tasks. This ensures that less information is gradually required and the novice becomes an expert eventually.
  • Repeated practice, individually and in pairs (Pair programming)
  • Extensive repeated practice with problems that require mixed solutions, for example, a subroutine that requires date to be written using an external file. This strategy supports to build the schema even further by strengthening associations.
  • Chunking up the new programming techniques presented into small segments, for example, introduce selection with IF…ELSE with a lot of practice afterwards, then move on to present IF…ELSE IF..ELSE.
  • Present coding strategies used to solve problems, for example, if a block of code has to be repeated a specific number of times, that requires a counter-controlled loop.
  • Link new programming concepts with prior learning as much as possible
  • Use models in order to ensure students connect new knowledge to familiar scenarios, for example, use the analogy of a house when explaining OOP paradigm.
  • Provide tasks that are open-ended in terms of coded solution (Creativity).
  • Integration of text and graphics, such as diagrams, when presenting new concepts.

Discussion

Please login to post a comment

Javier De Las Heras
30/07/2022 11:07

Cognitive Load Theory in Computing

This is a very interesting podcast on CLT in computing. Thanks to Duncan Maidens from the Raspberry Pi Foundation for this on teachcomputing site. He talks here about the importance of considering cognitive load when designing teaching activities. An excellent listening!

Click here to listen

Simon Humphreys
17/06/2022 15:24

That they are a musician

Of course, I’d always put a thumbs up to that one :slight_smile: and having been that student who would often be found weeping over my Maths homework I tend to subscribe to the view that Maths may not be the best predictor for either GCSE or A Level though my view does adjust for degree-level (with the caveat that this can depend on the course being undertaken). I’d actively encourage teachers to consider Music and MFL as a potential metric for CS suitability at either GCSE or A Level, and not just Maths. I know what the stats say, for the current cohorts, but I suspect we’re missing a number of equally capable students by ignoring other factors in their profile.

As for learning how to program: I have often said to my students “I can teach you how to program, but I cannot turn you into a programmer”. It’s similar to, “I can teach you how to play the piano, but I cannot turn you into a pianist”. Unless (and it’s a big unless), you spend time in between each lesson practicing, and then practicing some more! Just the same for my piano students - practice what I’ve asked you to practice and practice pieces that you like, in new styles or just fancy having a go at. Practice doesn’t necessarily make perfect but it helps. It helps to build memory, reinforce learning etc… It’s like any skill (art/craft) the more you do, the better you become and the tips given here are really good - thanks.

Javier De Las Heras
16/06/2022 14:38

Hi Richard,
Good point. In my experience, It depends greatly on how keen the students are on the subject and of course, as you said above, their mathematical/logical skills.

Thanks for your comments. Really appreciated.

Richard Pawson
16/06/2022 12:54

Interesting post and examples, Javier, but I’m not sure I agree with the rider ‘especially the ones that did not take the subject at GCSE’. I found that I had some students who struggled despite having taken the GCSE CS, and others who coped well with the A-level without having taken the GCSE (or equivalent) and without any prior experience of programming. However, the latter were typically strong in mathematics. Years ago, I used to recite the mantra that ‘you don’t need to be good at maths to be good at programming’. I no longer subscribe to that view.

IMO (and, no, I can’t supply empirical data to support this this!) the best predictors for success at A-level CS (prior to starting the A-level) are, in descending order:

  1. The pupil already programs for pleasure - whether self-taught or having learned it in school. i.e. they voluntarily spend time programming outside of any formal school activity. In this respect, CS is, I believe, more like Music or Art than other sciences.

  2. The pupil is strong at maths. Strong means that they are almost certainly planning to take Maths A-level. If not I would want to know why not (there can be valid reasons, obviously) and I would want to see either a grade 8/9 GCSE in maths, or confirmation from the teacher that they could/should have got an 8/9 but the exam score did not reflect their ability, for whatever reason.

  3. That they took GCSE CS and scored an 8/9, or, again, their CS teacher believes that they could/should have got an 8/9 but the exam score did not reflect their ability, for whatever reason.

  4. That they are a musician. OK, I wrote this one in jest! But its quite widely believed in professional programming circles that there is a correlation between programming skill and musical ability. No one suggests it is a reliable predictor though - which is fortunate for me, as I am (sadly) not musically skilled.