Professional Documents
Culture Documents
p 5-9
Debunking the myth of
In the influential Royal Society report, Shut Down or Restart?, published in
the digital native and an
2012, biologist Sir Paul Nurse wrote; Computing is of enormous importance to
in depth look at what
the economy, and the role of Computer Science as a discipline itself and as an
computing looks like in
underpinning subject across science and engineering is growing rapidly. He
the EYFS.
continued, It is becoming increasingly clear that studying Computer Science
provides a way of thinking in the same way that mathematics does... there are
p 10-15
strong educational arguments for looking at how we introduce the subject.
A special feature
2016 heralds the implementation of key changes to school performance indices.
exploring ways in which
More than any other reforms, they are exercising the minds of headteachers.
Computing can make
Like it or not, league tables are here for the foreseeable future. Schools would
maths real and improve
do well to reflect on past lessons. Teaching to the test does not equip students
performance.
well for the next stage of their education, or life. Short term attempts to game
the system to boost league table standing devalue the purpose of education.
p 16-20
Four years on
CPD opportunities,
from the report,
utilities for creating
Computer Sci-
classroom resources,
ence is now an
girls computing clubs
EBacc subject,
and much more.
contributing to either an EBacc or Open pillar in the
new progress measures. But in forward thinking
p 21-23
schools, its value as an enabling discipline is also
In his regular series
widely recognised. Forged in the crucible of maths, it
Greg Michaelson looks
can help make concrete the thinking skills required for
at the state we are in,
success. This issue explores the close links between
plus an introduction to
the two subjects, and the role Computing can play in
Karnaugh Maps.
developing fertile soil for sustained educational growth.
The Computing At School group (CAS) is a membership association in partnership with BCS, The Chartered Institute for IT
and supported by Microsoft, Google and others. It aims to support and promote the teaching of computing in UK schools.
For those new to twitter chats, here are The NoE builds on the grass roots ethos which is central to CAS in-
some handy tips to get you started: spiring, leading, training, and supporting an active community of prac-
Use the Hashtag: The hashtag (#) tice. It recognises the importance of local, face-to-face, peer-to-peer
symbol is used to mark keywords or topics support, strengthening professional relationships and building the confi-
in a tweet. It was created by Twitter users dence of the people involved. It helps bring together many of the com-
as a way to categorise messages. All twit- munity-building strands of CAS to maximise their impact and quality. It
ter chats use a designated hashtag. Make aims to inspire, motivate and support teachers by building a high-quality,
sure you use it at the end of your tweets; low-cost, sustainable CPD infrastructure that nurtures long-term collabo-
this will help others locate your responses. ration between teachers, schools, and universities. It is rapidly establish-
Use the hashtag too to search for ques- ing a national reputation as a model for subject development through
tions you may have missed, for example, building local communities of practice.
search #caschat Q1, Q2 etc.
Join in the conversation: Theres Last summer an independent evaluation of the NoE was carried out by
nothing wrong with lurking but to truly feel the Centre for Education and Inclusion Research at Sheffield Hallam
the benefits of a chat, its best to partici- University. They reported that CAS is making a significant difference to
pate. The most effective form of engage- the implementation of the new computing curriculum. A variety of organ-
ment is responding to questions however, isations are working together to provide a coordinated national approach
if youre feeling a little nervous, the easiest that supports local need. These include ten new CAS Regional Centres,
way to get involved is to retweet things you the CAS Master Teachers, local Hubs, University Partners and Lead
find helpful. Retweeting help build relation- Schools. Even in the context of increasing time poverty, we maintain that
ships with the original poster as well as professional development is a very human process. So the support pro-
providing value to your own followers. vided by the NoE is predicated on it being local, face to face and peer
Label your responses: Most chat ses- led. Up and down the country myriad events take place, bringing people
sions use the Q1, A1, Q2, A2, (question / together and forging that sense of common purpose. In terms of impact,
answer) format. When replying to a ques- teachers who have received CPD from the NoE report their confidence
tion, always label your answers with the in teaching computing has increased on average by 88%.
question number.
Take your time: Some chat sessions, Managing, overseeing and communicating such activity to all mem-
particularly popular fast paced sessions, bers is something of a challenge! The ten new university-based CAS
can appear daunting at first. The trick is to Regional Centres (CRCs) are fast becoming pivotal. Their role is
go at your own pace. Equally, its OK to dip very much about nurturing and supporting local communities of prac-
in and out of chat sessions dont feel tice. Already they are extending the support available to Master
guilty if you have to leave a chat session Teachers and other CAS champions. The NoE has doubled the level
early or join a chat late. of activity during the autumn term compared to the same period last
year. As CRCs become established we hope we can build a sustain-
If you are interested in hosting #caschat able structure that allows our Community to continue to grow. If you
we are always looking for volunteers. havent heard from your CRC, it is likely that you havent specified a
Check out the official #caschat thread on location or place of work on your CAS profile. Please make sure your
the CAS Community and register your details are up to date so you can be kept informed of all the initia-
interest. Simon Johnson tives in your locality.
SWITCHEDON: www.computingatschool.org.uk 2
Local CAS Hubs are the bedrock on which our thriving community
of practice is built. Remi Gauvain (Chase Terrace Technology Col-
lege, Burntwood) reflects on what you can contribute. Theresa
Russell (Morecambe High) urges you to build a local network.
Teachers, we are full of contradic- reflect on the purpose, to be able to
tions. We expect our students to par- explain the underlying concepts. Pre-
ticipate in lessons and know it will help senting to my peers is a chance to If there isnt a CAS Hub close to
their learning. But when the tables are deepen my understanding of the sub- you .but you really could do with
turned, when we are asked to partici- ject and the pedagogy Im trying to some help and support, why not
pate, do we behave like our most en- develop in my classroom. set one up? This is what we did
gaged students? The contrast be- and its a lot easier than you think!
tween our expectations and behaviour Presentation day has become a bit of
was tangible during my first Derby a routine now. A bit less mingling with There is support available from
University CAS meeting. The audi- the other members, as I need to set- CAS with ideas for your first meet-
ence was mostly primary school up my session. Someone else walks ing; someone may even offer to
teachers, and they all had great sto- into the room, they too look a bit come and help with an opening
ries of student participation and cross stressed. They'll be presenting after speech. You will be given a CAS
curricular activities. The presenter had me. If you stay and watch my presen- email address and login to Event-
a Makey Makey cardboard guitar! We tation, Ill stay and watch yours. Deal! brite to handle tickets plus a small
could imagine the little ones running to And so another benefit: the connec- budget for refreshments (so you
the front of her classroom to try this or tion made with another presenter can have cake and tea too!). Aim
other play-doh instruments, but would shows me different ideas to those my to arrange 3 meetings per year.
we adults be seen playing air guitar own interests would push me towards Its a great opportunity to get in-
with a piece of cardboard? The Master choosing from the workshop list. volved with other establishments
Teacher, Matthew, was doing a great such as local universities or col-
job to keep the session going, cajoling What we get from CAS is related to leges who may be able to help.
the audience into having a go and how much we put in, and presenting
eventually we all did. to other members is a great buzz. So We have been really lucky to have
go for it. Ask questions even just to Dr Joe Finney (Lancaster Univer-
A couple of weeks later was the Not- thank the presenter, or ask how to sity) and Debbie Simpson
tingham Trent University CAS meet- adapt their resource to your type of (University of Cumbria) offer sup-
ing. When Helen and Rachael asked lessons. Present your own resources port, contributing and providing
for volunteer presenters for the next and ideas. The Hub and your own venues for sessions. We cater for
session there was that same reluc- practice will benefit from the energy both primary/secondary teachers
tance to step forward. So let me share and enthusiasm generated by more and it is jointly run by Tom Clarke
my experience of presenting at the people stepping up to the challenge. (ICT Coordinator) Westgate Pri-
East Midland Hub and how it gave me mary School and myself, Theresa
a chance to learn more about my Russell (Head of KS3 Computing).
craft: teaching Computer Science. I
hope it will inspire you to step up and To discuss getting started contact
participate in your local Hub. claire.davenport or yvonne.walker
@computingatschool.org.uk. De-
I had a resource that seemed to work tails of other hubs in your region
well in the classroom, so when Helen are available on the CAS website.
and Rachael asked for volunteers I Lots of teachers have skills which
stepped forward. As the deadline they are willing to share with oth-
loomed, I arranged to teach it to an- ers. You can also contact us we
other class just to refine it a bit. are more than willing to help sup-
Already, presenting has given me the Human logic gates
port new hubs get established.
at the launch of the
incentive to sharpen my teaching. And Morecambe Bay Hub. You can also follow us
then I need to think about presenting it Hubs are the place to
@MorecambeBayCAS
to other teachers. This makes me share your good ideas .
3 SWITCHEDON: www.computingatschool.org.uk
Early last November, the 4th annual Com-
puting at Schools Scotland conference
took place in Dundee. The University of
Dundee kindly offered to host the event
which attracted over 200 attendees. For This term, Year 7 students should get to own
the first time the conference included their own micro:bits. Yvonne Walker outlines
seminars, workshops and discussions some of the work done last term to help
that covered all levels of Computing edu- teachers prepare for this exciting initiative.
cation from Primary through Secondary The unfortunate delay in micro:bit production presented an opportunity
into Further and Higher Education. The for the newly formed CAS Regional Centres (CRCs) to get involved in
programme included a wide diversity of organising a series of micro:bit roadshows last term. The aim was sim-
topics including the latest developments ple; to ensure that teachers had the opportunity to use the micro:bit and
in Eye Tracking research, Biometrics in explore how they could be used in the classroom. In spite of having to
Scratch, Minecraft, the BBC micro:bit, deal with a quick turnaround in terms of sorting out dates, finding venues
Cyber Security and even some Home- and inviting teachers, all ten CRCs were able to host at least one road-
sick Aliens! show (some managed more!). All delegates were given access to the
micro:bit website (https://www.microbit.co.uk/) and enjoyed hands on
A short opening talk was followed by a training with a real micro:bit, though unfortunately we couldnt let them
range of hands-on practical workshops take one home!
available throughout the busy Saturday.
These included a chance to work with e- The uptake for the roadshows was phenomenal, indicating the level of
Textiles, get a hands-on with the latest interest in this initiative. Across the ten CRCs we introduced around 560
version of Greenfoot and many others. teachers to its capabilities and many cascade events have since started
Alongside these ran a Broad General to appear on the CAS website. What was really lovely to see was how
Education track with sessions on teach- easy the teachers found the micro:bit to use and how creative they be-
ing Computing to Primary and lower came! There was a genuine feeling that the micro:bit will provide a sim-
Secondary pupils. A senior phase track ple to use device to introduce physical computing to young pupils. The
hosted sessions useful to those teaching
National 4 to Advanced Higher Compu-
ting Science and equivalent NPAs whilst
a Vocational and Industry track focused
around the connection between Compu-
ting education in HE and FE and work
within the ICT industry. A Research and
Academic track shared a range of recent
CS Education findings as well as looking
at how to get involved or make use of
research in your own teaching. Finally, a
drop-in area allowed attendees to find
out about the extra-curricular opportuni-
ties that Coder Dojo, Lambda Jam, Code
Club and others provide. There was also
an exhibition space for various providers photo shows two delegates feeling the love at the CAS North West mi-
of computing resources and equipment. cro:bit roadshow. Attendees were asked to program their micro:bits into
a love meter that would work with all delegates forming a ring and the
One comment from the day captured the micro:bit giving an output of how compatible they all were. Did it work?
feeling: Excellent event considering it's Of course! Were they compatible? Of course not!
done by volunteers, better than many pro-
fessional Holyrood type events. Looking You can find a short but useful micro:bit how to video created by two
forward to next year! The conference Master Teachers at the CAS South East Event at http://bit.ly/1LH44cx.
would not have happened without the sup- The Block and TouchDevelop editors (two of currently four program-
port of university staff, university student ming interfaces available via the micro:bit website) provide a transition
and school helpers alongside a dedicated between graphical and text based programming. Pupils can create a
group of CASS Board members, who suc- script in the Block editor and see the textual equivalent by converting it
cessfully created the best attended confer- to TouchDevelop. If your school hasnt yet registered to receive your
ence so far. Claire Griffiths micro:bits you can do that at http://bit.ly/1PwkUlF.
SWITCHEDON: www.computingatschool.org.uk 4
Phil Bagge, from the Hampshire Inspection and
Advisory Service, takes issue with the notion of a Being well over a full
Digital Native. He argues there are intrinsic prob- half term into the new
lems with the idea and teachers responses to it. school year (at the time
In all the groups of primary teachers I The problem for teachers is that if you of writing) we are now
work with I hear comments that dont believe that you have anything actually beginning to
Pupils know more about computers valuable to teach (because pupils think of ourselves as
than us. Often this idea stems from know it all already) this affects what having technology.
the theory of the "Digital Native"; that you teach and the time you spend
people who were bought up with tech- resourcing and planning it. Teachers Our Chromebooks have
nology are implicitly better at under- and school leaders who believe the been an overwhelming success and
standing and using it than those who myth of the digital native often find in constant demand more are
didn't. When said it is often accompa- excuses to leave computing out of being ordered as I type. I must
nied by the statement that I am just their timetables. When they do teach praise staff for their continued en-
learning alongside the children. computing they tend to rely very heav- thusiasm with the new resources,
ily on unplanned exploration and justi- both the physical and online, de-
At first glance this sounds very noble. fy this by recourse to the shared jour- spite the requirement of us all to
It recognizes that we are all learning ney narrative. I wonder if they would step (if not occasionally leap) out of
and that information exchange can go be happy to learn Maths or Literacy our comfort zone. Similarly, many
both ways. The problem is that it is at alongside their pupils in this same of our parents have been encour-
best a half-truth. Pupil access to tech- woolly way? aged and delighted with the more
visible advances.
SWITCHEDON: www.computingatschool.org.uk 8
Code Club have played a huge part in encouraging
Computing in primary schools. Director of Code I am a GP, currently on
Club UK, Maria Quevedo updates us on their growth a career break. Im also
and unique contribution to the curriculum. a Code Club volunteer
at Firfield Primary
When Code Club was set up in 2012, Scratch Junior for children aged 5 - 7,
School, Breaston. Two
the aim was to put professionals from and invested in new technology in-
summer ago, I was
the technology industry - developers, cluding Lego WeDo and My Romo.
struggling to entertain
programmers and engineers - into Weve been running our Code Club
my two eldest boys,
schools to help teachers run after- for over a year now, with 40 children
and look after my poorly
school coding clubs for children aged attending, run by three volunteers (two
baby girl. Home alone
9-11. Three years later, and the land- teachers and one parent). The club is
with three children, with
scape around Computing in schools in high demand, with children signing
my youngest needing a
has shifted dramatically. With the new up in large numbers.
lot of my attention, I did not want
computing curriculum, were seeing
the boys stuck in front of the TV
that many teachers have increasing Code Club offers a fun approach to
so was seeking activities that
confidence in computer science and the new computing curriculum by al-
would stimulate making skills,
coding. Now around 50% of our 3000 lowing children to create games, ani-
problem solving and persistence.
UK Code Clubs are run by teachers. mations and websites. Matthew has
Wed love to see this trend continue, seen a number of notable benefits
I came across Computer Coding
as we believe that schools which run from running the Code Club: Its
for Kids by Carol Vorderman. It
their own Code Clubs can draw bene- amazing to see the sense of achieve-
was a wonderful, step by step
fits for both teachers and pupils. ment the children get when they finish
guide explaining what coding ac-
their projects and we can really see
tually was ( I had always won-
One of the teachers whose school the children starting to persevere with
dered) and how to get started.
runs its own Code Club is Matthew the tasks in Code Club, using analyti-
Despite my lack of technical
Cave, Assistant Headteacher at West cal thinking to troubleshoot. They
knowledge, that I was secretly
Town Lane Academy in Bristol. After seem to be applying this in other
embarrassed about, I was able to
beginning with Year 5 and 6 students, ways, with an increase in resilience in
get going with Scratch initially and
Matthew and his team decided to in- Maths, for example.
soon the boys and I were abso-
troduce Code Clubs Scratch projects
lutely hooked. I was then getting
for all 8 - 11 year old children. Now, For the teachers as well, running a
stuck trying to find projects for
the school has also introduced Code Club has proved to be a useful
them at a suitable level to keep
Pupils enjoying tool. We absolutely see that Code
the Code Club at their interest and stop frustration.
Club can help teachers gain some
West Town Lane I started getting in touch with local
Academy extra skills for the computer curricu-
schools and others to encourage
lum - we use Code Club within our
individuals to form volunteer net-
school to deliver part of the computing
works with the idea of getting chil-
curriculum.
dren coding. I came across Code
Club that way and at the Derby
What advice does Matthew have for
Xmas Meetup (2014) I met the
teachers who are looking to start a
inspiring Katharine Childs (East
club? Its dead easy, so take the
Midlands Regional Code Club Co-
plunge! The children will run with it,
ordinator). We have not looked
so dont worry about not being an ex-
back since! Together with Ian Wil-
pert. See the box below for details of
liams and Amanda Coffey we
how to get started.
formed a small parents group.
Code Club is a nationwide, volunteer network that organise after You can read about our journey at
school coding sessions. They provide materials to use with your codewordblog.wordpress.com.
pupils in the club and online training. The website seeks to Were six weeks in and I hope to
match volunteers with schools wishing to host clubs. Find out give a progress update in the next
more by visiting www.codeclub.org.uk/start-a-club. issue. Jasjit Kaur Atwal
9 SWITCHEDON: www.computingatschool.org.uk
A newly published document, created by
several CAS members and co-ordinated
by John Woollard explores the notion of Computational thinking isnt something
computational thinking (CT). The guide, for developed through programming alone.
both primary and secondary teachers is a Paul Curzon, from the cs4fn team intro-
contribution to developing the teaching of duces a new resource due out this term.
CT in schools. It presents a
conceptual framework, Puzzles can be a good fun way to develop the skills involved in
describes approaches for computational thinking. Many puzzles are algorithmic - the aim is to
teaching and offers come up with an algorithm that solves it. Other logic puzzles involve
guides for assessment. logical thinking, and to do well involve developing heuristics and algo-
rithms for solving them. Yet others, like code cracking cross references
The guide is comple- involve computing concepts in puzzle form. With support from Googles
mentary to two CAS CS4HS programme, the cs4fn and Teaching London Computing Team,
guides (published in are putting together a resource area for teachers (bit.ly/1RkOuva). We
late 2013, early 2014) are also creating a computational thinking puzzle book to send free to
for Primary and Sec- schools in the Spring of 2016. Sign up for
ondary schools writ- future cs4fn resources at bit.ly/1UqzavU.
ten to support the To support the Puzzle Book, the first in a
implementation of the new series of complementary booklets that
curriculum. It embraces more recent devel- discuss specific puzzles in more detail is
opments, notably the CAS Barefoot and already available. Puzzling Tours (see
QuickStart Computing descriptions of com- previous SWITCHEDON for details) looks
putational thinking. CT lies at the heart of at the computational thinking in three
the computing curriculum but, as our spe- graph based puzzles.
cial feature highlights, it also supports
learning in other areas of the curriculum. Below is a word search from the puzzle
Download from bit.ly/1QukAU9. book (a pdf version to photocopy can be
obtained from the link above). Words can
appear horizontally, vertically or diagonally, running backwards or for-
wards. Different names can cross and overlap. There are twenty six fa-
mous computer scientists names in the search grid. Their first and sec-
ond names may be in different places. Spaces, accents and hyphens
are not included. The names are listed on the pdf.
You may be able to use your natural pattern matching abilities to spot
Over 56,000 school students took part in
some words. An algorithmic thinking approach may work better though.
the annual UK Bebras Computational
You need an organised way that is guaranteed to find the words. Take
Thinking Challenge in November, up from
the first letter of the
39,000 the previous year. The challenge,
first name and start
which is free to enter, caters for all ages
at the top left,
from Year 2 to 13. No prior knowledge is
scanning along the
required and the results can provide an
rows in turn look-
excellent baseline measure to use in
ing for it. When
school, focusing as it does on the ability to
you find it check in
think creatively and reason about unfamil-
all directions for
iar problems.
the second letter. If
its not there move
All questions have links to computer sci-
on. If it is look for
ence and past questions make excellent
the third letter in
exercises. Previous questions are shared
the same direction,
on the CAS Community at resources/1261.
and so on. Can
If you didnt take part this year, take a look,
you improve this
make a note of the date and resolve to join
algorithm for word
the growing numbers involved next year.
searches?
SWITCHEDON: www.computingatschool.org.uk 10
There are some great ways to link computing with all the other
subjects on the curriculum, but there's a particularly strong ar- The links between computer sci-
gument for making connections with mathematics. Miles Berry ence and maths provide both
introduces a special feature exploring the potential benefits. challenge and opportunity for cur-
riculum development. We draw on
As a discipline, computing owes its rithmic efficiency. It's perhaps no sur-
mathematics in computing; we
origins to mathematics. Babbage's prise that A level maths is often a re-
use computation (automated or
analytical engine was designed to quirement for studying Computer Sci-
otherwise) in mathematics. In
compute mathematical tables. The ence at Russell Group universities.
much work done in the primary
word 'computer' was originally applied
phase its easy to make the con-
to a person who performed calcula- Going in the other direction, there are
nection between mathematical
tions. Turing's paper 'On computable very many opportunities to enrich
content and computing. In sec-
numbers with an application to the school mathematics through compu-
ondary schools, where subject
Entscheidungsproblem was more ting, but more than that, computer
boundaries are more firmly en-
about proving a mathematical theorem science provides a means through
trenched, there is a greater chal-
than founding a new science. Cam- which mathematical ideas become
lenge. Yet the potential is huge,
bridge's computer lab started out as incarnate, tangible and executable.
particularly given the primacy put
'the mathematical laboratory'. Wolfram makes a strong case for
on progression in maths with new
'computer based mathematics' being
school accountability measures.
Let's look at the connections from taught in schools - arguing that this
both perspectives: firstly, bringing reflects how real maths is done, mak-
At the recent
maths into computing. Given our cur- ing the subject far more relevant than
Computer
rent focus on thinking rather than cod- when calculations are done by hand.
Based Maths
ing, there are strong parallels between It's the third of Conrad's steps
summit (see
mathematical reasoning and computa- (compute) that the machines are un-
page 14),
tional thinking: logical reasoning, algo- surprisingly much better at: perhaps a
the chair of
rithms, abstraction, generalisation, pupil's mathematical understanding
CAS Simon
decomposition and evaluation play a would be enhanced by spending more
Peyton-Jones
central role in both CS and mathemat- of her time on steps 1, 2 and 4 and
and Andrew
ical problem solving. Conrad Wolf- proportionately less on the easily au-
Fitzgibbon
ram's four steps for doing maths tomatable step 3. 'Show your working'
(Microsoft
shown below (define, translate, com- could be at least as much about
Research)
pute and interpret) parallel stages of providing the source code for your
made a strong case for teaching
traditional software development. program as making marks on paper.
the two subjects together - with
the current curricula and exam
There's a fair amount of mathematical Working with software can be power-
specifications for the two subjects.
content in computer science as taught ful for much maths education: turtle
in schools. In primary, Bee Bots and graphics as a tool to think geometri-
What they suggested wasnt
similar are used early on to practise cally; spreadsheets as a visual intro-
maths with a nod to Computer
positional language and emerging duction to functional programming; the
Science or Computer Science with
measure and children are now more classes, objects and methods of dy-
a nod to maths, but rather Com-
likely to meet angles and coordinates namic geometry software; data visuali-
puter Science bringing to life the
in Scratch before these get covered in sation through Excel, Raw or R. Pro-
abstractions of maths, and maths
maths lessons. Topics such as binary gramming has many applications in
providing the foundational ab-
conversion, binary arithmetic, Boolean maths education: writing functions for
stractions that underpin Computer
logic and functions all make demands fractions arithmetic, solving equations
Science. Implementing such a
on pupils' mathematical understand- numerically, simulating probability
vision at national scale isnt trivial,
ing. There's some potentially gritty experiments etc. The list is pretty inex-
but perhaps a few teachers in
maths in computing at GCSE and A haustible, and provides rich territory to
some forward thinking schools or
level: graph theory, modular arithme- develop understanding in both sub-
academies might be up for trying
tic, formal logic and measures of algo- jects side by side.
this out? It would be phenomenal-
ly interesting experiment!
11 SWITCHEDON: www.computingatschool.org.uk
Adrian Oldknow from the Cambridge Centre
For Innovation in Technological Education
(CCITE) looks at developing Scratch code
to simulate an objects flight in real-time.
The formulae: x = S.t and y = U.t g.t2 are called the equations of
motion of a projectile. How they are derived is outlined in the box
Man, unlike birds and beasts of prey, (above right). They contain three variables g, S and U which need to be
couldnt run fast enough to catch most given initial values and will then stay constant throughout the flight.
living creatures to provide sources of food, These are called parameters. The variables t, x and y change through-
so had to resort to ingenuity. One way to out the flight. We cant keep changing the time continuously so we will
catch animals is to trap them. Another is to also need to use a loop which moves the clock forward by small
throw things at them. The term used for amounts of d seconds. The flight stops when y becomes negative.
something put into flight is a projectile.
Some objects, such as stones and spears, In order to check the simulation we will store the outputs t, x and y in
might be thrown by hand. Others might be lists T, X and Y. To test the model we can start with some simple values
launched by other devices. Of course you for g, S and U. If g = 10 ms-2, S = 10 ms-1 and U = 10 ms-1, then after 1
might use projectiles for reasons other second the upward velocity would have become 0 and the projectile will
than hunting. One might be military, where be at its highest point in which time it will have travelled 10 metres
the projectile is a weapon, another might sideways. After another 1 second, when t = 2, y will be back to zero and
be sporting. the projectile will have landed. At that time x will be 20 metres.
The theory behind the way projectiles The resulting Scratch program is shown. We can use the Data tab to
move in flight is called ballistics. If we want create and manage the variables and lists. The numerical output (white
to make our own simulations of a projectile box) is displayed in the main Scratch graphics area.
such as a rock from a siege engine (aka
trebuchet) we need to find out something
about this theory. This was extensively
developed by the Italian astronomer, Gali-
leo Galilei in 1632.
SWITCHEDON: www.computingatschool.org.uk 12
If a projectile is launched from ground at time t = 0 seconds, we can
find formulae for its position at any time (t) until it hits the ground. This
can be expressed in terms of its initial horizontal velocity S, its initial
upwards velocity U, and the acceleration due to gravity of g metres
downwards. After t seconds its vertical velocity will be U g.t metres
per second, so its average vertical velocity during that time is (U + U The STOMP air rocket provides a cheap,
g.t) = U g.t metres per second. Since distance = speed x time it safe, simple and fun way to get some ex-
will have reached a height of y = (U g.t).t metres. In that time it will perimentation done outside the classroom
have travelled a horizontal distance of x = S.t metres. using simple measurement tools such as a
protractor, stop watch and tape measure.
Once we have the basic algorithm up and running, The captured data allows predictions to be
we need to turn the output from numbers into made in the same way Galileo did - and
graphics. We will use the time gap d to make a de- even to find a value for g!
lay in each pass of the loop so that we are working
in real time. We just have to turn the (x,y) coordi- Using a camera and the free video-
nate values from distances from the launch position analysis Tracker software (physlets.org/
in metres into pixels on the graphical display tracker) we also have a means to measure
screen. the launch velocity and track a moving
object in flight. Tracker provides a power-
To do this we can introduce some more variables: ful way to combine video with computer
(a, b) are the screen coordinates of the launch-pad modelling.
and c is the multiplier used to turn distance in me-
tres into screen pixels. We can also replace The data can be used with other software
Scratchs cat sprite with a more realistic projectile, too, such as the free GeoGebra
such as a ball. To tidy things up we have defined a (www.geogebra.org). Using GeoGebra
Block called `Set up which the program calls just students can go on to explore some of the
once to initialise the values of the variables and to mathematical concepts more thoroughly.
prepare the screen. The Graphics View provides `graph-paper
on which to create diagrams. It could be
The changes to the used to further understanding and interpreta-
body of the pro- tion of constant acceleration, for example.
gram are now quite
small to turn the These ideas are explained in more detail
output from num- in An Introduction To Rocket Science Us-
bers into an anima- ing STOMP, Scratch and GeoGebra.
tion. We have Links are given below.
made the time step
d much smaller so
that the curve
looks smooth. You
can vary the initial
speeds S and U to
see how they af-
fect the shape of
the balls path. Can
you edit the pro-
gram to simulate a
basketball throw
where the ball is
launched from
above the ground?
You might like to
add sound effects.
CCITE develops cross curricular STEM projects. Called the iSTEM+ approach, you can find out
more about it from the National Science Centre eLibrary: bit.ly/1RjjaMe. A key component is a set of inter-disciplinary
group projects which link aspects of the STEM subjects: Science, D&T, Computing and Mathematics. The full description
of this project can be found in the National Science Centre eLibrary at bit.ly/1R5sOn9.
13 SWITCHEDON: www.computingatschool.org.uk
Making the case for change.
Conrad Wolfram at the recent
CBM Educational Summit.
By the end of the two days, every attendee that had managed to achieve
something amazing, and had thoroughly dismantled that barrier to get-
ting started with the Raspberry Pi. What's more, having completed the
We are committed to promoting computer two days, each teacher became a Raspberry Pi Certified Educator,
programming within our own school as ready to go on and spread their new found enthusiasm to other educa-
well as in our local primary schools. On a tors and of course to a whole generation of children.
recent visit (above), P6 pupils were given Picademy@Google courses ware hosted at
the opportunity to learn how to create a Googles Digital Garage. Launched last year in
programme, using Scratch GPIO, which Leeds, they provide spaces in major cities de-
would allow two lights to flash in se- voted to developing digital skills. The courses
quence. We hope this will inspire some of will run alongside the definitive Picademy events previously featured in
the pupils to develop their computer skills SwitchedON. All courses are free. Future venues will be announced
further. Dawn McMaster soon, so keep checking at raspberrypi.org/picademy/google/.
SWITCHEDON: www.computingatschool.org.uk 16
All Year 9 girls at Fakenham Academy, Norfolk
took part in the international Programming Chal- RoboGirls, a team of year 10/11
lenge 4 Girls (pc4g.org.nz). Sue Gray reports on girls at Morecambe High School
a full day of coding and fun. have worked together for 2 years.
They have been involved in sever-
Girls need a lot of persuading that Judging took place at lunch before
al competitions such as First
computing and coding are useful skills meeting up again. Dr Pam Mayhew
LEGO League and Technovation
that offer interesting, challenging and from UEAs School of Computer Sci-
Challenge. We have been lucky
potentially lucrative jobs. PC4G sets ence gave a short speech on how
enough to be sponsored by both
out to show girls that they can code! software is all around us, stressing
the school and EDF (Heysham
that we really can change the world by
Power Station) which has helped
Before half-term, in class, we had just being able to code. From phone apps
us purchase equipment and pay
one hour learning a little about the to navigation systems to assistive
for entry into competitions.
Alice programming environment. On technologies, everything depends on
the day the girls then had another one software. A fantastic TED Talk by Ru-
They visited
and half hours to re-familiarise them- pal Patel (bit.ly/1fYUtlS) showed how
EDF to meet
selves and learn new skills before scientists have been able to custom-
female STEM
being set an unseen challenge. In just ise the synthetic voices for people like
staff and
two hours they had to follow a story- Dr Stephen Hawking who rely on tech-
demonstrate
board to create an animation to match nology to give them a voice. It is now
their robotics
as closely as possible to the example possible to take some tiny sound from
skills. Suzanne
not an easy task as it turned out! the person and create a unique
Porter said Its
voice; a voice of their own. All this is
fantastic to see
The first part, three girls speaking was possible because of software. Our
how support
easy enough but getting an orca to girls were genuinely moved and fasci-
has allowed
jump out of the sea and plunge back nated and I hope that for some a small
these girls to
again, head first was tricky. To get the seed of interest has been planted.
get so much experience and learn
orca to reappear and do a back flip led
new skills. Hopefully theyll think
to some very hilarious results with The lovely people at PC4G in New
about working with us one day.
orca turning themselves into balls and Zealand kindly provided medals and
belly-flopping back into the sea. Lots we were able to award 6 Bronze, 5
Mia Hargreaves (year 10) explains
of laughter, lots of helping each other, Silver and 4 Gold. A brilliant day, full
what she has gained from being
lots of fun. of fun and laughter and smiles!
involved in the after school group
so far : I really enjoy the social
aspects of the group. It isn't the
Last autumn an enthusiastic group of young female coders descended upon stereotypical code, code, code.
Moray College in Elgin, Morayshire in Northern Scotland. They came from every My friends and I have taken part
corner of the county and beyond with a shared enthusiasm for computing and in lots of workshops and competi-
coding. During the three hour workshop the girls took the opportunity to extend tions, and we even won the pro-
their coding skills using Scratch. They ject category in the Lego First
used Stop Motion software and a range of League. Ive been to robotic work-
creative materials to make a series of short shops at Manchester University
films. Later they added sound effects or a too. If it wasn't for the Computing
musical soundtrack. Film themes ranged group, I would have completely
from the clich of cute animals to a raging crossed out engineering as an
pig which ate every toy it met, eventually option. Now Im looking at focus-
eating the camera accompanied by the ing my studies on a career in bio-
sound effects of voracious munching! A engineering. Follow them
borrowed set of Lego Mindstorms from a @MCHSRoboGirls and read more
local Tech Firm were put to use. We also about the RoboGirls visit to Hey-
set up a Raspberry Pi computer and had a sham 2 on the EDF Website at
go at Python coding. Claire Griffiths bit.ly/1QR598l. Theresa Russell
17 SWITCHEDON: www.computingatschool.org.uk
When I first learned about the new compu-
ting curriculum my first instinct was to be
excited by the challenge and chance to September brings a new school year and
learn something new. I had Code Club PyCon UK - the volunteer led conference for
recommended to me by a parent and, hav- all users of the Python programming lan-
ing heard of Raspberry Pi on twitter was guage. Co-organiser Nick Tollervey reports.
lucky enough to earn a place on Picademy,
their free CPD training in Cambridge. Both As in previous years there was an education track generously sponsored
gave me a good start in understanding by Bank of America. Nearly 50 teachers attended and qualified for the
what was needed. Whilst I stumbled and 200 bursary to cover supply teaching costs. The Raspberry Pi Founda-
tripped a few times, I began to really enjoy tion, Code Club, Alan 'Teknoteacher' O'Donohoe and Martin 'Minecraft'
exploring new topics and thinking of fun O'Hanlon as well as many professional Python programmers volun-
ways to teach coding. But I soon realised teered their time and expertise.
most of my teaching friends seemed nerv-
ous and afraid to get started. With this in Friday focussed on learning Python, learning how to teach Python and
mind I invited teachers, interested pro- learning of others successes with Python. We also ran several ice-
grammers, Code Club and Coder Dojo breaker activities to get teachers and developers engaged with each
volunteers to an evening meet up. Unlike other. For example, teachers were able to learn, use and write games
typical CPD, I was keen for an informal, with the new PyGameZero library. They were also able to meet
relaxed atmosphere so found a local pub PyGameZero's author, world champion game developer, Dan Pope.
who let us use a function room for free.
Minecraft made an
The key thing about Coding Evenings is appearance - it's
they allow teachers a much needed oppor- always a pleasure to
tunity to play. Too often we are expected see people learn
to teach things we only have a basic un- Python through the
derstanding of ourselves. Coding Evenings medium of such play-
mean we can relax, play and take ideas ful digital "lego" - and
home with us. As word has spread Ive the Raspberry Pi
been joined by many helpful people in Foundation gave an
Twickenham who are eager to offer sup- inspiring series of
port. Ive even managed to gain sponsor- workshops about
ship from companies such as Pimoroni teaching with Python and the Raspberry Pi (and weather balloons, and
who allow me to offer the first drink free to space, and the sense hat, and the camera, and... you get the idea).
encourage more teachers to give up their
evenings and learn to code. Code Club explained their amazing work engaging the wider program-
ming community in after-school clubs. It was especially good to hear
My first Coding Evening was in January how both teaching colleagues and programming colleagues could buddy
2015. By the end of the year we had host- up to make this happen (it's remarkably simple, you should try it).
ed seven events in Twickenham as well as
three in Peterborough, another in South- The BBC's micro:bit made an appearance. It has a full reimplementation
end and a special event for Code Week of Python 3 running on the device. We learned how to program the mi-
EU in Mozilla, London. Between these var- cro:bit "live" by typing Python commands (in much the same way you
ious locations we have been able to help used to do with the original BBC micro - a very compelling experience
numerous teachers to feel more confident, that encourages exploration and experimentation). We also saw an early
comfortable and willing to give coding a version of the Python editor that will live within Microsoft's TouchDevel-
go. A group in West Berkshire is planned. I op. Importantly, we learned that the Python solution does not rely on
hope that we can continue to grow as TouchDevelop - you can create your Python scripts in any editor you
more teachers host their own evenings. choose. Simply run a command to turn your code into a hex file that's
Please take a look at our website flashed onto the device.
www.codingevening.org and see if there
are any events being planned near you. If Next year PyCon UK will return and the education track can only but
there isnt, do get in touch to discuss grow from strength to strength. Why not go? Many teachers come back
running your own. Cat Lamin year after year and it's an invaluable window into the practices of
programmers. It's also famously fun. :-)
SWITCHEDON: www.computingatschool.org.uk 18
One way to inject some fun into your coding les-
sons is to gamify them! Simon Johnson, who
teaches at St-Matthias School in Wolverhamp-
ton invites you to a game of code golf.
For those new to the concept, gamifi- Students can use a combination of Every Child Can Code is a new
cation is the process of introducing features such as loops or sub-routines interactive educational initiative,
game-like elements into traditionally to achieve their optimised code but encouraging children from age 7
non-gaming contexts to make them readability and usability must not be to code. The first stage of the
more fun and engaging. Strategies sacrificed at the expense of code scheme, BASIC Coding for Be-
include elements such as gamifying efficiency, therefore white space and ginners, includes 10 lessons
grading, incentivizing students with comments do not count as lines. We teaching BASIC, one of the most
rewards and adding competitive still want to encourage students to popular coding languages for be-
elements such as leader boards. One break up and comment their code so ginners. Each lesson teaches five
strategy that exemplifies the approach that it is comprehensible to others, BASIC commands and presents
is a game called 'Code Golf'. easier to debug and easy for others an example program with explan-
to re-use. atory comments for the pupil.
I came across Code Golf at the annual
CAS Teacher Conference. The idea is There are two main ways to play Code A key component is a unique child
simple, participants are given a prob- Golf. The first way requires students -friendly software coding teacher,
lem (or working solution) and are to solve a given problem using the which runs on Windows PCs and
challenged to solve it using the fewest fewest lines of code. The second monitors a child as they code. It
lines of code. The term is derived from method, which requires a little more warns when they have made a
the similarity of its scoring system preparation from the teacher, requires coding error, assists in under-
to that of conventional golf, where the students to optimise a given standing what they have done
participants aim to achieve the lowest working solution. The teacher can add wrong, and tells them how to put
score possible. It aims to encourage a little extra challenge by setting a Par things right. The coding teacher
efficient use of code. At GCSE and value, this being the optimal number allows a child to watch their pro-
A-Level, students are required to of lines of code. This Par value can be grams run in slow motion, step by
make efficient use of code in order to altered for different levels of ability step, so they can see each line in
access the higher mark bands. (similar to the handicap system in action and follow its effect on the
Efficient code compiles quicker and conventional golf) thus allowing the operation of the program.
uses less storage space. teacher to differentiate the lesson.
To make a start with Code Golf you can The second stage of the scheme,
download a PowerPoint and scorecard from BASIC Coding for Game Design,
Simons blog. This makes use of the turtle makes it easy for pupils to design
tutorials in an Introduction To Python booklet, and code their own games pro-
shared by fellow CAS member Mark Clarkson grams. The scheme and teaching
at bit.ly/1Nlk1Y5. A great example of how the materials are free of charge.
CAS Community can work together to develop In parallel with the scheme a new
materials. type of coding contest has been
announced the National Schools
If you wish to develop your own there are Coding Championships. There
plenty of good ideas for Code Golf themes will be one division of the champi-
and questions at bit.ly/1MR75KP. onships for primary and prep
schools, and another for second-
For more tips, advice about rules, curriculum ary and independent schools and
mapping, a sample lesson and links to other sixth-form colleges. For full details
programming challenges shared by CAS of the Every Child Can Code
scheme and the National Schools
members take a look at the more detailed
Coding Championship visit
article on Simons blog. Youll find this is at
teachwithict.weebly.com/coding-golf.html bit.ly/1NQnMnw David Levy
19 SWITCHEDON: www.computingatschool.org.uk
Calls for applications to the 2016 CS4HS
(Computer Science for High School) and
the RISE awards programmes will both Do you want to provide activities without
launch in Europe in January 2016. the burden of error-prone software instal-
lations? Michel Wermelinger, from The
CS4HS provides funding to local computer Open University, introduces trinkets.
science education experts for the planning
and development of CS teacher profes- I came across trinkets when looking for a way to complement our free
sional development. Through carefully pack of leaflets (see box bottom left) for BBC's Make It Digital season. I
planned programmes, secondary school wanted to provide a hands-on "hour of code" activity that could be done
teachers connect with university academ- online, without any software installation or account creation, by the gen-
ics, who can provide the professional de- eral adult public. Trinkets fit the bill perfectly.
velopment courses and tools needed to
bring computer science and computational A Python trinket is a browser-based environment featuring a text editor
thinking into the classroom. Teachers gain with syntax highlighting, a Run button, and a pane showing the resulting
the skills to develop and deliver the com- output. Misspelled variables are spotted before running the code. Error
puting curriculum, helping to inspire a new messages are shown in
generation of computer scientists who will meaningful ways, instead
build the apps and programs of the future. of cryptic stack traces. If
students get lost making
The RISE award programme provides grants changes, clicking the 3-
to organizations across the globe that pro- line icon reveals a reset
mote computer science education and run option that reinstates the
initiatives that reach girls, underrepresent- original program.
ed minorities, and students facing socio-
economic barriers under the age of 18. Each trinket is hosted on http://trinket.io, with a unique URL to share via
social media and e-mail, using the Share menu. Alternatively, you can
For full eligibility criteria and more infor- embed trinkets in webpages, to put explanatory text round activities and
mation, check back at the CS4HS run the code automati-
(cs4hs.com/) and RISE websites around cally. That's the route I
mid to late January. Obum Ekeke took. You can see the
result at bit.ly/1jTRpws.
Again, trinkets make it
easy: a Share option
shows the HTML snippet
to paste into the page.
Although you can create a trinket by just going on the website, changing
the example given there, and then sharing the link with your students, I
recommend you create an account or log in with a Google or Edmodo
account. With an account you can easily duplicate and change existing
trinkets (which I found convenient for building a progression of activities)
and you can see how often your trinkets were viewed, interacted with,
and shared. You should give each trinket a memorable name to quickly
As part of the Make It Digital season, the
find the code you're looking for. There is a 'gallery' view of trinkets but
Open University have produced a wonderful
unfortunately it doesn't show the code, only the output, which means that
free pack of literature exploring the develop-
trinkets requiring user input are, unhelpfully, blank in the gallery view.
ment of digital technology. It covers the histo-
ry of computers, looks at women in Maths
To sum up, trinkets are easy to use, well designed, and a good option to
and Computing, the basics and limits of algo-
avoid software installation or account creation, if you don't mind depend-
rithms, the development of calculating devic-
ing on the continued existence of the website. Only some Python
es and introduces coding. Well designed and
modules are currently available, including part of the turtle module, but
attractively laid up in A5 format, much of the
they're enough for most exercises or projects you can think of. There are
pack could be printed out and used for class-
also trinkets for teaching a Scratch-like language, HTML, CSS, and even
room displays. See bit.ly/1GjIIq1 for more.
music notation.
SWITCHEDON: www.computingatschool.org.uk 20
Everyone who grapples with A Level grows to love
simplifying Boolean algebra. Senior Lecturer at The 2nd November 2015 marked
Birmingham City University, Stuart Davison out- two hundred years since the birth
lines a method to confirm you are right (or wrong)! of the mathematical genius
George Boole (1815-1864). Born
Start with an expression: Karnaugh maps become more useful
in Lincoln and largely self taught,
as we introduce more variables. Con-
Boole was appointed the first Pro-
take a handful of distributive law, a sider now a map for three variables. In
fessor of Mathematics, at Queens
pinch of idempotent law and a sprin- order for the grouping method to work,
College, now University College
kling of annulment law and, like mag- the order of the BC combination must
Cork (UCC). It was here that he
ic, you end up with the simplified Bool- only change one bit at a time. Note
developed his most important
ean expression A. Wouldnt it be this is different to how counting in bi-
work, An Investigation Into The
handy if there was a nice visual way of nary works.
Laws Of
checking a simplification? Well youre
Thought in
in luck. Karnaugh maps can be used
1854.
to help simplify complex expressions if
you apply a few
As part of their
easy-to-follow
bicentenary
rules and draw
celebrations
lots of pretty ta-
UCC produced
bles, the most Again we take an expression,
teaching materials for their Boole
basic of which
2 School initiative. These free
looks like this. and identify where the parts of the
resources provide a wealth of
expression are true.
information, contemporary exam-
Each side of the map represents the
ples, exercises and puzzles for
values of different Boolean variables.
introducing logic to secondary
In an expression we need to mark all
aged students. More details about
the occurrences where the expression
all the resources, including videos
is true. For example, the expression
and an introductory PowerPoint
can be found at bit.ly/1P9TMZy.
should be
marked with
three ones to The groups to identify can now be Its certainly a lot quicker than a
represent the bigger so we should try to capture proof using laws of Boolean algebra
true parts of the adjacent groups of 8, 4, 2 or 1. You and something that is useful when
expression. might think that there are two groups you want to quickly check for a
Next, group all of 2 in the example, however, the fact simplified expression.
the ones that you can in as large a that the BC combination is changing
group as possible. On a two variable by only one bit allows us to create a A word of caution however. Applying
map this could be either groups of 4, 2 larger group that wraps around the this technique in an exam situation
or 1. You should aim to capture all the table. might not be an appropriate solution.
ones with as few groups as possible. Some A-level specifications allow the
Once this is done use of Karnaugh Maps but others
we can summa- might not. The way the solution is
rise each group arrived at should be based on the
as a small ex- how the question is written. It may be
pression. In this that simplification should be per-
example we have formed using Boolean laws to gain
two expressions full marks. That said, a Karnaugh
A and B. Within the group, identify inputs that Map can certainly help you check
Combining the smaller expressions have a constant state. In the example that the answer you get is in its mini-
with an OR operator gives us the sim- above, the one variable that does this mal form. To quote Boolean logic fan
plified expression A + B. is Paul Daniels: Now thats magic!
21 SWITCHEDON: www.computingatschool.org.uk
State diagrams are an important way
of describing what computer systems
can do. The last issue of
SWITCHEDON highlighted a great In the second of a new regular series, Greg
way to introduce the concept; Michaelson, Professor of Computer Science at
exploring the curious properties of a Herriot-Watt University in Edinburgh, illustrates
multi-sided hexahexaflexagon. A the value of state diagrams.
booklet describing the activity, by Suppose we want to design an inter- part of the Unified Modelling Lan-
Teaching London Computing, can be active text editor. To begin with, lets guage (UML), and are also used to
downloaded from bit.ly/1mdPFAi. A concentrate on the functionality, so design both Graphicall User Interfaces
diagram of the transitions is a were not concerned quite yet with and concurrent systems. Here, well
special kind of graph that can be how to use or implement it. Looking at use the UML notation where a state is
thought of as a machine a finite lots of existing text editors to tease out represented as a labelled box and a
state machine. The nodes of the their common features, we observe transition between two states is a di-
graph are different states the that they all provide the abilities to: rected arc labelled with the cause of
flexagon can be in and the edges open a new empty file; the transition (the event) and what hap-
show the actions that can be open an existing file; pens during the transition (the action).
taken to move between states. It close a file;
describes the computations save a file; For example, a state machine for a
involved in flexing the flexagon. edit a file; light switch might look like the diagram
exit the editor. below:
Finite state machines (FSM) can
serve as a vehicle to illustrate one of We also observe that:
the core ideas of algorithms. Ma- a file that isnt open cant be closed;
chines initiate actions based on their a file that isnt open cant be saved;
current state and on received inputs. a closed file cant be changed;
As such, they offer another way to a changed file cant be closed be- We can see that the light is in either a
introduce programming. Rather than fore its been saved; state where its ON or a state where
writing code, or assembling blocks of the editor cant be exited so long as its OFF. If the light is ON and the
commands, simple programs can be a changed file hasnt been saved. switch is set to off, the bulb goes out
expressed as diagrams. and the light enters the OFF state. If
So a text editor can go through the the light is OFF and the switch set to
Developed at following stages or states: on, then the bulb goes on and the light
ETH Zurich, ready waiting for a file to be is in the ON state.
Kara the lady- opened, or to exit the editor;
bird lives in a open waiting for an open file to You could imagine turning this into a
world of trees, be changed or closed; GUI. The event of switching the light
leaves and changed waiting for a changed on or off might involve toggling a but-
mushrooms. file to be altered further or to be ton and the associated action might
Children work saved. be to change a label from, say, black
in an easy-to- (off) to white (on) and vice versa.
use environ- And then the editor will change from
ment without one state to another depending on If we abstract away from this diagram
having to deal with the complexities what the user wants to do next. we could use it as an outline design
of modern programming interfaces. for any system with two states and
One goal of the project was to A very useful way to capture the tran- transitions from each to the other.
ensure they could have a working sitions between the states of a sys-
program expressed through a FSM tem, without focussing on the low level So, lets now consider our text editor.
within an hour. A free download details of what happens between each The state diagram, showing the three
from bit.ly/1JDS0cG Kara comes with state, is with a state diagram. State states, ready, open and changed is
exercises that range from simple to diagrams, which are closely related to shown in the box above right. Notice
very challenging. An excellent way finite state machines, are also used that weve named each event with a
for children to begin to appreciate in many engineering disciplines, for word. For example, we can consider
that programming is but part of a much example to design control systems. In the event EDIT to be a short hand for
deeper science. Roger Davies Computing, state diagrams are a key any change to the file.
SWITCHEDON: www.computingatschool.org.uk 22
The MVC design pattern provides
a way of cleanly separating out
interface and behavioural con-
cerns. The Model consists of the
State Diagram Outlining the underlying data structures for the
Behaviour for a Text Editor problem domain, typically manipu-
lated via methods. The View is the
Think about the state diagram shown A very nice thing about this ap- user interface. The Control medi-
above. Does it manage to capture proach is that we have separated out ates and keeps track of the inter-
our intuitions about how our text edi- three things: actions between the View and the
tor should function? the legal sequences of transitions Model. For example, for our editor:
the state diagram;
Now, if we used this diagram as the how each event is triggered by the
basis for the development of a user the interface;
Graphical User Interface, we could how each action is realised the
consider putting the labels NEW / implementation.
OPEN / CLOSE / SAVE / EXIT on
buttons or pull down menus. If we stick to our state diagram, we
can make changes to the interface
We could also restrict the display or the implementation independently
and only make an event option visi- of each other, making the realisation
ble or enabled when its use is appro- of the application much simpler
priate for the current state, that is
only when theres an arc leading This is reminiscent of the Model-
from a state labelled with the word View-Control (MVC) design pattern,
for the event. Used in this fashion, articulated in the diagram (top right):
the state diagram is also telling us the state diagram is the control, the
how to control what the user can interface is the view and the imple-
legally do. mentation is the model.
As an exercise, realise the text editor state diagram using your own choice of
interface, say a command line or a GUI. Choose something simple to indicate
the actions, for example displaying a message or changing a label when a state As the user interacts with the View,
changes, but without actually implementing any of the actions. Once the inter- the View interacts with the Control
face behaves as you expect it to, implement the actions by developing appropri- (a), which in turn interacts with the
ate procedures or methods that can be called as a result of selecting each Model (b). The Model uses its
event. Developing applications in this fashion allows the programmer to sepa- methods, manipulates information
rate the implementation of the interface from the processing required for each in the data structures and returns
action. results via the Control (c) to the
View (d) for the user to see.
As another exercise, construct a state diagram that explains the operation of a
media player, with controls to open, play, pause and stop media, and to exit. MVC was originally developed for
Then use the diagram to build an interface for the player. the early Object Oriented language
Smalltalk. Note there are lots of dif-
Finally use your state diagram to construct an implementation of a slide show ferent and not necessarily consistent
player for images. Here, because the image sequence continues to play until takes on MVC. More about design
the user pauses or stops it, its helpful to think about MVC and how to introduce patterns in Java, including MVC in
interacting threads for each component. the tutorial at bit.ly/1P6mCtx.
23 SWITCHEDON: www.computingatschool.org.uk
A crop of books in recent years
give advice about interviews for
tech jobs. The demand for such
books is a measure of the compe-
December 2015 was the 200th anniversary of Ada Love-
tition for positions in sought after
laces birth. To celebrate, the cs4fn team at Queen Mary,
companies. A personal favourite is
University of London joined with Oxford University, support-
Are You Smart Enough To Work
ed by EPSRC, to explore Victorian computer science in
At Google?, written by the Ameri-
their normal offbeat way. Issue 20 explores Adas work,
can author and columnist William
looking at where modern computing research has taken
Poundstone. Whether books like
her ideas, and how her work linked to the very modern idea of com-
this offer practical help is debata-
putational thinking. Rather than focus just on Ada, they also look at the work of
ble but, being full of interesting
her friends and influences, the people she influenced, and how their collective
puzzles, they are a great source
ideas and inventions both foresaw and provided the foundation for the age of
of classroom ideas. Take, for ex-
the computer a century later.
ample, the hundred doors problem.
We see, for example, how Adas friend Charles Dickens included computing
A row of 100 doors are all initially
ideas in one of his novels, how Ada foresaw the challenges ahead in writing
closed. You make 100 passes of
programs, how Braille was a precursor to the way we represent characters in
all the doors. The first time
binary, how Adas ideas about computational modelling of the way the human
through you visit every door and
body works is becoming a reality, and how she also saw the benefits of citizen
toggle it (the door is closed so
science and crowdsourcing. Ada was friends with a whole host of important
open it). The second pass only
intellectuals. These Victorian pioneers, friends and colleagues together had a
visits every 2nd door (doors 2, 4,
vision of computer science that is still only just being realised. Download your
6...), so even numbered doors
copy from bit.ly/1YOoKMp.
are closed. The third time, every
3rd door (3, 6, 9..) etc., until you
only visit the 100th door. Which
doors are open after the last pass? QuickStart Computing, the CAS Toolkit supporting the new
Computing curriculum, has been shortlisted in the Free
We could approach this problem Digital Content / Open Educational Resource (content
mathematically. After all, doors suite) category of the BETT Awards, 2016. Launched at
will be visited on passes that are BETT last year, the primary and secondary kits offer mate-
factors of their number. So door rial to colleagues develop new schemes. Funded by the DfE
28 will be visited on pass 1, pass and Microsoft they can be downloaded from bit.ly/1R88AaS.
2, pass 4, pass 7, pass 14 and
pass 28. An even number of vis-
its will return the door to its origi-
nal closed state. Given this in-
sight, we could, of course, labori-
ously calculate the state for every
door. As all divisors come in pairs
(1 x 28, 2 x 14 and 4 x 7) stu- Computing At School was born out of our excitement with the discipline, combined with a
dents may think all doors will fin- serious concern that students are being turned off computing by a combination of factors.
SWITCHEDON is published each term. We welcome comments, suggestions and items for
ish in their original state, but this inclusion in future issues. Our goal is to put the fun back into computing at school. Will you
isnt the case. help us? Send contributions to newsletter@computingatschool.org.uk
Many thanks to the following for help and information in this issue: Richard Asher, Jo
A better approach might be to write Badge, Phil Bagge, Irene Bell, Miles Berry, Paul Curzon, Claire Davenport, Roger Davies, Stuart
a short program (using just 2 loops Davison, Lorna Elkes, Remi Gauvain, Emma Goto, Sue Gray, Jonathon Hocker, Dave Honess,
and an array) and investigate the Lyndsay Hope, Simon Humphreys, Simon Johnson, Cat Lamin, David Levy, Dawn McMaster,
Greg Michaelson, Emma Norton, Adrian Oldknow, Carrie-Anne Philbin, Maria Quevedo, Siobhan
output pattern. Most will spot the Ramsey, Theresa Russell, Marc Scott, Andrew Shields, Sue Sentance, John Stout, Alec Titterton,
doors remaining open are square Nicholas Tollervey, Yvonne Walker, Jane Watkivs, Louise Weisbloom. and Michel Wermelinger.
numbers since only one toggle is
used for two divisors e.g 3 x 3. www.computingatschool.org.uk
Computing At School
are supported and
endorsed by: