From primary school onwards, children’s arithmetic has two quite distinct stages: thinking about the question, and then working out the answer. A sum as simple as 23 + 39 demands that the child be able to decode these symbols in some meaningful way and determine which algorithm to bring to bear in order to calculate the answer: then, and only then, can the child go on to working out the answer. When faced with a word problem, for example, how much change will I receive from a 5 pound note if I buy three apples each costing 40 pence, the same two stages apply, this time demanding a degree of abstraction as the child moves from the particular context to its mathematical representation, in this case 5 – 3 x 0.40.

More generally, we might see that most, indeed perhaps all, mathematics mirrors these two stages – thinking about problems and then manipulating symbols according to rules (i.e. a more sophisticated version of working things out). The formalist view of mathematics is that mathematics consists of the consequences of certain string manipulation rules: for example Euclidean geometry can be thought of as those statements which can be formed by manipulating geometric axioms according to the laws of inference. However, even within this formalist paradigm, practical, useful mathematics demands some thinking about which particular manipulations of strings will take us towards the solution of the problem facing us.

This view of mathematics as symbol manipulation lies at the foundation of computing. Up until the 1940s, *computer* was a job title – given to those paid to do arithmetic on paper or mechanical calculators according to the rules and procedures given them by their managers. Turing expressed this symbol manipulation view of mathematics in his seminal paper, ‘On computable numbers, with an application to the Entscheidungsproblem’, defining computable numbers as those which could be written down by a machine and generalising this to computable functions and computable predicates: it is on this work (and the parallel work of Alonzo Church) that computer science is founded, and thus the strong connections between mathematics and computer science, from primary school level up should not surprise us.

In the decades since Turing’s and Church’s work, mathematics, as with so many other fields, has been transformed by digital computing. The symbol-manipulation (or working out) phase of the mathematics done in science, finance, social sciences, the arts and every other domain (other than education) is done now by digital computers, rather than by people, as Conrad Wolfram explains in his TED talk. Indeed much of the symbol manipulation of even pure mathematics is now often done by digital computers rather than mathematicians, or their research assistants, themselves (see, e.g., Appel and Haken’s computer-assisted proof of the Four-Colour Theorem.)

The first phase of mathematics – thinking about the problem or the system – remains largely unchanged. Creative and imaginative problem solving lies at the heart of mathematics. Polya suggested four principles for problem solving: understand the problem, devise a plan, carry out the plan and look back, plus a number of associated heuristics.

Wolfram argues convincingly that this is what mathematics education should now focus on, given that actual computation is now done by machines, and suggests his own four-stage helix for problem solving: define questions, translate to maths, computer answers and interpret. There are parallels here with the development process in software engineering: specification, design, implementation and testing.

It would be wrong to think of school mathematics as being confined to manual computation. Problem solving and mathematical reasoning is an essential part of mathematics education. For example, the English National Curriculum aims to ensure that all pupils:

reason mathematically by following a line of enquiry, conjecturing relationships and generalisations, and developing an argument, justification or proof using mathematical language; and

can solve problems by applying their mathematics to a variety of routine and non-routine problems with increasing sophistication, including breaking down problems into a series of simpler steps and persevering in seeking solutions.

Given the strong connections between mathematics and computer science, it would be surprising if the sort of mathematical reasoning involved in understanding problems and planning their solution was not mirrored by similar thinking in specifying systems and designing solutions in the field of computing. Just as mathematics might be seen as thinking followed by symbol manipulation, so programming can be seen as **algorithms plus code**. Before programmers begin work on coding solutions, they need to have fully understood the problem and have a clear plan (an algorithm) of how to solve it.

The term ‘computational thinking’ has been coined to describe

the thought processes involved in formulating problems and their solutions so that the solutions are represented in a form that can be effectively carried out by an information-processing agent. (Wing, 2010)

Whilst there is not yet a universal consensus over the exact ingredients of computational thinking, its importance in computing education is widely accepted. It is seen as a ‘golden thread’ running through the English National Curriculum for Computing, which begins:

A high-quality computing education equips pupils to use computational thinking and creativity to understand and change the world. Computing has deep links with mathematics, science and design and technology, and provides insights into both natural and artificial systems.

Building on Brennan and Resinick’s work in which computational thinking is explored as concepts, practices and perspectives, Computing At School’s ‘Barefoot Computing’ continuing professional development programme for primary teachers identified six concepts and five approaches for computational thinking (qv Computing At School’s QuickStart Computing handbook). The concepts provide a unified approach to problem solving in both mathematics and computing, with a number of the example activities produced for Barefoot Computing linking these to topics in the English mathematics curriculum.

**Logical reasoning**- In computing pupils use laws of inference to predict what programs will do from their source code, to detect and correct errors in algorithms and programs and to analyse the efficiency and correctness of algorithms; pupils learn about Boolean logic and its applications to circuits, programs and search. Program execution by CPUs relies on logic gates.
- Mathematics is underpinned by set theory and logic. Mathematical reasoning is fundamentally logical reasoning. In maths, pupils will be expected to ‘show their working’ and to provide a justification for their answer. They form a basic understanding of sets and their relationship, which is later formalised through Venn diagrams and the notation of set theory. They are introduced to simple proof techniques in Euclidean geometry, and will use
*reductio ad abusurdum*and induction at A level.

**Algorithms**- From an early age, pupils learn about algorithms as sets of rules or sequences of steps for real life situations such as making a jam sandwich or tidying their classroom. They learn how these algorithms are implemented as code on digital devices. They learn that there are multiple algorithms for the same problem. They create their own algorithmic solutions to computational problems and are taught some classic algorithms for search and sort, finding greatest common divisors and testing for primality. They study greedy and divide-and-conquer algorithms in a range of contexts, including graph theory. They compare the efficiency of algorithms, in time learning to use big-O notation.
- Pupils are typically taught standard algorithms for problems in arithmetic and subsequently algebra. This might be as simple as ‘count out the first number of sweets; count out the second number of sweets; now count how many sweets you have’ for integer addition, but will go on to include standard written algorithms for long multiplication and division, as well as methods for solving linear, simultaneous, quadratic and simple differential equations. Pupils are taught standard algorithms in other contexts, including testing for primality. They learn formulae for finding perimeters, areas and volumes, and for solving quadratic equations. Some pupils may discover their own algorithmic approaches to solving some classes of problems.

**Decomposition**- Pupils learn to break down complex problems into smaller ones, tackling each of these in turn. Pupils learn how divide-and-conquer algorithms are applied recursively, efficiently reducing the number of steps needed to solve a problem (e.g. Quicksort). Pupils make use of decomposition in their programming, using procedures, functions or classes to allow the different components of complex software to be developed and tested independently. At the hardware level, pupils come to recognise how digital devices are made of multiple, complex components, each typically made from multiple, complex subsystems.
- Decomposition is also a powerful problem solving technique in mathematics, with pupils applying this in different contexts during their time at school. At an elementary level, pupils recognise how numbers are decomposed into parts using place value, and subsequently prime factors. Simple arithmetic algorithms rely on ready familiarity with decomposition using place value. Pupils learn how the area or volume of complex shapes can be found through decomposition. Subsequently, pupils learn how vectors can be decomposed into orthogonal components and how matrices (and thus systems of linear equations) can be decomposed in a number of ways.

**Patterns and generalisation**- In computing, pupils come to recognise common ways to solve similar problems (for example, drawing equilateral triangles, squares and regular pentagons with a turtle), subsequently developing a general solution to a class of similar problems (in this case, drawing a regular polygon). Pupils learn to use libraries of functions developed by others rather than re-creating this code for themselves. They learn how other programmer’s solutions to problems may be modified to solve similar problems. As pupils’ software projects become more complex, they may make use of design patterns in their work, such as ‘model-view-controller’, which can be applied in a wide range of contexts from computer games to text editors.
- Young children come to recognise patterns at an early stage in mathematics education, colouring in shapes according to a rule or deciding what will come next in a sequence. They generalise their own rules of conservation of number, shape and mass from observation. Later they are introduced to patterns in number, including the times tables as well as common sequences such as square, triangular numbers and the Fibonacci sequence. They conduct mathematical investigations, first describing the rules they discover and then expressing these in algebra, as recurrence relations and then as formulae. Pupils learn generalised algorithms or techniques – thus pupils learn the algorithm for long multiplication rather than memorising times tables to 100×100 or beyond and standard results for derivatives rather than computing each from first principles.

**Abstraction**- For Jeanette Wing abstraction lies at the heart of computational thinking, and its particular form in computer science serves to distinguish computational thinking from other approaches to problem solving. Computer systems, both hardware and software, are so complex that computer scientists and software engineers have found it essential to establish ways to
*manage*this complexity, by hiding or setting to one side multiple layers of detail. Pupils might first meet abstraction explicitly in the form of ‘computational abstractions which model the state and behaviour of real world systems’ – for example the motion of a Snooker ball or the spread of an epidemic. They’ll also recognise abstraction in functions, classes, libraries and APIs they use in their code: where the details of implementation are left hidden, and at times inaccessible, behind well documented specifications. They’ll also recognise abstraction in their mental models of computation (or ‘notional machines’ where the layers of user interface, compiler / interpreter, operating system and the processor’s presentation layer sit between their actions and the copper and silicon of the hardware. - Abstraction is important in mathematics education too, with the curriculum taking pupils from the concrete to the abstract along a path that would be familiar still to Piaget. At an early age, pupils form an abstract notion of, for example, three-ness from the concrete three bears, three sweets, three books etc. They form an abstract notion of triangle or cube from the experience of particular triangles and cubes. In problem solving, pupils identify the important information in the phrasing of a question, setting to one side the less relevant or irrelevant detail. Algebra might be seen as an abstraction of number, with algebra, geometry, probability and calculus the mathematician’s approach to modelling the state and behaviour of real world systems.

- For Jeanette Wing abstraction lies at the heart of computational thinking, and its particular form in computer science serves to distinguish computational thinking from other approaches to problem solving. Computer systems, both hardware and software, are so complex that computer scientists and software engineers have found it essential to establish ways to
**Evaluation**- In computing, it’s necessary for pupils to check whether the functions, classes and programs they write produce the results they should. It’s also important that digital artefacts (including, but not limited to, programs) serve their intended purpose and are appropriate for their intended audience, and embody principles of good design. Pupils will also consider the efficiency, and indeed elegance of their code.
- In mathematics, pupils are taught to check their solutions, for example that numbers are broadly of the correct order of magnitude and make sense in the context of the original problem. They are also taught to check their working, that each step of their solution has been carried out correctly. Later on, they’ll learn to look for logical flaws in proofs and perhaps even grasp something of the aesthetics of ‘elegant’ proofs.

It seems that we could gain much through the language, and perhaps even the approach, of computational thinking within the domain of school mathematics.

The concepts of computational thinking can be learnt and applied in ‘unplugged’ approaches, within and beyond computing, without the use of digital technology (as the above comparison with mathematics education illustrates, see also, e.g. CS Unplugged). Wing’s ‘information processing agent’ certainly includes digital computers, but need not be limited to such devices.

That said, many would argue that ‘computational thinking’ can be developed particularly (perhaps most) effectively when linked explicitly to the ‘computational doing’ of computer programming:

Programming plays the same role in computer science that investigations do in maths or science. Programming animates the subject and brings computer science to life; it is creative, and engaging. It illustrates otherwise-abstract concepts in completely concrete terms. It is also an incredibly useful skill. (Peyton Jones 2014)

Papert wrote how that he

began to see how children who had learned to program computers could use very concrete computer models to think about thinking and to learn about learning and in doing so, enhance their powers as psychologists and as epistemologists.

The experience of most primary and secondary computing teachers seems to be that computational thinking is best taught when linked with directly with computer programming. It’s possible to argue, as Wolfram does that, if computer programs and computer programming were used more extensively in mathematics education, then this would allow teachers and pupils to focus much more attention on developing mathematical reasoning (or perhaps ‘computational thinking’) rather than mere calculation skills.

*Our sides are below:*

On the other hand, few would now argue that we can teach the new computing curriculum without setting aside some dedicated time to mastering the content of this new foundation subject. In the move from ICT to computing, our focus shifted away from the skills of using technology to knowledge and understanding of the principles of information and computation. It seems that mastering the foundational ideas of computer science, and particularly programming, requires some dedicated curriculum time. That’s not to say though that computing should be taught in isolation: the other subjects can provide motivating, relevant contexts for pupils to apply their computational thinking and programming skills.

Computational thinking is the golden thread running through the computing curriculum: this is about looking at problems in such a way that a computer can help us solve them. It draws together such concepts as logical reasoning, decomposition, patterns, abstraction and algorithms, as well as approaches such as tinkering, making, debugging, persevering and collaborating.

The foundations of computational thinking are laid in EYFS’s characteristics of effective learning, but these concepts and approaches can be applied to any area of the primary curriculum further up the school: following or writing instructions makes use of algorithmic thinking; doing corrections in maths is debugging; looking for explanations in science is logical reasoning, and so on. As pupils become better at computational thinking through computing lessons, they’ll be better able to apply this across the curriculum.

I think we can go further than this though. As pupils have been getting better at programming, I think we’re reaching the point where they can start to use this to do some creative things in other subjects. This isn’t merely about using other subjects as a context for learning to code, this is about coding as a way to help pupils learn in other subjects too. Here are some examples:

The relationship between maths and programming goes back to Alan Turing and the the foundations of computer science. Simple turtle graphics are a great way to help pupils get a far more visceral feel for geometry, as they put themselves in the place of the turtle. Pupils quickly learn for themselves that exterior angles sum to 360˚. Writing programs where sprites move around the screen in Scratch similarly makes coordinates and negative numbers seem more real and more useful.

In maths, we make use of algorithms (sequences of steps and sets of rules) all the time. We’ll teach pupils algorithms for checking if a number is prime, for finding common factors or for doing arithmetic with fractions. With a few coding skills, pupils could put their knowledge of these to the test by writing their own programs to implement these rules, trying them out with much bigger numbers than the exercises we set, and perhaps even finding faster algorithms for the same problem.

Scratch has music making tools built in – it’s easy enough to record and play back audio, but it’s well worth getting pupils to experiment with creating music by sequencing notes and their durations. There’s a range of instrument and percussion available, and it’s possible to play multiple notes at the same time, so pupils can experiment with chords and polyphony. Repetition in programming can be linked to music compositions too, and pupils can explore randomly generated music, or music that reacts to input from mouse, keyboard or sensors. Pupils can improve their compositions in the same way as they debug their programs.

Beyond Scratch, Sonic Pi and EarSketch take the text-based, grown-up programming languages Ruby and Python and make them directly applicable to musical composition. They’re certainly accessible to upper primary pupils, but go way beyond that level. There’s some amazing work going on at the moment at the intersection between music and computer science.

use_bpm 90 use_synth :pretty_bell define :sequence1 do play_pattern_timed [:e,:e,:f,:g], [0.5,0.5,0.5,0.5] play_pattern_timed [:g,:f,:e,:d], [0.5,0.5,0.5,0.5] play_pattern_timed [:c,:c,:d,:e], [0.5,0.5,0.5,0.5] end sequence1 play_pattern_timed [:e,:d,:d], [0.75,0.25,1] sequence1 play_pattern_timed [:d,:c,:c], [0.75,0.25,1] play_pattern_timed [:d,:d,:e,:c], [0.5,0.5,0.5,0.5] play_pattern_timed [:d,:e,:f,:e,:c], [0.5,0.25,0.25,0.5,0.5] play_pattern_timed [:d,:e,:f,:e,:d], [0.5,0.25,0.25,0.5,0.5] play_pattern_timed [:c,:d,:g3], [0.5,0.25,1] sequence1 play_pattern_timed [:d,:c,:c], [0.75,0.25,1]

*Sonic Pi code to play the melody from Beethoven’s Ode to Joy.*

There’s an expectation in the Design and Technology curriculum that pupils at Key Stage 2 will

“apply their understanding of computing to program, monitor and control their products.”

Platforms such as the Lego WeDo, Crumble and the BBC micro:bit make it much easier than ever before for pupils to take their first steps into the realm of ‘physical computing’, using buttons, switches and sensors to accept input, writing their own code to process this and producing output through LEDs, speakers and motors. Whilst the BBC micro:bit’s initial distribution was to secondary schools, the online editor and emulator is accessible to all at microbit.co.uk.

The most exciting work in physical computing, at school and beyond, is happening on the Raspberry Pi: which has a set of general purpose input and output pins built in, and support for using these from its own version of Scratch. There’s a ‘sense hat’ too, which incorporates a tiny display, joystick and some sensors: a couple of these, with programs written by British school children, went up to the international space station with Tim Peake for the Astro Pi.

Turtle graphics in Scratch, Logo or Python needn’t be restricted to maths – there’s ample scope to use this as a medium for pupils creative work in art too. QCA’s old scheme of work for ICT had a lovely unit on crystal flowers, there’s plenty of scope to explore tessellating patterns and Islamic art has a rich history of beautiful, geometric art to provide inspiration here. There’s also scope for exploring more natural patterns, experimenting with simple code to create recursive fractals for trees, fern leaves, broccoli or coastlines.

Scratch has excellent support for working in foreign languages – the familiar English of the programming blocks can be replaced with keywords from many other languages, even including Latin. This is great for pupils learning English as an additional language, but is also a nice way to build up pupils’ familiarity with a foreign language. Scratch is great for producing short, scripted animations, with on-screen and recorded dialogue or narration: why not have pupils program animations for a language they’re learning, or even a simple chatbot?

You can also program Scratch (or Python) to generate semi-random, but grammatically correct sentences, using the computer science idea of a finite state machine. Playing with this gives some insights into the structure of a language: you could do this for English, but also for any other language that pupils are learning.

Looking for ways for pupils to use their IT skills across the curriculum, such as searching for information, making presentations and editing videos, remains as valuable as ever. Alongside this, I think we should now start looking for some of the cross-curricular ways that pupils can use their programming skills too.

*Originally published in Teach Primary, June 2016. © all rights reserved. I explored these ideas further, with reference to the secondary curriculum, in my plenary at #casconf16:*

You don’t have to go to Harvard to study CS50 though. The course content is all available *for free* through edX, as CS50x, an online, self-paced MOOC. There’s a pretty rich collection of content here: videos of the lectures given on campus, challenging, auto-graded problem sets (psets) linked to each lecture in the course, lots of support resources including an impressive online IDE (powered by cloud9), coding examples, short tutorial videos, and walkthroughs and post-mortem videos for the psets. The production standards of all this are really very high. You can take the MOOC with some ID verification (and a $90 fee) to get a certificate at the end if you want.

There’s also a version of the course that’s been tailored to US high school students sitting College Board’s new Advance Placement CS Principles exam. This uses much of the same content and maintains the same rigour, but breaks the course down into smaller bits. The Harvard team seem to be going out of their way to make this something that high school teachers can access, adopt and adapt. There’s a couple of modes to delivering the course, I guess depending on time and expertise: one would be to take David Malan’s lecture slides and the associated notes and materials as a starting point for ones own teaching, the other would be to use the CS50 materials in ‘flipped’ mode, getting students to watch the videos at home and then use class time for discussion, coding examples and work on the psets.

A few of us gathered together at Microsoft’s London office over the bank holiday weekend to learn a little more about this version. I think we were pretty impressed by what we saw. It’s worth saying that there are other courses which lead up to the CS Principles AP exam, including Berkeley’s Snap! based Beauty and Joy of Computing and a course from Code.org.

**Accessibility**: On campus, 72% of those taking the course have never studied CS before. The ambition is to create a course experience which crosses all divides. The diversity of the CS50x community is some testament to that.

The course starts from Scratch (literally), the on-ramp is deliberately gentle, although the traffic is fast-moving. There are some great online support resources that sit between the lectures and the psets, which isn’t the case with some other MOOCs I’ve taken in the past. In College, there are large numbers of undergraduate ‘teaching fellows’ recruited from previous cohorts supporting, and grading, students’ work – I could see some schools’ ‘digital leaders’ taking on responsibilities similar to this.

The lectures include quite a lot of unplugged and computational thinking content:

Whilst Harvard and Yale students, and MOOC participants, are perhaps not typical of the population as a whole, making the course accessible to a broader demographic, and providing granular support seems to be a priority in the AP version of this.

The underpinning philosophy is admirable:

what ultimately matters in this course is not so much where you end up relative to your classmates but where you, in Week 11, end up relative to yourself in Week 0.

**Rigour**: There’s no doubt that this is a hard course, particularly so after the first few psets. Prof Malan is unapologetic about this, believing that learners will rise to meet the challenges they’re presented with. I’m conscious that this might seem at odds with the preceding claims about accessibility, but changes to curriculum and assessment at home are, in part, about raising the expectations for all:

Teachers should set high expectations for every pupil. They should plan stretching work for pupils whose attainment is significantly above the expected standard. They have an even greater obligation to plan lessons for pupils who have low levels of prior attainment or come from disadvantaged backgrounds. Teachers should use appropriate assessment to set targets which are deliberately ambitious. (DfE, 2013)

There are two elements of rigour here that deserve special mention.

First, after the initial, Scratch-based, introduction, the main programming language is, er, C. I’ll admit that this struck me as odd for an introductory course, especially given the primacy of Python here for programming in secondary schools (see, e.g, Sentance, 2015 and Martin, 2016). I’m pretty much convinced that Python is the right choice – low floor, wide walls, high ceilings, just as Papert would want for an introductory language, plus a great support community and lots of resources. However… C does get you somewhat closer to the machine itself, which I suspect makes for a better *notional machine*, and the syntax carries over into lots of languages that owe their heritage to C. Malan provides some further justification for the choice on Quora. Other languages get used in the latter half of the course (PHP, JavaScript and SQL) where the focus shifts to developing web-based applications, and the final project can be attempted in any language you want.

The other is the grading. Grading on the edX version of CS50 is simplicity itself – if your solution to each pset passes all the automatic unit tests, you get full credit for the pset. The CS50 team have developed a check50 tool so you can run the unit tests yourself before submitting your work. I like this approach. It does, however, do little to encourage good commenting, good layout or good design. In College a multi-axis approach to grading is used, and this approach is recommended for the AP version too.

The axes are

*Scope*: To what extent does your code implement the features required by our specification?*Correctness*: To what extent is your code consistent with our specifications and free of bugs?*Design*: To what extent is your code written well (i.e., clearly, efficiently, elegantly, and/or logically)?*Style*: To what extent is your code readable (i.e., commented and indented with variables aptly named)?

There’s then a weighting applied, with the overall grade for a pset determined by *scope * (3 * correctness + 2 * design + 1 * style)*. Scope, correctness (using check50) and style are pretty easy to determine (the latter made easier via a quasi-linter, style50 and the course style guide), but design is much more subjective and, I think, much harder for a non CS specialist to determine. As a starting point, Doug Lloyd (who’s coordinating the AP version of this) suggested getting students to ask themselves:

- Can I eliminate:
- Repetition?
- Loops?
- Magic numbers?

- Is there a shorter way to accomplish the same thing?
- Should this code have been broken out into its own function

The psets each have detailed grading rubrics for those teaching on the course, which helps.

**Culture**

There’s no doubt that CS50 has a real buzz to it at the College. This starts with a puzzle party at the beginning of term, free cake after the first lecture, a hackathon, a programming contest and a fair at the end of the course to showcase final projects. There are CS50 t-shirts, stress balls and a high profile presence across social media. There’s a well articulated, and consistent, message that the course is hard, but fun. This has, unsurprisingly, upset some folk. For anyone looking to promote the profile of computing in their school, (qv Brown, 2014 [ppt]). I think there’s much to be learnt from this. I could see puzzles and problems taking off in schools, and I know a few folk who’ve already tried out school hackathons, although perhaps not on the 7pm to 7am schedule of the Harvard version.

Another key element of culture in CS50 is the emphasis on academic honesty. There’s detailed guidance on each pset about what is and is not appropriate help, but much of this boils down to:

“when asking for help, you may show your code or writing to others, but you may not view theirs”

One of the dangers with MOOCs is that solutions to problems do get posted online, and too many students might fall prey to the temptation to base their own solutions on these. *This absolutely never, ever happens with controlled assessments for GCSE computing*. CS50 has such a strong presence on a range of social media that folk on the main channels seem to be pretty good at keeping to the spirit of the academic honesty policy. There may well be solutions out there, but you’re unlikely to encounter them by accident in the main support fora. CS50 does use plagiarism detection software (moss and ETector), and has no qualms about reporting students for academic discipline infringements, but, uniquely at Harvard, also has a regret clause – if students own up to breaking the academic honesty policy within 72 hours of the offence, the course manages this themselves rather than reporting it up to the ‘Ad Board’ for more drastic sanctions.

CS50 and its derivatives have been developed in a US context, and not everything translates across perfectly. Their higher education system has some significant differences from ours, as does their school system. There are, though, some ways that we could make use of the amazing work that’s gone into this.

**ITT and CPD** We’re all acutely aware that one of the biggest challenges for making a success of the computing curriculum and associated qualifications is teachers’ own subject knowledge – almost uniquely, computing is a subject where we expect teachers to teach something they didn’t learn at school or university themselves. We’ve done much to address this subject knowledge gap, through initiatives like Barefoot, QuickStart and Tenderfoot, as well as the activities of CAS Master Teachers and others. There are also generous bursaries and scholarships to encourage computer scientists and software engineers to train to teach in secondary school.

I do see a role for the CS50x as a high quality, rigorous and challenging element of computing CPD, both for those who’ve never programmed before and for those who’ve picked up some skills in Scratch and/or Python but are now looking to extend their programming knowledge into lower level programming as well as developing web-based apps. I think CS50x would also work well as subject knowledge enhancement for those wanting to train as computing teachers, at both primary and secondary levels, but lacking an A level in computer science or whose degrees didn’t include much, if any, programming.

Alongside all the subject knowledge content, I think there’s much that teachers can learn from watching someone of Malan’s class teach: I know I certainly have, even if I have no hope of matching his energy and polish. In the style of those director’s commentary DVD extras, he’s recorded a pedagogic commentary on the 2014 version of the lectures.

**Resources and psets** The video content (plus slides and notes) for CS50 and CS50 AP are *really* high quality, and could be used very easily to support teaching at both GCSE and A Level. Rob Leeman from OCR joined us for some of the weekend and demonstrated how what’s there maps to OCR’s GCSE specification; he’s doing a similar mapping to the A Level spec. Looking at the A Level subject content requirements from the DfE, I reckon the coverage should be good, although far from perfect, for other boards too.

If you’re willing to adopt C as an initial teaching language (and it’s a big ‘if’), then the psets themselves could be of great value, perhaps particularly in their more granular AP format. Even if you’re using another language, the pset tasks and unit-testing approach could still prove useful. I do worry at times that our approach to computing education has moved too far in the direction of unplugged approaches, and computational thinking without computational *doing*: CS50 provides, for me, a welcome emphasis on programming as the medium for learning much of the other subject matter.

Another fab resource is cloude9’s online IDE for CS50. To get access, all you need is an edX account, and I think these are available for pupils (over 13) as well as for teachers. This is a web interface to your own Ubuntu virtual machine, with a really simplified user interface: there’s an editor, a file browser and a console. Whilst optimised for C, the IDE has Python 2 and 3 installed out of the box, and installing new packages is simply a matter of `sudo apt-get install foo`

. The IDE has built-in real-time collaborative editing too, as per Google Docs. There’s something similar available from Codio, which some CAS teachers will have encountered already as part of the BCS/CAS certificate scheme.

**Teaching the course** As things stand, I don’t think there’s anything to stop schools here registering as centres with College Board and entering pupils for AP CS Principles. At the moment, it doesn’t actually carry UCAS points, but the other AP exams do, and I guess there’s some sort of routine recognition protocol that will mean new AP exams get UCAS points too. It would be odd if they didn’t. However, this isn’t an Ofqual regulated qualification and it certainly *doesn’t* count for performance tables. I suspect that without this recognition it would be a brave head teacher or principal that would devote limited resources to teaching a course designed for such an exam.

That said, the final project element of CS50x or CS50 AP (which counts for 24% of the AP CS Principles grade) could be submitted as a practical project for the EPQ – this too carries UCAS points, seems well regarded by the Russell Group:

As well as your advanced level qualifications you might also consider the Extended Project Qualification (EPQ) which provides the opportunity to develop valuable independent study and research skills. Russell Group universities value the EPQ which can be drawn upon in your personal statement and at interview to provide evidence of enthusiasm for your chosen subject. Some Russell Group universities may also include the EPQ in their offers – check individual university guidance for more information.

… and, crucially, counts for the academic performance measure in sixth form and college league tables (even if it doesn’t count towards the A-level section of the tables).

To get more of a flavour of the CS50 experience live, come along to the CAS Conference on 18 June 2016, where David Malan’s giving the closing keynote.

I’d be interested to hear what others think about using these materials, teaching this course: is the context too far removed from our own? Is C too off-putting? Does the mismatch between the course and our qualification / accountability framework make this a non-starter for most English schools? Have you made use of MOOCs such as this for developing your own, or your colleagues’ subject knowledge? Was that a positive experience?

]]>**Extra-curricular opportunities**

Even where computing hasn’t made it onto national curricula, there’s much interest in supporting provision beyond the school curriculum. It’s easy to forget that Scratch itself started in the context of provision outside school, with Resnick’s Computer Clubhouse work, which always had a focus on otherwise underserved communities, and I’d argue that most exciting and innovative Scratch projects are coming from individual Scratchers and Scratch Studios rather than school or classroom projects. Coder Dojo, Code Club and Apps for Good operate internationally, and there’s global interest in products such as Raspberry Pi and the BBC Micro:Bit. I’m sure we were right to include computing in the statutory curriculum as this enshrines ideas of entitlement and inclusion, but I don’t think this should be at the expense of extra-curricular opportunities. No one gets to Carnegie Hall just through going to class recorder lessons: similarly, whilst our computing lessons open up CS to many who would otherwise not have studied this, those who are destined to be the software engineers and computer scientists of the future ought to be getting involved in the maker movement, taking some MOOCs, developing apps or games, going to hackdays and other things that are unlikely to feature in the provision made by schools.

**Early Years**

Emma Goto and I wrote about the importance of laying the foundations of computational thinking through the Early Years Foundation Stage in the previous edition of Switched On, but, for me, the most exciting work in this area is Linda Liukas’s inspiring Hello Ruby project in Finland. Hello Ruby, the book, was funded via Kick Starter: it’s a beautifully illustrated children’s story about Ruby, who loves learning and hates giving up, and her quest to collect gems in a fairy-tale world populated by snow leopards, penguins, fire foxes, androids and Django and his pet python. Linda doesn’t attempt to teach pre-schoolers to code through the story (thankfully), but she does get them thinking in an unmistakingly computational way. There’s a companion website, at www.helloruby.com, with some brilliant, play-based ideas such as a cut out and keep computer (cheaper even than a Pi Zero!), and stick on power buttons to link everyday objects (at least in a child’s imagination) into the internet of things. Diane Levine is running a session at Roehampton’s Festival of Computing looking at how we might draw on these ideas at home. Linda has also been helping with the development of Finland’s new computing curriculum, which comes into effect in September – check out the support materials she’s produced at koodi2016.fi (probably using Google translate if you can’t manage the original Suomi)

**Robotics**

Whilst there are plenty of schools in the UK that are working with robotics and other aspects of physical computing, I worry at times that we ought to have placed more emphasis on this in the curriculum. Elsewhere, there seems much more emphasis on this as a vital part of computing education: ProgeTiiger in Estonia fund 80% of the cost of robotics kits for elementary schools there, there’s similar generous funding for robotics projects in Portuguese schools, both primary and secondary and robotics plays an important part in extra-curricular computing in Singapore and South Korea – often going way beyond the sort of line-tracing / path-following projects we see at home. Back home, there’s been more interest in this of late, with the new WeDo 2.0 from Lego, a number of Raspberry Pi powered robots and OhBot’s robotic face (which links nicely with Paul Curzon’s famous facial expression unplugged activity). Dot and Dash captured interest at BETT, with a default programming language that owes more to finite state machines than block based coding. Kitronik have developed a BBC micro:bit powered robot kit, and the BBC are about to launch a new series of Robot Wars: it would be great to see some school teams enter this. That said, much of this seems a step up from moving cats around a screen, and some targeted CPD might be useful here.

**Online training**

The challenge of training teachers to teach computer science, when they themselves never learnt any, isn’t unique to England. The locally distrusted, face to face, teacher-led model that CAS has championed has much to commend it, but there are times when it might look a bit ad-hoc compared to other approaches. I don’t doubt that a significant proportion of the $4 billion promised by President Obama to support CS for All in the states will be spent on training and professional development for teachers. In terms of teachers’ own subject knowledge, the most significant contribution is undeniably the MOOC (massive open online course) movement, with very high quality teaching materials made available for free online by prestigious universities, alongside facilitated online communities and assessment. Many of these can offer much for teachers wanting to learn more computer science than just that needed to teach the course – MITx 6.00.1x, introduction to computer science and programming using Python, Berkeley’s Beauty and Joy of Computing and Harvard’s CS50x are all quite brilliant general introductions, pitched at first year undergraduate level. The latter two now exist as ‘advanced placement’ courses for US high school students, and could be a viable option for a sufficiently motivated student who finds herself in a school without a CS teacher. Microsoft are bringing a teacher version of CS50 to London in May – see bit.ly/cs50ldn.

None of the above should be taken as a criticism of how we’re going about things back home, but as some interesting, alternative perspectives on what is a worldwide movement. These are such exciting times, not just for us and our pupils, but for teachers and students across the globe.

*Originally published as Global computing: learning the lessons from initiatives abroad in Switched On, the Computing At School newsletter, Summer 2016*

I’m not a software engineer, so I come to agile development from the outside.

I think there’s a couple of things going on. One is taking some of the ideas from agile development and applying them to our work as teachers, which is what I was trying to get at in the talk above. The other is teaching students agile development approaches. You can do both at the same time, but it’s probably worth thinking about them separately.

I think the former comes quite naturally to teachers.

We think of the ‘stories’ of our students – Sam loves tinkering with things but struggles with theory; Alex is happy following instructions but finds it hard to get started when faced with a blank screen; Chris will get this immediately but won’t see the point of finishing off the documentation.

We have in mind a minimum viable product – making sure the class know the things they need to / complete the tasks they have to, but I hope we’re not entirely satisfied with just getting them through the exams. Love of learning, reading round the subject, that sort of thing.

We think in terms of time boxed development – here’s my backlog of things we need to teach in this unit, and misconceptions we have to correct.

The job comes into its own when we see our learners as partners in the educational process as Hattie observes:

The biggest effects on student learning occur when … students become their own teachers.

For me, this is a crucial element of any ‘agile pedagogy’. A consequence of this has to be far more responsiveness to what happens in the room: taking their questions, interests and misconceptions as a starting point for what comes next.

I think there’s also a place for test driven development in our work. Check (test?) first whether pupils know something – there’s little point teaching it if they do. Teach the thing. Check (test?) then whether they’ve learnt the thing. There’s evidence, should anyone ask for some) of progress and the impact of your teaching. Don’t stop at that point though – ‘refactor’ the learning, making it better integrated with pupils’ schemata and more readily applicable to solving problems.

See also other folk writing about agile schools, agile classrooms, agile teaching / learning methodology, and agile parenting (seriously).

Teaching agile methods in computing lessons is another matter, but I think we’ve far more chance of being able to do this in primary school and in KS3 than we have under current exam specifications at GCSE / A Level, although even here I see agile and iterative development are now getting a look-in. I reckon that this could be taught through collaborative group project work fairly effectively: starting with groups thinking about what they’re going to make; reviewing lesson by lesson what they’ve done, problems they’ve encountered and things they still need to do; sharing tasks out between the group; working with a partner using pair programming if possible; testing units as they go; getting to a minimum viable product and then developing this further. I think projects like Apps for Good provide some scope for this sort of approach, and I tried to include elements of this in some of the Switched On Computing units.

]]>There is a problem here: at GCSE, only 16% of the entries in computing were from girls; at A Level, this drops to just 8%. Only 456 girls took A level computing last year!

So what can be done? Including computing on the curriculum for all is part of the solution I think. Back in 2011, Emma Mulqueeny argued that ‘Year 8 was too late’: if girls get interested in coding and computer science, they’re perhaps more likely to continue that interest into secondary school and beyond. It’ll be some time before we find out whether or not this turns out to be the case, but I for one am optimistic.

In the video, Carrie Anne argues for more positive role models for women in computing, and there are many heroes that we could cite, from Ada Lovelace and Grace Hopper through to Sue Black and Wendy Hall. These though, perhaps, seem a bit distant from secondary school pupils. I love Carrie Anne’s idea of teachers drawing on their own students as role models, with female sixthformers helping out with KS3 classes for example.

Carrie Anne’s point about girls enjoying more authentic, practical, collaborative, projects, ideally with some altruistic purpose is well made, and well worth thinking about. There’s some great work going on in Key Stage 3, such as through projects such as Apps For Good, and at A Level or university, project work can take into account just these sorts of opportunities (although awarding organisations tend to frown on the collaboration…). I’m less sure how appealing GCSE controlled tasks are to girls, or indeed many boys.

The key message though is more about teaching computing *better*, in a more inclusive way, rather than one which is designed to, or perhaps just by accident, appeals to one gender more than another. I’d say it’s well worth departments thinking hard, and discussing honestly, what they might do about this in their school.

Is this a problem in your school? How have you got on with making computing more inclusive for girls? Or indeed, better for boys and girls?

]]>The focus of the discussion is on the SpiNNaker project, a massively parallel, ARM powered machine capable of simulating at least some of how a brain functions. Programming a machine like this involves thinking about problems differently, but events and messages are something we can introduce pupils to via Scratch, not that I’m suggesting we start emulating brains in Scratch…

Simulating a brain isn’t necessarily the same as simulating consciousness (qv Penrose, 1999), and this could lead on to some interesting philosophical / ethical discussions in class. Is anyone exploring these ideas with their pupils? How?

Steve’s been a hugely influential figure in UK computing – as the hardware designer for the BBC Micro (qvMicro Men), and subsequently with ARM. He also chaired the Royal Society’s Shutdown or Restart report, which was a key influence on the move from ICT to computing. His Lovelace lecture for the BCS is well worth a watch.

Are we doing enough to prepare pupils for a not too distant future in which machines like SpiNNaker might be able to simulate the connections and behaviour of human brains?

]]>

I wonder who’s using Snap! in their schools? Does it make sense to use this as a block-based language in KS3 to provide a little higher ceilings that Scratch offers, especially as many will have ‘done’ Scratch whilst at primary? What sort of thing have you done with Snap! if so?

Scratch clearly has a more vibrant online community, and much more extensive resources: how important are these factors when choosing a language?

Personally, I’m a great fan. Some of my projects:

- Rational arithmetic
- Morse code - code and walkthrough video.
- Substitution cipher
- Quicksort

A quick scan of the news demonstrates that an ethical approach to computing really does matter: see, for example, Audi, Talk Talk and the Investigatory Powers Bill. Attention to ethics in computing education would lead to a better informed debate about these and similar issues, and our trust in digital technology and those who program it.

The digital literacy strand of the curriculum expects teachers to promote an ethical approach to computing: seven year olds should know how to use technology safely, but also respectfully; they’re also introduced to the idea of online privacy. By the age of eleven, pupils should learn to use technology *responsibly* as well as recognising the difference between right and wrong (or acceptable and unacceptable behaviour, as the DfE phrases this). The curriculum’s drafting panel went further still, including in the aims that pupils could “critically articulate the individual, cultural, and societal impacts of digital technology”, although this didn’t survive the DfE’s subsequent editing. Schools are required to promote pupils’ spiritual, social, moral and cultural development, and a greater focus on ethics in computing could do much to support this.

Primary computing provides ample opportunities for teachers to help pupils understand some of the issues here.

Take, for example, intellectual property (IP). From an early age, children feel that it’s unfair if others copy their work, but how careful are they about asking permission and giving credit when it’s online content that they’re copying? I suspect as teachers we are often guilty of not respecting IP rights with online content ourselves, happily adding others’ images to our presentations, searching the web for policy documents or letters to parents, or downloading videos to show to a class, without acknowledging the source or observing the terms and conditions. More positively, let’s teach children how to share their work with an audience and to re-use or re-mix only content that’s been published with this in mind. Let’s teach pupils how Creative Commons licences allow them and others to build on creative work – the Scratch community site is a great example of this.

Honesty, integrity and truthfulness are curiously missing from the list of fundamental British values schools are now obliged to promote, but these surely should form part of any ethical approach to computing education. We should stress to children that they should be truthful when they write online. When pupils work in digital media, they should show the world as it is: they should learn how photos, audio and video can be edited to show things more positively (or negatively) than they are, but should also recognise the harm that should misrepresentation can do, and become more adept at spotting this when it happens. If pupils sign up for online services, they shouldn’t lie about their age or identity, and should stick to the conditions they (or their parents or teachers) agree to.

Often pupils are involved in framing the rules of the school’s acceptable use policy, but too many of these focus on risk aversion and safety, when there’s something to be gained from involving pupils in a richer conversation about values, morality and how we should decide what the right thing to do is. Despite the diversity of Wikipedia’s editors, there’s agreement over the principles which underpin the project: things like seeking consensus, assuming good faith, welcoming newcomers and calm discussion to resolve conflicts. Are these principles your school shares?

The next decade or two are likely to see ethical issues in computing become more important: as predictive analytics becomes more pervasive and powerful, how should we view algorithms making life-changing decisions about health care, employment, education and finance? Who gets sued when a self-driving car crashes? Who do we credit with algorithmically generated art or music? If a machine and a person can perform a task equally well, who should get the job? When a machine passes the Turing test, what rights should it have? Important as having coding and other elements of computer science on the curriculum are, ethical questions like these are more important still: if primary school is a good place to start learning to code, perhaps it’s also the place to start discussing these issues.

*Originally published as Digital Devilry in the January 2015 edition of Teach Primary. © 2015, all rights reserved.*

Computing may not be part of the EYFS Statutory Framework, but there is much that goes on in the EYFS that provides a foundation for computational thinking – the golden thread that runs through Computing in the National Curriculum.

In the Statutory Framework for EYFS, the early learning goal from the ‘technology’ strand in the ‘understanding the world’ area of learning, requires that, ‘children recognise that a range of technology is used in places such as homes and schools’. This is about helping children to understand their place in a world that seems increasingly dominated by technology. We need to help them make sense of this world, as well as planting the seeds for their understanding of the implications of technology in their lives and society. This is the start of ‘digital literacy’ and it extends into Key Stage 1, where children are taught to ‘recognise common uses of information technology beyond school’. Early Years practitioners provide a rich environment in which children can build up an understanding of the world through play. They help children to be curious about technology in real world contexts: what happens inside a microwave? or a photocopier? what happens when Mummy puts her card in the machine outside the bank? what is the machine called? why does she have to type a number in? why does she keep it secret? Through roleplay and natural discussions like these the children make sense of their world.

Although the EYFS ‘technology’ requirement doesn’t explicitly state digital technology, it would be hard to address this properly without giving children an experience of the digital as well as the analogue here. That said, many of us would worry about an environment, whether at home or school, in which young children are spending too much time ‘plugged in’ to screens, narrowing communication and the range of practical experiences from which children learn.

An analogue only education seems of diminishing relevance to the modern world; a digital only education seems a hugely impoverished early childhood experience. Irrespective of access to Bee-Bots, iPads or other digital technology, young children should also be learning outside, making mud pies, climbing trees, playing with puppets, sharing books, making models and chatting with their friends.

The technology early learning goal states that children should ‘select and use technology for particular purposes’. There are a wide range of digital technologies that young children can use playfully and collaboratively, such as digital cameras, audio recorders, tablet computers, phones (smart or otherwise) and simple, programmable robots such as Bee-Bot. As they play with these devices, children will form their own mental model (schema) of how these work, sometimes through chatting to one another, or asking a grown-up, but more often just through play. Note the reference here to ‘select’ – it’s not enough for children to use the tech they’re given: they’ve got to have some say in what they use. Are these things stored somewhere children can access them? How are these things kept charged? Do children know the basics of how to keep themselves and the equipment safe? How will they be shared fairly?

The use of technology can support children across other areas of learning, providing children with new ways to communicate and share their ideas. In the ‘being imaginative’ strand of the ‘expressive arts and design’ area of learning, the early learning goal states the expectation that children ‘use what they have learnt about media and materials in original ways, thinking about uses and purposes. They represent their own ideas, thoughts and feelings through design and technology, art, music, dance, role-play and stories’. The requirement doesn’t specify digital media or information technology, but nor does it preclude it. Alongside working with crayons, pencils, paints and craft materials, there’s ample opportunity for children to use photography, record music they make, video one another and paint with fingers, trackpad or mouse on screen

Further up the primary school, we recognise that there is much more to computing than learning to use digital technology. Computational thinking, understood, after Jeanette Wing, as “taking an approach to solving problems, designing systems and understanding human behaviour that draws on concepts fundamental to computing”, is the golden thread running through the computing curriculum. But computational thinking doesn’t begin in Key Stage 1: the foundations are laid in EYFS.

Barefoot Computing, developed by CAS, offers a model of computational thinking as being made up of both concepts and approaches. It’s widely used in primary schools. All these concepts and approaches can be applied, at least to some extent with four and five year olds. Indeed, some begin earlier still. The nursery or reception classroom is full of opportunities to solve problems. Carrying the water up the hill; solving (or making) jigsaws; building models; spotting and extending a pattern. When children are faced with these problems, the questions that Early Years practitioners would naturally be posing can encourage computational thinking. Here’s some examples:

**Logical reasoning**What will happen if I do this? How do you know?**Algorithms**What do I need to do to solve this? Is there a better way?**Decomposition**Can we break this problem up? Could we each do different jobs to solve the problem?**Patterns**Have you solved something like this before? What did you do then? What’s changed?**Abstraction**What’s the most important thing here? Maybe we can draw a picture of this?**Evaluation**What went well? Which way worked best? What would you do differently next time?

The Statutory Framework expects practitioners to consider how children learn and develop in relation to three ‘characteristics of effective learning’:

**playing and exploring**– investigate, experience things, and ‘have a go’;**active learning**– concentrate, keep on trying if encountering difficulties, and enjoy achievements; and**creating and thinking critically**– have their own ideas, make links between them, and develop strategies for doing things.

There are very close connections here with the ‘approaches’ to computational thinking that Barefoot Computing uses. Playing and exploring links closely with tinkering and collaborating, as well as abstraction. Active learning is tied to debugging and persevering. Creating and thinking critically connects with Barefoot’s creating, as well as back to the concepts of logical reasoning and algorithms.

So how do we encourage the development of these approaches? This is often about getting the learning environment right. By providing open ended activities that encourage children to use all their senses to observe, discover and engage with the world, we encourage them to tinker, play and explore. Opportunities to take things apart, to build and make models help children to be creative. Getting children to do a jigsaw, recreate a pattern or draw a picture can all encourage them to debug. We provide activities that require longer periods of engagement, concentration and perseverance. Sharing books and toys, playing with puppets or taking part in a nativity play or harvest festival all help develop collaboration.

The non-statutory guidance in Development Matters gives plenty of examples of how these characteristics of effective learning develop, and these link directly with the notion of computational thinking. So, for example, the early stages of logical reasoning will draw on ‘making predictions’ – getting a child to say what will happen if they do or change something, as well as ‘developing ideas of cause and effect’ – can they link their actions to the effects they produce, on screen or off? Abstraction starts early too: representative play captures the essence of a thing, putting to one side much of the detail: children ‘pretend objects are things from experience’ and ‘represent experiences as play’. Debugging, whilst not called that, is common in Early Years with children ‘learning by trial and error’ and ‘persisting with activities when challenges occur’.

As with all learning, we need to recognise the importance of children’s early experiences. If we can get the environment right in these early days, we can set children off on the right foot to develop computational thinking and creativity.

*Written by Emma Goto and me for the Spring 2016 edition of Switched On, the CAS Newsletter. *