Important Announcement
PubHTML5 Scheduled Server Maintenance on (GMT) Sunday, June 26th, 2:00 am - 8:00 am.
PubHTML5 site will be inoperative during the times indicated!

Home Explore HelloWorld Issue 3

HelloWorld Issue 3

Published by gPiO Box, 2017-11-18 11:33:57

Description: Issue 3

Search

Read the Text Version

FURTHER READING ALTERNATIVE ACTIVITY IDEASThis idea comes from a Barefoot Computing resource. This lesson can be adapted for differentExample program: helloworld.cc/2vaA0tR age groups:This lesson focuses on algorithms, repetition and variables. The followingBarefoot Computing resources may be helpful (sign-up required): 5-6 years – Using ScratchJrBarefoot Computing on Algorithms: helloworld.cc/2uBwuHt Students could create a program in a simple language, such asBarefoot Computing on Repetition: helloworld.cc/2w37t5H ScratchJr, with links to time and repetition. For example, a programBarefoot Computing on Variables: helloworld.cc/2v0IcfC in which their sprite says something or changes appearance every ten seconds.Human stopwatch pointing to the right with the sprite centre at the base - this will make 11-13 years – More challenging programmingWhenever possible, encouraging the geometry far easier!) Can students create a digital clock? One way this could be achievedstudents to first act out the system is by using sprites for each digit of the clock face, with multiplethey are trying to create can be Using the variable values to drive costumes. The variable values can then be used to switch theseincredibly powerful in helping them our clock hands is now simply a costumes (see the example program in the Further Reading box).to break down the steps in the matter of geometry. Figure 2 showsprocess, and start thinking about the code for the second hand. Why Physical Computinghow they might translate this into are we multiplying by six? Can Can students program a micro:bit or CodeBug to show a stopwatchcode. Start by putting students in pupils work out the code for the on their displays?groups of three (seconds, minutes, remaining hands? Can students try making a physical clock driven by motors orhours), with a mini whiteboard and servos connected to a Crumble controller? Challenge the studentspen each, and get them to become n F igure 2: Why are we multiplying ‘seconds’ by six to give to move the hands accurately – bearing in mind that most servosa human stopwatch (perhaps not the direction of the second hand? can only move through 180 degrees.the most accurate one!). Lead adiscussion as a class to determine The clock is now complete, ASSESSMENTthe algorithm for the stopwatch. and can be set using the slidersWhere is repetition present? When accessible by double clicking What is your algorithm for the stopwatch? Why?do the seconds reset to zero? What the variables windows.happens to the minutes at this point? As an extension: Why not get pupils H ow have you used repetition and variables in to create a second clock face with your code? Why?Coding a stopwatch Roman numerals, and add code to switch between the two? Or, even How does your code drive the clock hands orChallenge students to code a simple more challenging (See suggestion for digital numbers?stopwatch in Scratch. Which threevariables will they need? Why? n C reate your own clock in Scratch 11- to 13-year-olds), create a digitalStudents will need to know how to clock, which uses the variable valuesuse Scratch’s Repeat until block to switch costumes for a digitalwith an operator to ensure that the style display.stopwatch counts correctly – and wealso need it to start at zero each time.Driving a clock face (or three!)With a bit of tinkering we can nowrepurpose our code to drive a clockface (or three). Ask pupils to createa clock face background in Scratchand draw three clock hands asseparate sprites (Top tip: ensure thehands are drawn horizontally and helloworld.cc 51

LESSON PLANAGE RANGE INTRODUCING GAME DESIGN7 - 10 years Inspire students as young as eight to design and program their own gamesLESSON TYPE with collaborative and resilient workingBlock-based STORY BY Nikki CosseyprogrammingREQUIREMENTS• Scratch 2.0• Google Docs I designed this scheme of when they are ready to go on to n A game based on the Blitz work to introduce game the next step of the process, or design to my Year 4 students in a seeks assistance from me, and is The game design process fun, collaborative way. They role- the one from whom I ascertain play working in the games industry, the group’s progress. An engaging way to begin a and design a game to meet specific game design unit is to discuss requirements. It is easy to make I allocate more than a term and students’ favourite video games. links with other subjects: this unit a half (40-minute lessons, once a This will be a lively conversation is cross-curricular with History week) to this unit to enable them to – students love playing games as they explore the history of finish their games. They learn key and talking about their favourites! London during the spring term. skills, including the game design Delve deeper into this discussion Heterogeneous groups no greater process, writing pseudocode by asking students to explain than four work best, and each algorithms, user interface design, why they enjoy those games. This group selects a leader. collaboration in Google Docs, game should elicit responses such as The group leader has the usual creation in Scratch and, of course, that they are fun, colourful, and responsibilities of keeping track programming. Encourage them to challenging; they have a theme of time and ensuring everyone is start small by creating a simple, (car racing, football); and so on. on task. He or she also tells me working game, and not worry about Project their responses so they levels or choosing a character. can instantly see the requirements n A game based on the Great Fire of London for a successful game. I believe in teaching a game design process. I want students to appreciate that there is a creative design process that needs to be followed in order to create products, from the original concept or client brief to testing and evaluating. There are various processes for game design, and I combine ideas from a few models to make it accessible for my Year52 helloworld.cc

THE CHALLENGE The game requirements are that their game should:Follow the game design process: W hat are the requirements? Have clear instructions on how to play C ome up with an idea and do some research D esign the interface Be about a historical event that took W rite the pseudocode algorithms for your game place in London C reate the game in Scratch - first artwork, then code T est, test, test Not be too easy! R epeat steps 4, 5 and 6 until it’s perfect! Have a colourful, appealing interface4 students. The creative industries feasible. The game requirementsare usually project-based and are in the header, so they are End appropriately, by winning or losingcollaborative, and I aim to replicate constantly reminded of thethis with my game design unit. success criteria. Have sounds The first step in the game design Teaching computer OPTIONAL REQUIREMENTS:process is the requirements, which science conceptsare essentially the success criteria Have another leveland extension tasks. I pretend A project this collaborative andto be their client and tell them open-ended could be difficult for Keep track of scorethat this is what their game must a teacher to manage. However,have. Students find this role play the game requirements impose Have a timermotivating. They imagine they are some limitations on the students’working in the games industry and ideas, and close monitoring of the concepts of sequence, repetition,having to satisfy a client. Working planning stage ensures that their and selection, and how to controlcollaboratively on a Google Doc, games are achievable. I also only a character using the arrow keys.students decide on an idea, do let them create one of three typesresearch, design the interface and of games: platformer, scroller or Most know how to create awrite pseudocode algorithms. The maze. They know how to make scroller game, since it is simplyGoogle Doc is shared with me, a maze game as they made one moving from left to right, and theyand I track their progress, provide in Year 3 when they learnt about have created animations in Scratchfeedback verbally or as comments, Ancient Greece and Theseus and where a character has movedand ensure their game idea is the Minotaur. They learnt the along the stage. A brief class discussion and demonstration will ASSESSMENT remind them of the blocks of code required to create these games.H ow did planning help you when creating your game? They should only need teacherW here did you use sequence, selection, and repetition in your game? assistance if their character jumpsW hat problems did you encounter? How did you overcome them? (if they choose a platformer game), or if they complete the core game and move onto the extension tasks. Step four of my game design process is writing algorithms. I show them how to write pseudocode, helloworld.cc 53

LESSON PLANn A completed game on the theme of the Great Fire of Londonn S cratch code for emphasising that they must use An example of a group’s algorithm: n Switch backdrop to Win making a sprite jump basic English, a bulleted or numbered and collect coins list, and specify the Scratch blocks Algorithm for title screen: n W hen on win screen put a trophy needed. They write the pseudocode n When green flag clicked in the middle algorithms for each of their interfaces. Some will need reminders n P lay button will appear. It is a sprite n H ave a sprite that has a button that algorithms are instructions that says start again and on the for the computer – not the player! n Bridge is now in the background other side have a button that says One group member can consult the quit game Scratch menus to identify the names n W hen play button/sprite is clicked of the blocks they require while the change to backdrop 2 and hide n T he trophy will have fireworks others write the algorithms. play button. around it. Algorithm for game screen: Algorithm for lose screen: n W hen on backdrop 2 get n W hen you fall off the bridge (if the bridge in front touching blue) show lose screen n Put the obstacles on the bridge n Y ou can lose by hitting one of the obstacles or hitting the side n L et the player use the arrow of the bridge keys to move.   n W hen on lose screen put a sad Algorithm for win screen: emoji in the middle of the screen n It will show the win screen when n H ave a sprite that has a button you have crossed the bridge and that says start again and on the you are going onto the next stage other side have a button that says quit game. The sad emoji n If touching (brown colour) switch will have a sign saying try again. to win screen54 helloworld.cc

n Scratch code for moving a sprite or Jump block. Students’ curiosity ALTERNATIVE ACTIVITY IDEAS or ambition is often a cue for When their algorithms are me to provide tips or advice to Explore and makesufficiently precise, and their reinforce existing knowledge,planning is satisfactory, students or teach them something new, Adapt this project to challenge other age groups.sign up to a class I created using which they can implement in their Unpluggedmy Scratch educator account. game straight away. This resultsOne student creates the title in deeper learning and more long- Students design a game using a storyboard template.screen, one creates the game term retention, as it is a form ofscreen, another makes the win enquiry-based learning. 7-10 years - Programmingscreen and another makes the lose Students use variables to keep track of score and lives.screen. They design the necessary Finishing the game Students design games using advanced computer science concepts:sprites and backdrops then make sure the game requirements are more complex.start coding. The student creating the game Students make their game then use Makey Makey to create a controller. screen has the most coding to do, so their project becomes 11-13 years – Text-based Programming the main project when the Students use a programming language such as Python to create others in the group finish their a simple game. interfaces. Backdrops, sprites and code from group members’ and similar to help sheets. It shared projects are put into also ensures that you remain a the backpack and transferred facilitator by guiding students to the main project. Students to code and debug their own take it in turns to assemble the games resiliently. main project while the others advise – paired programming Groups will finish at different of sorts. If students need more times. While other groups catch help with coding, they can follow up, there are extension tasks built into the game requirements,“ ENCOURAGE THEM TO START or they can market their game SMALL BY CREATING by creating a print or TV advert, A SIMPLE, WORKING GAME or use Makey Makey to create a controller for their game. Using their algorithms, they a studio I created where I have End the project with groupslocate the required blocks, and added projects with commonly assessing each other’s gamesbasically teach themselves event- required code. They put the code by playing them. This can bedriven programming. When the from the projects in the studio done by letting them add theirgreen flag is clicked, they know the into their backpack and incorporate projects to a studio you create.title screen and play button sprite it into their project – useful for They can Favourite or Loveshould show; and when the play students who require scaffolding, projects and add comments.button is clicked, the game screenmust show and the play button FURTHER READING n A game based on the Great Plagueshould disappear. They are ableto select blocks independently A completed game from oneto manage events in their game, of my student teams:and control how a player wins helloworld.cc/2h5FT5kand loses. Commonly required code for games in my studio: The computer science helloworld.cc/2vbxBz6concepts I reinforce with myYear 4s are sequence, selection,and repetition, and I introduceprocedures where they define acustom block to create a Reset helloworld.cc 55

GUIDE PART 1 PYTHON AND SQLITE Ben Garside introduces SQLite3, a Python library that allows you to create and manipulate local databases D atabases underpin our electronic Getting started When working with databases, the term cursor lives. A significant number of IT doesn’t refer to a pointer on the screen – it issystems, including websites, games Make a new Python file and give it a name actually an acronym (CURrent Set Of Records).consoles and mobile phone applications, that describes what it is going to do, which The cursor can perform many operations in arely on databases to function. When is to create a new database and make a database, including holding the data that is tolearning about databases, many students user table. Create Database or Create be added to the database, or storing the dataand educators face the challenge of setting User Table would be suitable. Open the returned from running queries. You will use theup their own databases when they don’t file, import the sqlite3 library, and make cursor in several ways in this tutorial.have an SQL server to connect to. A a connection to the database:solution to this problem is to use SQLite, Creating a tablewhich is free and open-source. It creates import sqlite3a local database, stored in your document with sqlite3.connect(\"users. The next step is to make our first table,folders rather than on a server. db\") as db: which is designed to store basic information SQLite is used by developers. It is about users.useful if you are developing an application cursor = db.cursor()that uses a database, but don’t want If the database users.db doesn’t already import sqlite3the application to have to connect to an exist, the program will create it. If it does, with sqlite3.connect(\"users.SQL server. this line will make a connection to the db\") as db: There are various ways to work with database that you can refer to later bySQLite, but Python (from versions 2.5 using the variable name db. A cursor is a cursor = db.cursor()onwards) features a standard SQLite library. database object that is used to manipulate cursor.execute('''In this tutorial I will show you how to set up data. There are commands associated CREATE TABLE IF NOT EXISTS user(a database that will store users’ details. We with a cursor such as cursor. userID INTEGER PRIMARY KEY,will then write some code that will allow execute(), which will run a query, and username VARCHAR(20) NOT NULL,users to create their own accounts. cursor.fetchall() which collects the firstname VARCHAR(20) NOT NULL, results of the query for you to use. surname VARCHAR(20) NOT NULL, password VARCHAR(20) NOT NULL); n N ew user creation in the database GUI ''') We use the cursor.execute() function for the first time here. In the following brackets, we enter our SQL script as a string. Our table will be called user, and will include the fields shown above. If you are familiar with MySQL, you will start to notice some differences in syntax here. You will notice that the Primary Key is declared next to the field. In sqlite3 you can declare this at the end of the SQL table creation statement by writing INTEGER PRIMARY KEY. This will not only make the userID field the Primary Key, but it will also automatically auto- increment the value with each user that is created, guaranteeing that each entry is given a unique identifier.56 helloworld.cc

FURTHER READINGn Username validation check in the database GUI To extract all the data from the table Full SQLite tutorial: we are going to use the wild card * which SQL commands aren’t case sensitive, but it is represents ‘all’. SELECT * FROM user; helloworld.cc/2uhjYKV good practice to write the commands in capital will pull out the data we need. We also letters for readability purposes. need to tell the program to fetch the results. Learn more about the syntax used with SQLite, and how to do more with relational databases,Inserting data into the table Code: at the tutorialspoint website: cursor.execute(\"SELECT * FROMLet’s create a test user to make sure that user;\") helloworld.cc/2susXGBthe table is accepting the data in a way print(cursor.fetchall())that makes sense. We’re going to use the The YouTube videos on which this tutorial is basedcursor.execute() function to run a Output: can be found here:simple INSERT INTO script. We will add [ (1, 'test_user' , 'Bob' ,a new line at the end with the instruction 'Smith' , 'MrBob' ) ] helloworld.cc/2txVv76db.commit(). This line saves the datato the database; without it the data would Code: These videos take the project further, creating anot be saved. cursor.execute(\"SELECT * FROM relational database called Quiz that stores quiz user;\") questions and users scores. cursor.execute(\"\"\" results = cursor.fetchall() INSERT INTO for item in results: This query is designed to demonstrate the user(username,firstname data retrieval process. If you only wanted to ,surname,password) print(\"Welcome: extract the user’s first name and surname, VALUES(\"test_ \",item[2],item[3]) the query SELECT firstname, surname User\",\"Bob\",\"Smith\",\"MrBob\") FROM user; would be more appropriate. \"\"\") Output: db.commit() Welcome: Bob Smith Making a function to add a userExtracting data from your user table The first example shows that cursor. Now that we have created a table, it would be fetchall() does print the data in useful to allow new users to create accountsTo extract data from tables you use SELECT the table, but the output is not ideal. It for themselves, rather than expecting anqueries, which can be written to specify the demonstrates that each row of the results is administrator to enter all the users manually.format of the data. For example, you may being stored in a list. In the second example, The first step is to ask the user to create awant to extract just the usernames and we have implemented a loop that would loop username. We need to add some validationpasswords, and order them in ascending through all of the results (if there were more at this point to prevent a new user fromorder by username; or you may want to than one record in my table). This method choosing a username that already exists. Thepick out all users with the surname ‘Smith’. demonstrates that we can be clever, and pick code below uses several of the concepts weThis example will pull out all the data from out only the specific fields we want to work have learnt about already.the table so that we can see what that with. For example, item[2] picks out thelooks like. Then we will look at ways to use third item in the list. def newUser():Python to manipulate the data. found = 0 while found ==0: username = input(\"Please enter a username: \") with sqlite3. connect(\"Quiz.db\") as db: cursor = db.cursor() findUser = (\"SELECT * FROM user WHERE username = ?\") cursor. execute(findUser,[(username)]) if cursor.fetchall(): print(\"Username Taken, please try again\") else: found = 1 helloworld.cc 57

You may want to change the code above n SQLite output from the password validation check reenter your password: \")to give the user the option to exit the system while password !=password1:- they might decide not to create the account input(\"Please enter a username: print(\"Your passwordsbecause they’re annoyed that their favourite \")username has been taken. didn't match, please try with sqlite3. again\") With this step we have constructed a connect(\"Quiz.db\") as db:different type of query. The query find password =user needs to take in the data stored in the cursor = input(\"Please enter yourvariable username. The problem is that we db.cursor() password: \")can’t enter the variable names, as it wouldread them as strings, not as the values being findUser = (\"SELECT * password1 =stored in the variable. You may be used to FROM user WHERE username = ?\") input(\"Please re-enter yourreplacing variable values in a string with % and password: \")declaring them later, but this method leaves cursor.us open to the potential of an SQL injection execute(findUser,[(username)]) insertData = '''INSERTattack. Instead we use ? where we need to INTO user(username,firstname,insert a variable. if cursor.fetchall(): surname,password) print(\"Username On the next line, where the cursor executes VALUES(?,?,?,?)'''the query, we can tell the database what to Taken, please try again\") cursor.execute(insertData,use instead of the question marks: cursor. else: [(username),(firstName),execute(findUser,[(username)]) found = 1 (surname),(password)]) db.commit() Next, we need to check whether the query firstName = input(\"Enterhas returned a value. To do this we use the If your first name: \") To call this function you need to writestatement if results. If it has, we know a line of code outside the function:the username has already been taken. If it surname = input(\"Enter your newUser(). Test your code by adding areturns nothing, we know we’re ready to surname: \") new user to your database, as well as tryingproceed with the account creation process. to add a user that already exists. password = input(\"Please Now we want to ask the user to enter their enter your password: \") You have connected to a databasedetails, do some more validation to check that and successfully added data. Can youthey’ve entered the password correctly, and password1 = input(\"Please create another function that logs a userfinally to execute a query to insert the values into your system by checking that theirinto the database. username and password match the records in your database? def newUser(): found = 0 while found ==0: username = n A password validation check Ben Garside is a teacher at Durham Johnston School. He using the GUI trained in ICT but converted to Computer Science with a PG Cert in Computer Science from Newcastle University58 helloworld.cc

OPINION MARK THORNBER TEACHER MATHEMATICAL MUSINGSMark Thornber introduces RSA encryption and the mathematics of prime numbers odern encryption methods are based on the Government agencies from all major nations employ many mathematicians and computer scientists to find waysM mathematics of prime numbers. The basic idea of working more efficiently with primes. is that knowing the product of two large primenumbers does not make it easy to find the original numbers. Using RSAAs a challenge, I multiplied two prime numbers and theanswer was 700179159413. Can you find the two numbers The first of the modern methods using primes is calledusing only a simple calculator? The obvious method of trying RSA, after the inventors Ron Rivest, Adi Shamir, andevery possible factor would take a very long time. A Python Leonard Adleman, who published their method in 1978.program to try all odd factors took 0.1 seconds. To use RSA you find two very large prime numbers, p and q, and keep them secret. You then calculate the product, import time n=pq. Next, you find another prime d, between max (p,q) n = 700179159413 and n. The numbers n and d are your public key. You tell start = time.clock() them to everybody. People can now use this public key i=1 to encrypt messages to you, but only those who know p notfound = True and q are able to decrypt them. while notfound: The inventors illustrated the method with some small i=i+2 numbers: Suppose p=47 and q=59, so n=2773, and we if n%i == 0: now choose d=157. Now represent your message as a series of numbers smaller than n – e.g. by using ASCII codes. notfound = False ‘Help’ becomes 72,101,108,112. For each number N in the end = time.clock() message, replace it with m=Nd(mod n), the remainder when print(i, n//i) Nd is divided by N. 72157(mod 2773)=288 etc. print(end - start) To decode, we need to know p and q. First we find a There are more efficient ways to attempt to solve number e so that de=1 (mod (p-1)(q-1)), and then calculatethis problem, but all the known methods involve a lot of Me (mod n) for each number in the message.systematic trials. The time taken increases to many yearsfor the very large primes used in internet encryption. message = “Help” d = 157 FOLLOW-UP QUESTIONS n = 2773 listmessage = [ord(letter) for letter in n H ow can we find very large (500 digit or more) prime message] numbers quickly? code = [pow(x,d,n) for x in listmessage] print(code) n O ur program uses the built-in Python function pow to do the hard work. How does this calculate enormous The fact that we can always find e, and that this gives us powers quickly? back the original message, follows from the mathematics of prime numbers discovered more than 250 years ago. In our n R unning the program with a message ‘Hello’ shows that simple case e=17 and 28817=72 (mod 2773), etc. each letter always gives the same encrypted number. This makes the method vulnerable to frequency analysis. How Mark Thornber has been a maths teacher at Durham Johnston can we avoid this? School for the last 25 years. Mark has been interested in the mathematical parts of computing since owning his first ZX81. n S ince everybody knows the public key, how do you know the encrypted message comes from the person who claims to have sent it? How do we know it wasn’t intercepted and replaced with a different message from some mischief-maker? helloworld.cc 59

OPINION GREG MICHAELSON PROFESSOR OF COMPUTER SCIENCE ASSIGNMENT: SHARING OR COPYING?We think of variables as name/value associations, abstracting from address/bit pattern associations, but what exactly are values and what happens when we assign them? o begin with, let’s recall that, for most Suppose that variable identifiers are aliases for addresses on the stack. Let’s consider the effects of: T languages, memory is typically divided into the stack (for variables and sub-program DECLARE a INITIALLY 0 formal parameters) and the heap (for compound data DECLARE b INITIALLY a structures like arrays and records). SET a TO 1 THE STRANGE CASE OF C shown in figure 1. a is initialised to 0 (i). After b is initialised from a, each Like many languages, C distinguishes array structures, where every element is the same type, and record has their own copy of 0 (ii). Subsequently, changing a structures (structs), where fields may be of different doesn’t change b (iii). types. C further distinguishes structure variables from structure pointer variables. For structure variable n Figure 1: integer variable to variable assignment declarations, space is allocated for the structure on the stack, and the identifier is an alias for the first element. b0 b0 However, for pointer variable declarations, space is only allocated on the stack for an address. Subsequently, a0 a0 a1 structure space must be allocated explicitly for the variable to point to. stack (ii) (iii) Inconsistently, C does not permit array variable (i) DECLARE b SET a TO 1 assignment, but does permit struct variable INITIALLY a assignment, which is by copying. Now, if a struct DECLARE a has an array variable field, then it will be allocated INITIALLY 0 stack space along with the rest of the struct. Thus, whole arrays may be copied on the stack through After assigning a base type from a source variable to a target struct variable assignment. variable, assigning to the source doesn’t change the target60 helloworld.cc

OPINIONn Figure 2: array variable to variable assignment with address sharing 3 3 4 2 d2 2d 1 c1c 1c (ii) (iii)stack heap DECLARE d SET c[2] TO 4 INITIALLY c (i) DECLARE c INITIALLY [1,2,3]Array variable to variable assignment with address sharing. After assigning a structure type from a source variable to a target variable, changing via the source changes the targetAssigning array variables: sharing As before, c’s value is a heap address (i). But now, d’s value is the heap address of a copy of the array addressed by c (ii).Let’s assume that the value of an array variable is the Thus, changing an array element via c doesn’t affect d (iii).address of the first element of the array. Suppose, first ofall, that assignment between array variables copies the Few contemporary languages, apart from C, supportarray address. Figure 2 shows the effects of: copying assignment of structures. DECLARE c INITIALLY [1,2,3] Ancient languages, like FORTRAN and Pascal, DECLARE d INITIALLY c distinguished sub-program parameter passing by value, i.e. SET c[2] TO 4 copying, from passing by reference, i.e. sharing, but these are misnomers. In all programming languages, assignment, After the first declaration, c’s value is the array’s address of which parameter passing is one form, is implementedin the heap (i). Initialising d from c copies that address, so as bit pattern copying. The key question is what the bitc and d appear to share the array (ii). Thus, changing an patterns represent, which in turn depends on the languageelement of the array via c will be picked up if the array is and the implementation.accessed via d (iii). Greg Michaelson is interested in the design, This is the approach taken by Java and, in effect, Python. implementation and analysis of programming languages, especially for multiprocessors. He has taught programmingAssigning array variables: copying for nearly 40 years.Suppose instead that, for an array assignment, the wholearray is copied. Figure 3 shows the effects of the previous 33program fragment. 22n Figure 3: array variable to variable assignment with copying 11 334 2d 2d 2c 1c 1 c1stack heap (ii) (iii) (i) DECLARE d SET c[2] TO 4 INITIALLY c DECLARE c INITIALLY [1,2,3]Array variable to variable assignment with copying. After assigning a structure type from a source variable to a target variable, changing via the source doesn’t change the target helloworld.cc 61

FEATURE COMPETITIVE LEARNINGProgramming perseverance produces prizes: when your learning objectives include ‘to win a grand’! STORY BY Neil Rickus A t the recent Scratch conference TEENTECH AWARDS ANIMATION 17 in Bordeaux, Mitch Resnick,Professor of Learning Research at MIT URL: TEENTECH.COM URL: HELLOWORLD.CC/2UEA3L7Media Lab, Director of the Lifelong AGES: 11-18 AGES: 7-19Kindergarten research group and Headof the Scratch Team, used his keynote Having guided groups of Year 7 This popular competition, now in itspresentation to talk about his team’s students to the TeenTech Awards tenth year, allows individuals and groupsguiding principles: projects, passion, play final on a number of occasions, I’m to develop a one-minute animation,and peers (helloworld.cc/2tOO9g7). particularly fond of this competition. which can be produced using a rangeWhile ‘programming perseverance Students develop products linked to of software, including Scratch. Studentsproduces prizes’ may not be quite as specific categories, which are judged can work individually or in groups, withaspirational, the use of competitions in my externally, and feedback is given to separate prizes of Amazon vouchersteaching of computer science has allowed all entrants. Finalists are asked to available for KS2, KS3, KS4 and KS5.students to undertake a range of engaging develop their project further, and Prizes are also available for a specialprojects, collaborate extensively, and visit invited to attend an event at the Royal e-safety category. Older children maylocations across the country to showcase Society in London. In addition to a also wish to consider the free digital-arttheir work. final judging round, the event includes camps run by 3Dami (3dami.org.uk). visits and talks from famous namesCombined motivation in technology (Brain Cox, James May Image: PA Consulting Group and Martha Lane Fox have all takenPapert, in his writing on Constructionism, part over the past few years). Theargued that students learn best when competition’s patron, HRH The Dukethey are engaged in making things for of York, invites the eventual winners inothers. Combining this motivation with each category to Buckingham Palacethe possibility of feedback from external to receive a prize of £1,000.judges, and success on an internationallevel, competitions can facilitate enhanced PA CONSULTINGstudent outcomes, engagement and GROUP’Smotivation. Many competitions have a RASPBERRY PIcash prize available for the winners, and COMPETITIONintroducing a unit of work with the phrase“the top prize is ten thousand pounds” is URL: HELLOWORLD.CC/2H7SAWWan extremely useful hook – however, care AGES: 8-18needs to be taken to manage expectationsand ensure this is not seen as a substitute This competition has been running for fivefor well-planned, engaging lessons. years, and the theme for 2016-17 was ‘Innovation for all’, which saw students The competitions listed here have producing products aimed at improvingbeen used successfully as part of my “the lives of people who have conditionscomputer science teaching with primary- that limit their ability to do things some ofand secondary-aged children. Each rest of us take for granted”. The finals arecompetition has several different focus held at the IET in London and the winnersareas, which gives children some flexibility in each category receive £1,000.in their choice of project, and encouragescreativity. Students also need to plantheir work, continually evaluate theirprogress, and collaborate with others –all essential experiences for developingtheir computational thinking skills.62 helloworld.cc

BEBRAS NESTA LONGITUDE Introducing competition EXPLORER PRIZE URL: BEBRAS.UK How can you begin to use these competitions AGES: 6-18 URL: HELLOWORLD.CC/ within your school? Start by visiting the 2V5S9G7 URLs on this page. Most competitions have While the other competitions on these a mailing list or newsletter, and will send pages focus on students designing AGES: 11-16 you a reminder when competition materials and developing projects, the Bebras have been released or entries are open. Computing Challenge aims to introduce Now in its second year, this year’s Previous years’ resources can be examined children to computational thinking. Longitude Explorer Prize examined to determine where the competition will fit The competition runs in more than how the Internet of Things (IoT) in with your schemes of work, and you could 40 countries, and the next event is can be implemented innovatively in link the project with other curriculum subjects, scheduled to take place between 6 and healthcare. Finalists develop their such as science, or design and technology. 17 November, 2017. There are separate projects in conjunction with IBM, Alternatively, a competition could be chosen competitions for different age groups, as well as pitching their ideas and as the focus area for a specific group of and students can work on questions showcasing their prototypes to a students, such as your school’s Digital from previous years prior to the event. judging panel. The winning school Leaders or as part of an after-school club. The top-achieving students are invited receives £10,000, with runner-up to a final round and celebration, in and individual prizes also available. OTHER addition to being eligible to enter more The next Longitude Explorer Prize COMPETITIONS challenging competitions to further will run this autumn. develop their understanding. For Information on a range of other information on Bebras, see page 68. Every few months the Raspberry competitions can be found on the CAS Pi team sets a challenge for website at helloworld.cc/2u4KCJk, or RASPBERRY PI groups to get creative with in our FAQ (page 86). PIONEERS technology. The latest challenge was entitled ‘Make it outdoors’, URL: HELLOWORLD.CC/2JQNIJG and the next tasks will be AGES: 11-16 launched in September 2017.Image: Raspberry Pi - Anna Gordon helloworld.cc 63

OPINION WILLIAM LAU TEACHEREXERCISE BOOKS IN COMPUTING Give your students an indexed revision guide, full of their own coursework. Better still, let them write it themselves! his is not an attempt to convince you to switch All pages are numbered and we give clear presentation guidelines such as: T to exercise books, although some of you may n All written work to be completed in blue ink be compelled to use exercise books having n All drawings to be done in pencilfinished this article. Some readers will work in schools n All self-marking to be done in black inkwith standardised policies regarding the presentation n All peer-marking to be done in green inkof student work. Some schools demand that students n All teacher marking to be done in red inkuse ring binders or exercise books. Four years ago, I n All sheets to be stuck in flat, without foldingjoined a school which transitioned from students using n All work to have a date and title underlinedring binders to using exercise books. I was hesitant atfirst, given that I had used Google Classroom, GSuite We trim all our worksheets down to size so that theyand various VLEs before. However, after four years, I’ve fit into the books. The images show some examplesdeveloped a system that I’m happy with, and it is one of of exercise book work. We do not print out all theirthe keys to providing academic success for our pupils. programs, but we certainly print out assessments. These usually have marksheets attached, and thenJudging a book by its cover students print out the improved copy.The first thing to consider is the front cover. In my first TEACHING COMPUTINGyear, I made it compulsory for each student to decorate IN SECONDARY SCHOOLSthe cover of their book. It provided buy-in, and it alsoprevented students from using the excuse of mistaking William has recently finished a booktheir computing book for a subject which used the same which provides a step-by-step guide tocolour. However, as the standard of decoration varied teaching computer science at secondarygreatly, I now make this decoration optional, and make level. It offers an entire framework forstudents aware of our high standards by showing them planning and delivering the curriculum,previous examples. and shows you how to create a supportive environment for students in which all can As books would get somewhat worn and tatty, we also enjoy computing. The focus throughoutbought plastic book covers. These kept the books in good is on giving students the opportunity tocondition throughout the year, and allowed students to think, program, build, and create withtuck loose sheets into the back pocket between lessons. confidence and imagination, transforming them from users to creators of technology. We stipulate the key information that should be onthe front cover, and we also state that there need to betwo pages dedicated to a table of contents. This ensuresthat students can use the books as revision guidesthroughout the year.64 helloworld.cc

n Students have commented on how helpful their books are when completing NEA and controlled assessmentsReference books REFERENCESStudents have commented on how helpful their books Roediger III, Henry L. (2013). Applying Cognitiveare when completing NEA and controlled assessments, Psychology to Education: Translational Educational Science.and they certainly look back over them during revision Psychological Science in the Public Interest. 14(1) 1-3lessons. In many cases, it is much quicker to flick throughtheir book to look up some key syntax than it is to learning (Roediger, 2013). Often these low-stakes testssearch through hundreds of programs that they have take the form of multiple choice questions. Many of thesewritten over the years. In the computing industry, many questions can be sourced from the quantum project atprogrammers use a notebook. As 80 percent of GCSE helloworld.cc/2vkqgN0.Computer Science is assessed through hand-written While I am not arguing that this is the only effective students can use the method of workflow, it has certainly worked well books as revision guides for our department and for our students. If you are throughout the year interested in reading more about computing pedagogy, you may be interested to read some of my blog poststheory exams, it makes sense to use exercise books to at www.mrlaulearning.com, or a more extensive andorganise students’ thoughts and to assess students’ comprehensive guide in my book Teaching Computing inhandwritten work throughout the course. Secondary Schools, which is available for pre-order from Routledge or Amazon. The use of exercise books also feeds into classroompedagogy. It allows teachers to start every lesson at William Lau is the Assistant Headteacher and Head ofa desk away from computers with some form of low- Computing at Greenwich Free School. He is a CAS Masterstakes testing. Studies show that frequent, low-stakes, Teacher, author of Teaching Computing in Secondary Schools,distributed and interleaved testing is beneficial for and winner of the Infosys Foundation USA/ACM/CSTA Awardn Clear presentation guidelines make work in the books easy to follow for Teaching Excellence in Computer Science. helloworld.cc 65

FEATUREn Use collaborative working in the classroom to demonstrate the real-life experience of a software developerWHAT DOES A DEVELOPER DO? Ever wondered what a software developer really does? Nicholas Tollervey explains… STORY BY Nicholas Tollervey I am a professional For example, working with NHS England, Spencer, and we could update the site software developer. I was asked to write code to automatically with a single command. Everything was I’m also called a software engineer, create spreadsheets from complicated scripted in Python, with automated tests toprogrammer and hacker (and ninja, source data. What the client really wanted check certain conditions were met duringsuperhero and rock star, but I’ll come was an indication of patient waiting times. the deployment of the website, and Pythonto that silliness later). They had disguised the fundamental would abort if problems were encountered. While I write code for a living, it is only problem (I want to see current and historicone aspect of my job. My skill as a developer waiting time information) as the need for By automating such activities, thecomes from using my creativity, experience more spreadsheets. We created a web- knowledge essential for the smooth runningand domain expertise to solve problems. based dashboard to display the data, and an of the company is expressed as code. API so anyone could consume the data. The Contrast this with the manual alternative:It’s not all about the code moral: solve the right problem – which may someone with the nerve-wracking and not be the problem you are given. time-consuming job of deploying everythingOften the most appropriate response doesn’t themselves. Often this was a single personinvolve writing code. A large part of my time I also automate my work. I want to spend and, if they went on holiday or left theis spent probing, questioning and playing most of my effort on difficult problems, business, such valuable knowledge was lost.devil’s advocate for people who believe they so I turn the repetitive stuff into software.have a technical problem, when in fact they For example, last year I helped create Most of the code I write consists of testsneed to address something else. the Christmas food website for Marks & for the code that actually does something useful. Tests express how I expect my66 helloworld.cc

n T eachers need to challenge the stereotype of I ensure my code is properly commented (who ensure a good user experience), in plain English so my colleagues (and my designers (who make the application the socially isolated, young, male coding genius future self) understand what it does when look good), business analysts (who they come across it on the internet. I name represent the business) and scrum-code to run, and well-tested code is better things such as variables, classes, and masters (who facilitate the smoothbecause writing tests makes you reflect on functions in a way that makes it clear what running of the project).how your code should behave. But tests are they represent. Comments explain intentionsno guarantee that the code is bug-free! I may rather than implementation. It’s important Rejecting stereotypeshave missed a potential bug and failed to to know why something was written towrite a test to reveal it. see how it adds value to the wider system. Contrast all of the above with a Comments are also a good place to explain if stereotypical software developer: He is a Tests are most useful as a way to deal man in his early twenties. He lacks socialwith change: if I inadvertently make a skills, holds infinite technical details in hisbreaking update – I add feature X, but this head and sits on his own in a windowlesshas an unforeseen negative impact on room pounding out code for hours on end.feature Y – then the tests for Y will fail. He says incomprehensible things like, “I’ve created a neural network to bypassCollaborative working the firewall and reverse the polarity of the mainframe’s memory banks.” Often, he isI rarely work alone. Often I will pair-program the focal point of some important activitywith another developer, where we take it in since he’s the only one with the skill toturns to write code (with the other watching, pull it off.commenting and challenging their partner).It’s an exercise in knowledge sharing and A side effect of such nonsense can bementorship, and a way for experienced found in the job market. HR managers,colleagues to work with new developers playing to the stereotype, advertise forto help transfer knowledge about design ‘JavaScript Ninjas’, ‘Ruby Rock stars’ ordecisions, conventions used in the code, ‘Python Superheroes’.and other business-related knowledge. “ WRITING CODE ISN’T THE FOCUS – My colleagues and I constantly look for SOLVING FUNDAMENTALsolutions on the internet. This is why open- PROBLEMS TO HELP PEOPLE ISsource software is such a powerful idea:we have access to code, we can see how the code in question was created in response This is toxic stuff, and education is ait works and we can learn from others. It’s to a subtle or hidden requirement. key factor in challenging the damagingessential to develop the confidence to say stereotype of the lone, young, male coding“I’m not sure how to do this – let’s see how I also try to make my code as simple as genius with a Messiah complex. Writingothers have solved a similar problem”. possible. As British computing pioneer Sir software is collaborative and cooperative, Tony Hoare explains, “There are two ways and involves input from a wide variety of Knowing what to look for, assessing of constructing a software design: one people. Diversity is a strength. Writingthe responses from search engines, way is to make it so simple that there are code isn’t the focus – solving fundamentaland evaluating how they apply to your obviously no deficiencies, and the other way problems to help people is.problem – these are important skills that is to make it so complicated that there arerequire practice. Memorising things in no obvious deficiencies. The first method is If you are a teacher, I have a challenge:a programming context is a Sisyphean far more difficult.” ask yourself how many of your lessonstask and a complete waste of time: focus on group-based problem solving.programming languages and libraries Simple code is easier to understand, If ‘coding’ means individual studentsare constantly changing! easier to think about, and easier to progressing through a set of worksheets change. The opposite of simple code or an online course, try to replace it with is called spaghetti code (and makes collaborative group learning. developers curse!). You’re the experts in pedagogy, and Finally, my role is one of many involved I’d love to hear about ways in which you in software development. I work with promote a community of collaborative testers (who break things), platform problem solvers in your own lessons. specialists (who make our digital infrastructure work), UX specialists Best of luck! helloworld.cc 67

FEATUREn Students working hard at this year’s finals in Oxford BEBRAS IS BEAVERING AWAY FURIOUSLY!Chris Roffey explains how to enter your students into the annual Bebras Challenge for computational thinking, and how to use their new teaching resources STORY BY Chris Roffey F ounded in Lithuania in 2004 by worked into accessible tasks, which often successful, so this year the university Professor Valentina Dagienė, the involve beavers (‘Bebras’ is Lithuanian for expanded the event, running it over twoannual Bebras Challenge aims to enthuse beaver)! Last November more than 1.6 weekends instead of one, with twice theschool students from around the world in million students from over 40 countries number of students invited.the fields of computer science, problem took part.solving and computational thinking. Bebras is absolutely free for schools andClassic problems, of a kind that computer UK Bebras is a relative newcomer to students. If we were to charge, schoolsscientists regularly have to solve, are re- this community, but it has been growing might only enter their top sets, and this rapidly. In 2013 we ran a pilot with 21,000 would undermine one of our main aims –UK BEBRAS 6-8 students. In 2014 the Raspberry Pi alerting talented students to an importantAGE GROUPS 8 - 10 Foundation and ARM generously sponsored skill they may possess. We want schools to 10 - 12 us, enabling us to offer this opportunity to enter, if at all possible, all of their students. Kits 12 - 14 all students in the UK free of charge. In the A student who has, for example, a specific Castors 14 - 16 same year, Oxford University became the learning difficulty, but is a great problem- Juniors 16 - 18 National Organising Body for UK Bebras. solver, might be discovered and celebrated, Intermediates In October last year, Google took over and exciting new opportunities opened up Seniors the sponsorship, asking us to produce an for him or her. Elite ambitious plan for expansion, and then funded us to follow it. Traditionally, when the UK has wanted to find talented problem-solvers, we put a In 2015, Oxford University ran a finals difficult crossword in a national newspaper. weekend for the 10-18 age groups, hosted The Bebras Challenge is a far sharper tool, by Hertford College and the Computer and is already unearthing some amazingly Science Department. This was immensely talented students. At the finals in Oxford68 helloworld.cc

Why enter your students? ANSWER: OKIWILLBETHERE!AN EXAMPLE There are many reasons why schools might In another collaboration, the UK andBEBRAS PROBLEM want to take part . Germany are working on the development of a Bebras App for students, to run on Agents Boris and Bertha communicate using Bebras can enthuse students in mobile devices, and available by the end secret messages. computational thinking and computer of September. The UK is also developing science. The tasks provide a baseline test a Schools’ Platform, which will enable Boris wants to send Bertha the that is relevant, targeted at computer registered School Coordinators to register secret message: science, and can be used to show progress. teachers at their schools, as well as registering their students. The teachers MEETBILLYBEAVERAT6 The tasks are easy to administer. There will then be able to build their own self- He writes each character in a 4 column is a simple upload procedure for students’ marking challenges for their classes, grid from left to right and row by row details, a two-week window when students made up from as many or as few of our starting from the top. can take part during their normal computing archived tasks as they wish. Selecting He puts an X in any unused spaces. lessons, and there is no software to install. suitable tasks should be easy, as all our The result is shown below: We do the marking and provide detailed tasks are now being categorised with a results, certificates and an answer book with two-dimensional system based on the Then he creates the secret message by full explanations and details on how the computational thinking skills they require, reading the characters from top to bottom tasks relate to computer science – all for free, and the relevant computer science and column by column starting from the left: and within two weeks of the challenge. domains, as well as important key words. This new facility will be continuously MBYVTEIBE6ELERXTLAAX The competition takes place in November, improved, with more of our past catalogue Bertha then uses the same method to and can provide a focus for a teaching unit added as time goes by. reply to Boris. The secret message she sends in computational thinking in the autumn term. him is: LINKS OIERKLTEILH!WBEX It’s not just for two weeks! Bebras UK: bebras.uk QUESTION : The problems set are all archived for schools to use at any time during the year. Last year TCS Oxford Computing Challenge: tcsocc.uk What message does Bertha send back? 81,000 UK students took part during the Bebras Challenge itself, but the resourcesover the last two years, we have been were used by more than 100,000 studentsastounded by the number, and difficulty, during the rest of the year! You can easilyof problems some of the UK’s talented have a look at the interactive, auto-markedstudents can solve, accurately and quickly. challenges by visiting bebras.uk and clickingThis experience has been inspiring, and on the Past Challenges button halfwaymakes us even more determined to make down the page.Bebras available to as many young peopleas possible. Future developments In March this year, thanks to the kind sponsorship of Tata Consultancy Services, we ran a pilot follow-on Challenge for the top ten percent of achievers in the UK Bebras Challenge. Again, these resources have been archived for schools to use with all their students throughout the year. A number of other countries in the Bebras community are thinking along the same lines, and have expressed an interest in collaborating with us. Working together, we plan to ensure that, over future years, the quality of tasks remains of a consistent, high standard. It is hoped that, when we are fully established, other organisations that run challenges or competitions might approach us about inviting some of their students to take part in this new challenge, so that other routes of entry become available. To find out more, visit tcsocc.uk. helloworld.cc 69

FEATURE GOTO FOR EDUCATION?The GOTO statement is outdated, and usually represents poor programming practice, but does this mean there is no educational value in it? I think not! STORY BY Paul Powelln Figure 1: a GOTO can be used to make loops like this do/while loop I n many subjects, we teach students A missing link basic ideas, approximations and, Start on occasion, outright lies. We do it to The first great thing about the GOTO output: What help students to grasp fundamental command is that it is easy to understand. is your name? concepts before moving on to a subtler The second is that it can be used to explain understanding in later years. This is what loops and other items of structured input: name often based on historical developments programming actually are (see figure 1). in understanding. For example, we teach They provide an easy bridge from simple say \"hello\" Yes that matter is made up of atoms which sequences to branching and iterating. Whenfollowed by name are indivisible. Students then learn about debugging, students can follow the code and subatomic structure, and that under say ‘It shouldn’t go to here – it needs to go to output: Shall specific circumstances one element can there instead’. I say it again? become another. Later they learn that protons, electrons and neutrons are made Of course, in time, students will leave input: answer up of quarks, and so it goes on. behind the GOTO. As they advance onto In science, we also show the scientific structured programming and object is the aswer method by contrasting Priestley’s orientation they will see it as quaint and \"yes\"? phlogiston with Lavoisier’s oxygen, or simplistic, like counting on their fingers or geocentric theory with heliocentric theory. rhymes that tell them how to form letters. No Of course, any professional scientist would be ridiculed if they believed in atoms Caveat Stop that were indivisible, an orbiting sun or phlogiston. That doesn’t mean that the I’m writing the schemes of work forn Figure 2: the same program as a flowchart – ideas don’t have educational value. introducing text-based programming next note the identical structure year, based on my thoughts here. I’ve not run What is a GOTO? a class through it yet. I’ll write another article to let you know how it went! A GOTO allows you to jump to another line in your code that you have labelled TRY IT OUT (or a line number if your language supports these). This works like a flowchart: you Some modern languages (notably Python are drawing an arrow to the box you want and Java) do not use GOTO. BASIC 256 is an to go to next. It is conceptually simpler open-source project designed for education. than a loop, which requires us to analyse It has some useful features, such as the problem at a higher level before embedded text-to-speech, easy graphics, implementing the loop. It also means that music, and loading images. Download for we can code directly from a flow chart, Windows, Mac or Linux at basic256.org. rather than reverse engineering a flow chart to contain the loops we need. Before there were loops in code, we used GOTO to repeat sections. Before there were statement blocks, we used GOTO to skip or run sections of code. Today, when we use our modern programming tools, they get translated back into jumps in machine code.70 helloworld.cc

OPINION RICHMOND MATHEWSON TEACHER BACK TO BASICRichmond Mathewson explains why he is teaching BBC BASIC with BBC Microcomputers in 2017 ver the last few years I have run summer courses barrier and no distractions. This forces a ‘let’s do some programming’ message, rather than the ‘let’s play games’O where I have introduced children aged 8 to 16 messages from computers with graphical user interfaces. to LiveCode (livecode.org), as a way to get them They do not work at the speed of light, and they have aprogramming quickly. direct connection to the user. Nothing is hidden behind icons While LiveCode allows beginners to rapidly produce or inside colourful folders.simple programs, it has certain drawbacks, including alack of transferable skills to take to other programming There’s no copy and paste option, so children really havelanguages and environments. Educators attempting to to pay attention to what they are doing, unless they want tointroduce children to programming with block-based keep retyping lines of code.approaches such as Scratch often encounter the sameproblem: children become extremely adept at producing In four or five lines of code, I can illustrate the buildingprograms with Scratch, and Scratch alone. blocks of coding in an easily digestible fashion, rather than having code hidden behind blocks or objects.Formative experiences Boosting confidenceI began to reflect on my own history in computerprogramming, which started with punching holes in Hollerith With BBC BASIC, my students rapidly completed newcards, and then progressed to FORTRAN IV. Programming programming tasks. They even began to explore BBC BASICreally hooked me when my school obtained a Research at home, expanding their skills and experience beyond ourMachines 380-Z, and at university I spent a year delving into classroom projects. Many of the children attending the classesPascal. In 1989, I bought a BBC Master Compact and spent had previously used Scratch. Those children have all said thatall my free time learning BBC BASIC, mainly because I was while Scratch is fun, it is like a toy compared with what wenot interested in the games that came with the computer, and could do with the BBC computers.because I wanted the computer to do something for me. When we moved on to LiveCode after using BBC BASIC,A strong foundation the students seemed more confident. I noticed that none of them came up with the usual questions, along the lines ofI use LiveCode to develop in-house programs for content “Why doesn’t this button do something?”delivery in my EFL school in Bulgaria. I began to suspect that,while it could be used to teach programming, it should be The children have just finished duplicating all thepreceded by a programming language and environment that programming they did in BASIC in LiveCode, so they aredoes not conceal the building blocks of programming behind aware of the similarities and the differences between the twoobjects such as buttons and fields. languages. Next week we are going to start producing simple animation with LiveCode. It made me very happy to hear two BBC BASIC filled this slot for a number of reasons. children ask, “Can we try that in BASIC as well?” The answerExcellent, free BBC Micro emulators are available for Mac OS, was, of course, “Yes, why not?”Windows, Linux and Android. This means that children canprogram using BBC BASIC at home, as well as at school. Richmond Mathewson has worked at all levels of education from primary to university, and now runs his own The BBC Micro does not have a GUI. As soon as it isswitched on it is ready for programming – there is no entry English language and programming school in Bulgaria. helloworld.cc 71

FEATURE YEAR 9: FROM ZERO TO MAKER IN SIX WEEKS Sue Gray took a hands-off approach with her teaching so her students could have a hands-on approach to their learning STORY BY Sue Gray F or the last half term my Year Save Us projects (techwillsaveus.com). TECHNOLOGY 9 students have been playing I created a list of projects that included the WILL SAVE USaround with micro:bits. We began with ingredients for each make and put this intoa couple of starter lessons, and I put our Google Classroom. Students were then Technology Will Save Us is a small UKtogether a Getting Started presentation told to find a project! company producing simple ‘make it yourself’to introduce them to the possibilities kits and online tools to lower the barrierof the equipment. They learned how to At first, the students were reluctant facing children and teachers who want tomake a simple light display, display and to branch out on their own – they were get started with the physical side of digitalscroll text, and edit the Fortune Teller so used to having me stand at the front making. Their micro:bit projects are availablegame from the BBC website. of the class and tell them what to do, online at helloworld.cc/2v2HQEX. and to all be doing the same thing.Pick your own project They were uncomfortable with working Taking steps independently, so I encouraged themAfter that it was hands off: no more to try out the Bourne To Code projects Then we had a lesson where everyoneteaching – just exploring, playing, (helloworld.cc/2v2TwaR) at first. I needed discovered the step counter. Elastic bandsdeveloping … and making. I’d made sure a Post-it note stuck on my forehead that were in high demand this time. I quicklythat I had most of the bits and pieces said, ‘Read the instructions!’ They were not realised that the potential for chaos mightneeded to create a lot of the Tech Will keen on working without my guidance! outweigh the learning objectives as students asked if they could go off around Getting stuck in the school, “… to count how many steps it takes to get to Science.” We made a list of After four lessons, they got the idea. Yay! I should have been drinking tea with my feet up. Instead, I was in constant demand to delve into my cupboard and bring out Sugru, “ WE HAD A LESSON WHERE IT SEEMED THE WHOLE CLASS WANTED TO MAKE THE POCKET PET n On-screen coding and off-screen making with the micro:bit tin foil, copper tape, card, etc. They loved the routes and destinations, and students were72 helloworld.cc freedom and creativity, the teamwork and, told to work in pairs as they gathered data finally, the satisfaction of making something. about the number of steps each one took to get from A to B. The data was then put into We had a lesson where it seemed the spreadsheets and they used the results to whole class wanted to make the pocket pet. I calculate averages. It was still chaotic, but at ran out of Sugru by the time two classes had least there was some structure! completed this project! I also discovered that Sugru is not reusable. I think I’ll encourage Everyone had a great time exploring the the micro pet project in future – it’s cheaper micro:bit, and I know that if I said we were and less messy! We also found that Sugru going to revisit this topic, all the students sticks like crazy, and I now have at least two would be up for it – and they would even micro:bits that may or may not work again. love to make more spreadsheets!

FEATURETEACHING SCRATCHJR TO YEAR 1Matthew Wimpenny-Smith explains how to use ScratchJr and tablet computers to get five- to seven-year-olds started with coding STORY BY Matthew Wimpenny-Smith I am sure many of you, like me, have After a couple of sessions of ‘tinker FURTHER been using Scratch with seven- time’, I started teaching the pupils about INFORMATIONto eleven-year-olds for many years. the different blocks and how they workThe same team that brought us Scratch together, using AirPlay to link my iPad to The ScratchJr app is free on iTunes, Googlehas also produced an iPad app called the classroom screen. Starting with the blue Play and Chrome OS. I used shared tablets,ScratchJr, which is designed to teach five- motion blocks and the green flag, I asked so it was important that each pupil returnedto seven-year-olds to code. It’s available the pupils to predict what movements the to the same device for every lesson, infor Android tablets and Chromebooks, too. sprite would make. Very quickly the class order to access their locally stored projects. was ready for their first challenge: to make Projects can be named by tapping the yellowTeaching with ScratchJr the cat dance using any of the blue motion tag in the top right-hand corner of the app. blocks. Towards the end of the lesson I Within that screen, users can also shareI currently teach computing to two Year 1 selected a few to play on the whiteboard. their projects using email or AirDrop.classes for half an hour every week, andthe ScratchJr app has given us a perfect Structured activitiesintroduction to coding. Luckily, I have enoughiPads that each child can have their own, but During the next eight lessons, I gave theI am sure pupils could easily work in pairs. classes structured coding activities toI started by giving the pupils ‘tinker time’ – follow, which involved using blocks fromsimply letting them play with the app while all the different categories. This helpedI observed what they could do. Very quickly, the pupils to really grasp how the differentI could see the pupils working out that blocks work together to make more andthey could make the sprites move or act byconnecting the program blocks together. “ THEY COULD MAKE THE SPRITES MOVE OR ACT BY CONNECTINGn Can you tell the story of the three little pigs, make a virtual fish tank, THE PROGRAM BLOCKS TOGETHER or even code a cat to play basketball? You can with ScratchJr! more complex code. Many of my ideas Developing their own code for these activities came from simplifying code that I had created using Scratch. I also Once the pupils had a good understanding found a number of activities on the ScratchJr of the coding blocks, they were able to website, scratchjr.org. At the end of each move on to their own projects. During lesson I chose code from different pupils to this term, the topic for Year 1 was show to the class. Houses and Homes, so I asked them to make an animation to retell the story of the three little pigs and their different houses. In another lesson I showed them a fish tank, and the challenge was to make their own fish tank with all the fish swimming around. My experiences in these lessons have shown that ScratchJr provides an excellent introduction to coding, which has given my pupils a good foundation for moving onto Scratch. helloworld.cc 73

FEATURE SMELLY CODEDo we pass on best practice when we teach block-based programming to primary school pupils? STORY BY Jane Waite W hen we teach literacy in primary researcher looked at more than a million Variables, broadcast messages, school, we use high-quality texts programs, while another checked 250,000 backgrounds, and costumes need renamingto model the features we would like our (see box for links). One of the research too. Just calling a variable ‘a’, or ‘variable’pupils to learn. In poetry, we demonstrate teams concluded that some of the things makes our code harder to read and change.alliteration and onomatopoeia through the we want children to learn and make Children (and professional programmers)work of popular children’s poets. progress in for programming were lacking work on a program over several weeks, or When teaching programming, do we from the code sampled. take an old program as the basis to startdo the same? Do we know who the good writing a new one, so this matters a lot.programmers are in the Scratch community? Don’t worry – the researchers did notAre we even sure what good quality check all this code by hand! They have Superfluous stuffprograms look like? programs that do their checking for them. There is also the fabulous Dr. Scratch that Another bad smell is caused by redundantWhat is smelly code? you can use to analyse your own code. stuff: code blocks, variables, sprites, and messages left lying around, which don’t doSmelly code is code that displays some Names matter anything. If children added a casual full stopfeature that indicates an underlying problem or a random word into a sentence, we mightwith the program. The program may do One example of a bad smell is a sprite question it. Sometimes we do pull codesome things correctly, but good code that has not been renamed, and still uses apart as we are debugging, and leave codeshould be high quality and readable, too! its default name. Why is this important? fragments at the side as we work out whatUnreadable or convoluted code is much Renaming a sprite might make our code the problem is, but when we save and sharemore likely to contain subtle bugs, hiding in easier to read, and indicates that we are our code, we should tidy it up.those whiffy places. thinking about what our program is doing. So, if the Scratch Cat is the narrator for The researchers found other bad smells Several researchers have investigated an animation, rename it ‘Narrator’. If the too, such as the same code being usedprograms from the Scratch community, Elephant asks questions in a quiz, call it for different sprites, and within the sameand concluded that most are smelly! One ‘Quiz Master’. sprite. Some repeated code for a single sprite can be implemented more elegantly, for example by using a loop. We can reduce repeated code by using clones, or by controlling the program using a main thread of commands, and synchronising activity through broadcasts and other techniques. One of the smelliest aspects found by both researchers was very long scripts. Long scripts can be very hard to understand and debug, and often imply a lack of decomposition and design.n Which is the easiest version to understand and debug? (There is a bug in one of the scripts.) Make your own blocks Thanks to Barefoot Computing for the original project. Code remixed by Jane Waite. An aspect of Scratch that was missing from the sampled scripts was custom blocks. These purple blocks can be programmed to do a particular job for a sprite. Once a custom block is made, we can re-use it over and over again, and if it needs changing, we only need to change it in one place. Using custom blocks demonstrates that we are breaking up our solutions into bite-74 helloworld.cc

n X XXXXXXXX n Predict what this seaside script will draw. Code written FURTHER READING by Jane Waite, inspired by the fantastic ScratchMaths Dr. Scratch: drscratch.org ScratchMaths: helloworld.cc/2tYsNfC Find your CAS regional centre: helloworld.cc/2tZhiEt Find your CAS Hub: helloworld.cc/2t4ljCY BCS Certificate in Computer Science Teaching: helloworld.cc/2tZpq7V Scratch research: helloworld.cc/2sOnlw2 helloworld.cc/2tUFes7 helloworld.cc/2tZfxah helloworld.cc/2uHZU4Tsized chunks. Learning to spot potential thinking carefully about why and how we In your scheme of work, does the examplecustom blocks and work with them is a are looping. Someone reading the code can code you use reset sprites to a start position?very important habit, which gets children see clearly how the loop will end. Do you explicitly teach resetting variables toready to learn more about procedures and a start value? Are there targeted tasks andfunctions in text-based languages. Do you naturally model code using guided exploration activities in your planning ‘forever’ commands, rather than ‘repeat which reveal the importance of initialisation?Forever or until? until’, or ‘repeat x times’? Does evolving Whatever form of scaffolding you use to rather than designing our programs teach programming, is initialisation covered?Another feature missing from the code was contribute to lots of ‘forevers’ and not manyconditional repeats, or conditional loops. ‘untils’? The use of forever loops is seen by So what, and what next?These commands allow us to control how a many experts as a bad habit.repeat ends based on another aspect of the Does bad-smelling code matter? There isprogram: for example, repeating an action Get ready before you go plenty of research that says it does. If youuntil the space bar is clicked, or repeating give novice programmers smelly code, theysomething four times. Conditional repeats Something else that is often missing from will either have a poorer understanding ofare important, as they show that we are scripts is resetting stuff: setting variables what the code does, or they find it more to a start value, resetting sprites to a start difficult to modify the code, depending onn Sniff out the smells. Initialise, tidy, reorder, and position, clearing up any shapes we have the type of whiff! use a repeat. Code snippet written by Jane Waite. drawn with the pen, etc. This is sometimes called initialisation, and it is an important I don’t have all the answers, but there is idea. If you do not include initialisation in emerging research in this area. I think that as your Scratch code, and you run it twice a teaching community, we are ready to talk in the same sitting, the values and states about what makes good-quality block-based from end of your last run will become your programs, and to look at what kinds of habits subsequent start points. This can be very we are exemplifying in our teaching. confusing, and you can’t be sure what your program will do. How about investing in your CPD? Ask your local CAS Regional Centre or Creating programs that always do the CAS Master Teacher about a Primary same thing, whenever you run them, is Programming course, attend a CAS hub a very good habit. In fact, some code meeting, study for the BCS Certificate in needs initialising to work at all. Learning Computer Science Teaching (primary or about initialisation is an important part secondary), and find out more so you can of preparing children for the transition to help your pupils to write lovely, sweet- text-based programming. smelling code. helloworld.cc 75

FEATURE CYBERSECURITY: LEARNING THROUGH HACKINGHacking can provide students with the context to understand how computers work, and teach them to write better code STORY BY David Hill I ’m guessing that most people’s so it could receive shortwave stations. From This hacking mindset makes you a knowledge of ‘hacking’ comes from this, it was a short jump to hacking my better computer scientist. A malevolentmovies and TV. As a result, when people ZX81 games to slow down the pace of the hacker only has to find one weakness intalk about hacking, it often has negative 3D monsters. a computer system. If you want to protectconnotations. At its heart, hacking is about a computer system, or the informationunderstanding how something works. Yes, What does hacking teach us? in it, then you need to try and think of allhacking can be misused, but we teach the ways in which the system could bestudents many things that could also How can hacking help us to learn? compromised. When you are writing abe misused. We don’t think twice about On a basic level, hacking provides an program, you need to understand howteaching young people to write, drive, or understanding of a range of cybersecurity each command works, and how each partunderstand science – just think of all the issues, and leaves the hacker better able of the program interacts with all the otherdangerous things you could create with to protect themselves. In addition, being parts. Is there a way someone could makethat knowledge! able to hack something requires certain the program do something it shouldn’t? I am a hacker myself, and for that I blame skills – problem-solving, logical thinking, Developing these skills helps a student tomy dad. I wanted to know how a radio perseverance, and creativity – skills that move from mimicry to mastery.works, so he gave me an old AM radio and are going to benefit students’ learningwe took it apart. He talked me through and development in many areas, not just Is hacking legal?all the parts inside, and at some point we computing. You need to understand thetalked about shortwave. I liked the idea of rules on which the thing you are hacking Hacking can be illegal. Simply put, underlistening to broadcasts from around the runs. By mastering the rules, you can the Computer Misuse Act, it is illegal toworld, so we took a trip to Tandy, bought find ways to exploit them, allowing you gain unauthorised access to a computerwhat we needed, and hacked the AM radio to push the boundaries of what you system, or the material stored there. It is can create. the ‘unauthorised’ part that is important, and this needs to be made clear before n A Raspberry Pi offers a safe (and legal) way we start taking students on a journey into for students to explore cybersecurity issues cybersecurity. There is a time and place for hacking, ethically and legally – whether this is the police investigating a suspect, or a business trying to recover information from their own computer system. Before running any sessions with our students, to make sure that all our moral compasses are pointing in the right direction, we give them some scenarios to think about. Are there any circumstances under which it would be OK to hack a computer system? Are they technically possible? These scenarios can relate to real- world events, such as the controversy about bypassing an iPhone lock screen. How do the police usually get past a suspect’s password? Answer: they ask them for it.76 helloworld.cc

USEFULWINDOWS TOOLSLinux can handle most things on its own. n S ecurity risk: how many devices in your house or schoolHowever, if you want to use a Windows still use their default usernames and passwords?computer to hack your Raspberry Pis, thisfreeware will be useful:Nmap: allows you to scan an IP and see which ports are openPuTTY: allows you to use Secure SHell and Telnet to access other computersFileZilla: a piece of software that allows you to copy files between computers using FTPRefusal to reveal the password could lead to desktop computer or laptop. These are usually details. When the students have loggeda five-year jail term if the data on the phone running Linux, but with some extra tools in, they find that the account has beeninvolves national security! installed you could use Windows machines. restricted (we’ve changed the root login and file permissions), but they have access to an The Raspberry Pi gives students the If the students are accessing the Pis image file. When they work out how to copyopportunity to explore some aspects over WiFi, the first thing they should do files between computers, this will give themof cybersecurity in a safe and legal is look for the network and try to connect. some encrypted text that conceals a webenvironment. There is very little damage This can lead to a discussion about SSIDs address. It’s not very well encrypted – it justthat can be done, that can’t be rectified by and encryption. The aim here is to think uses a simple Caesar cipher.re-imaging the SD card. Just remember to about what makes a secure password, astell the students before starting the exercise the password we use is one of the top five This takes them back to the web browser,that you are giving them permission to most common passwords. Not sure what where they find a couple more challenges.access the material on the Raspberry Pis. the most common ones are? A quick Google The password is handled through server-Setting up Raspberry Pis to hack “ REMEMBER TO TELL THE STUDENTS THAT YOU ARE GIVING THEMThere are plenty of configurations you could PERMISSION TO ACCESS THE MATERIALuse to provide a target for hacking. You willlearn a lot by creating a hackable Raspberry search will give you the top 10,000 or more. side code in a language they’re not familiarPi for yourself, which is why I will not be Ask the students to think about how a list with, to show the commonalities andproviding detailed instructions. You will like this could be produced. demonstrate why some things should bealso find that your setup evolves over time, handled on the server. Finally, they find aas students find different approaches to When they have access to the network, message board. Using some SQL injectionsolving the problem. You could present your and have located an IP address, they can use to bypass the login box, this will allow theirhacking challenge as a single exercise, or Nmap to see that ports 22, 23 and 80 are message to appear on the Raspberry Pi.use each step as a chance to introduce an open. Looking at the website gives nothingarea for discussion and learning. away (it is a simple holding page) and Telnet Completing this exercise leaves is just broadcasting Blinkenlights’ ASCII the students with a great sense of Our basic setup consists of a number of Star Wars animation. Connecting via SSH accomplishment, as well as a betterRaspberry Pis connected to a hub, which is is more rewarding, as they will be asked for understanding of cybersecurity. They’vethen connected to the local network, or to a a username and password. This gives us a had the chance to learn new skills, and toWiFi router. Each Pi has an LCD HAT that chance to talk about default usernames and discuss the moral and legal implicationsdisplays the IP address given to it when it passwords. Think about all those webcams, of their actions. As Alexander McQueenis switched on. Each Pi runs a Telnet server printers, routers, etc. where people have said, “You’ve got to know the rulesand Web/MySQL Server. never bothered to change the default login to break them”. Each student is assigned a specific Pi, andchallenged to replace what is displayed onthe HAT with a message of their choice. Theythen try to access their assigned Pi from a helloworld.cc 77

CONVERSATION 10 TIPS 10 TIPS SUPPORTING INDEPENDENT LEARNERS Ideas for keeping your independent students motivated and engaged STORY BY Rik Cross 1 Start small environment in which learners can start to 2 Provide motivation When transitioning learners gain some autonomy. An example of this Learners will be more likely toto more independent styles of learning, is the Code Club ChatBot talking robot see the benefit in what they are learningstart by giving them the freedom to project, in which learners are encouraged if they are given the opportunity to workmake decisions in the context of more to make their own choices about their on a project that interests them personally.structured activities. Projects that provide preferred robot character, the questions The amount of freedom you are able toopportunities to personalise and extend it asks, and the way in which it responds give learners will depend on the context,on a basic project provide a structured to replies (helloworld.cc/2uP4ot0). but being invested in the success of a project will help learners to stay motivated, and to have the determination to overcome any challenges that they may face. This doesn’t have to mean giving learners the freedom to choose anything they like. Instead, you could give learners a choice of open-ended project ideas, for a range of interest areas. 3 Manage expectations Giving learners the freedom to decide on their own project ideas can result in incredibly complicated project plans, often before learners are ready to tackle a large project. Rather than encouraging learners to choose something else to work on, help them to distil their ideas – discard78 helloworld.cc

8 Test regularly Debugging is made much more straightforward when a project is tested regularly. Testing each new project feature means that learners are more likely to pinpoint any problems with that feature. Encourage learners to follow a short, iterative development cycle, testing each step as they go. Learners may even find that their projects work in unexpected ways if they allow others to test their work.the more difficult or unnecessary aspects 6 Create a 9 Model failureof the project and allow them to focus on collaborative Being ambitious and taking riskssomething much more manageable. This environment will inevitably result in times when thingswill reduce frustration and help ensure that don’t go to plan. Digital making can oftentheir project is seen through to the end. Working independently doesn’t mean that follow an unpredictable path, and learners learners have to work alone, and there will benefit hugely from being exposed to4 Develop are many ways in which your learners can this process. When supporting learners, try organisation support and learn from each other. Learners not to gloss over mistakes that you make may have a problem that another member yourself, or times when you aren’t able to fixEncourage your learners to take of the group has experienced, meaning a problem first time. Instead, be transparentresponsibility for as much of the digital that they are well-placed to offer support. about the process, modelling the resiliencemaking process as possible. How will Projects can be shared with others, either needed to work through these setbacks.they manage their time? What are within a group or more widely throughtheir priorities? Will they need time to online communities. Sharing projects 10 Celebrate successundertake some research before starting with others allows them to be seen by an At the end of this process,work on their project? How and when will authentic audience, which can be incredibly learners will have created something uniquethey review their progress? It may even motivating. This audience can also offer that they will rightly be proud of, and wanthelp to agree on a process as a group, valuable feedback, and often learners will to show off to others. Make time at theso that learners have a framework for pay more attention to detail, and are more end of a project for learners to share theirorganising themselves. willing to fix bugs, if they know their work creations, and if possible to be reflective will be seen by others. and share their experience with their peers – even if their project isn’t finished. This 5 Provide resources 7 Embrace is a great time to be positive and share Working with independent debugging successes, but it could also be valuablelearners means that your role as educator to allow learners to talk about challengesbecomes that of facilitator. You are no longer One of the most difficult things about they faced, and how they tackled them.the expert to whom learners immediately fostering independence is supporting Your learners will be exposed to a range ofturn when they have a question. Be explicit learners when they hit a problem. Debugging interesting ideas that may provide a basisabout the places that learners can go to is often where the most valuable learning for their next digital making project!find answers to their questions: links to takes place, as it provides an opportunity todocumentation, other example projects, deepen understanding and test assumptions. Rik Crossonline support forums. This works well It’s important that learners take control of Rik Cross is a formerwhen you’re asked a question to which you debugging their own projects, so that they secondary teacher,don’t know the answer yourself, as you’re can support themselves later on in their responsible for developing the Raspberry Pithen able to model how you’d go about digital making journey. Ask questions to point curriculum. Rik enjoys learning new skills andtrying to find the answer. It also serves to learners in the right direction. Encourage is currently learning to brew beer.make the point that the educator isn’t an them to take a step back and think logicallyoracle who knows everything! through a problem, decode error messages, and seek peer support. helloworld.cc 79

CONVERSATION BLUFFER’S GUIDE BLUFFER’S GUIDE TO NEA TASKSThe new Computer Science GCSEs in England and Wales all have an assessed component requiring students to spend 20 hours on a practical programming project. Alan O’Donohoe, leader of exa.foundation, looks at the implications for teachersWhat is an NEA? What will the students be assessed on?NEA stands for Non-Examination Assessment. This requirement Students are required to solve a sequence of programmingwas introduced to replace previous coursework components. It is a challenges. These typically include a requirement to analysepractical component that is formally assessed as part of the GCSE, each problem, design algorithms, then develop, test andwith a weighting of 20 percent of the final GCSE grade. evaluate their solutions to the challenges. Teachers will need to familiarise themselves with the specific requirements ofWhy do the NEAs exist? the relevant specification.A large amount of Computer Science involves practical problem Lack of familiarity with the requirements has, for example, led tosolving. While the new GCSEs include an exam that tests students’ some teachers stressing about two-dimensional arrays when theknowledge and understanding of programming, computational requirement of their specification is only for one-dimensional arrays,thinking, and algorithms, the NEAs allow students to submit some or worrying about teaching SQL when the requirements are onlycoded solutions to problems. There have been some historical to write to and read from a file. While there is absolutely nothingproblems with coursework, and the NEAs are intended to provide wrong with students using these methods, the tasks have beena more robust mechanism to ensure a level playing field for all designed to require only the skills listed for the NEA.schools. As the NEAs are relatively new, there are many proceduralchanges to assessment to implement. Schools may take a while to When are students expected to complete this?adjust to the new processes. Students are allowed 20 hours of supervised time to completePLEASE NOTE: the NEA. The teachers can choose when to start and end the 20 hours, and even stop before the 20 hours if students have finished. The author neither works for, nor represents, any examination bodies. However, the NEA tasks are not released until 1 September, and As such, the information in this guide is intended only as practical students’ completed work must be marked and sent for moderation advice for a wide audience, not as an official guide to one GCSE NEA. Since examination bodies vary in their rules for the NEA, teachers by 31 March. [ ! ] should familiarise themselves with the specific rules governing their choice of qualification. Schools can choose when to schedule the NEA sessions within that window, but NEAs can only be attempted during the terminalKEY: year of assessment, i.e. the same year as the exam. There is no requirement for schools to log every lesson allocated for the NEAs,[!] Indicates areas with a significant degree of differ- but it would be sensible to do so. Teachers should plan ahead to ence between different exam awarding bodies. Please consider what to do with students who complete their projects in check the details for the body that you are using. less than the allocated time. If a student ‘gives up’ after just three hours, this could cause problems for the remaining 17 hours. It would be wise to start the NEA as soon in the Autumn Term as possible, and complete it as late as possible. This would allow teachers the flexibility to plan for refresher lessons during the 20 hours, and allow for other unplanned circumstances such as teacher or student absence.80 helloworld.cc

Splitting the 20 hours up over an extended period would also go n Teachers are free to run after-school programming sessions as long as they are not teaching to the NEA taska long way towards keeping students’ motivation levels high. Theirattention is likely to be sharper in the non-NEA sessions where Should teachers stop teaching programming as of 1 September?teachers provide refresher programming lessons, since the studentscould then apply this to their NEA solutions. No. However, it would be best to ensure that students have been properly prepared before then, as teaching to the tasks isHow can teachers best prepare their students strictly prohibited. If the NEA sessions are scheduled to be spreadfor this beforehand? out across the autumn and spring terms, this would allow more opportunities for refresher lessons.Throughout Year 10, plan for lots of practice with lots of steppedpaired-programming challenges designed to slowly build confidence Can teachers offer after-school programming sessions?and competence. While it’s tempting for teachers to focus purelyon teaching systems theory in Year 10, doing so would seriously There is absolutely no problem with this as long as teachers providedisadvantage students with the NEAs. Some teachers choose to split general support and advice with the programming requirements,their timetabled lessons 50/50 between systems and programming; and do not teach to the NEA. After 1 September, students areI chose a 20/80 split, with more time allocated for the programming prevented from bringing in any electronic, written or printedelement. In Year 11, a refresher course at the beginning of the resources from this additional support to their NEA sessions.autumn term will put students back onto a firm footing beforestarting the NEAs. What if teachers spot something after the NEAs are live that they omitted from their teaching? It would be wise to introduce students to the restrictions imposedby the NEA as early as possible in Year 10, so that it’s less of a Again, as long as any teaching post 1 September does not includeshock for them when they start the NEA. This would allow any support or solutions to the live NEAs, there is absolutely no problemResource Banks to be developed throughout Year 10. with this. For example, if after the NEAs are published the teacher feels that their students need to use a particular data structure thatn Students should be prepared before the NEA begins - they have not taught, the teacher could plan a general lesson on teachers cannot give specific help or feedback during the NEA task data structures and include the required structure among several that are not required. However, the teacher should be very careful not to drop hints or suggest which data structure to use as this is classed as providing solutions. What if the teacher has a very limited amount of time available to prepare students? In much the same way as learning any other new skill (driving a car, drawing or learning the violin), it is possible to learn certain things in a reduced amount of time. However, to really learn problem solving, algorithms, computational thinking, and programming to a level sufficient for the NEAs takes hours and hours of repetitive practice. Anything short of this is unlikely to prepare students properly. In my experience, teachers and students who have not had sufficient preparation tend to look for shortcuts out of desperation, e.g. searching for solutions from others, or looking for the answers to an important test or exam. helloworld.cc 81

CONVERSATION BLUFFER’S GUIDECan teachers find solutions to the live NEAs? n The resource bank can contain examples of the students’ own solutions to problems set during Year 10While this may be possible, it is a very dangerous path to go downand I would caution teachers against it. Teachers are prohibited from students can be provided with a pre-prepared resource bank.providing their students with solutions to the live NEAs. If the teacher After 31 August, nothing may be added to the resource bank,subsequently discovers what they consider is a better solution to a but resources may be removed. Eduqas/WJEC and Edexcel allowproblem than the one their students would consider using, it would students to be provided with examples of syntax, but no codedbe very tempting to show these solutions to the students. solutions or examples of NEAs. For AQA, students are allowed full access to the internet during the NEA. Personally, I think that this is It is worth stating that there can be many different approaches a distraction – I think that students should be prepared before theto solving NEA-type problems. Once you have seen one solution NEAs. If a student needs to search for help during an NEA, it showsit’s impossible to ‘un-see’ it, and hard to develop any alternative poor preparation.solutions. My advice would be to avoid looking at solutions to NEAs,and caution students against it as well. Also, some solutions sharedin the past have contained errors. If you learn from these or sharethem with your students, you’re not just committing malpractice,but also proliferating the errors.How can teachers support students during the NEAs?In the actual NEA sessions, support from teachers is strictlylimited. Outside the NEA sessions, teachers can give genericadvice and support, providing it does not refer to the NEA tasksor include solutions. Students may also do their own researchoutside the NEA sessions, but most exam boards preventstudents from bringing evidence of this research into the NEAsessions – students may only use what they can remember.Teachers might decide to plan some non-NEA sessions during the20-hour period for refresher lessons, e.g. file-handling practice,data structures, etc.THROUGHOUT YEAR 10, PLAN FOR LOTS OF PRACTICE WITHLOTS OF STEPPED PAIRED-PROGRAMMING CHALLENGESDESIGNED TO SLOWLY BUILD CONFIDENCE AND COMPETENCEIf a student asks how to do something ‘generally’, For some teachers, this limit on resources has been a majorbut it relates to the NEA, what should the teacher do? factor in choosing awards. If you’re joining a school where the resource bank has not yet been prepared, you could probablyAs long as the teacher is only giving general advice and support, use one from another school – providing it was prepared beforethere is no problem with this. It would be worth clarifying this withstudents, and explaining that there are strict rules teachers have to 31 August. [ ! ]follow, regardless of student difficulties. How should students reference resources (when allowed)?What feedback can the teacher provide to students? This is quite simple. If students use something in their NEA thatThe simple answer is ‘absolutely none’. There are strict rules limiting they have copied from a resource, they should reference it. If theyteachers from providing feedback to students. It is likely that you’ll already know it, they don’t need to.still want to provide students with some regular assessmentfeedback during the period of the NEA, so why not set a much How will students manage without internet access?lighter parallel project on a completely different theme, unrelated Some exam bodies restrict use of the internet. [ ! ] Havingto the NEA? This would also serve as a useful teaching aid, but itwould need to be carefully planned to avoid similarities to the NEA. conducted controlled assessments with internet access being allowed, I’m not convinced it helps the students during a formalWhat resources are students allowed to use in the NEAs? assessment. It can lead to laziness and the additional risk that solutions may be shared. Not having the internet available for theThis is where the widest variations exist between examining NEAs is a challenge, but it forces a different way of thinking andbodies. For some GCSE qualifications, for example the OCR GCSE, discipline – using the resources you have available to address theno internet access is allowed at all during the NEA sessions, but problems you’re being asked to solve.82 helloworld.cc

To prepare students for working on NEAs without internet access ports and publicly shared drives. It would be a good idea to getand using the resources provided, set some practice tasks before students into the habit of using these before the NEA starts.the NEAs to help them get used to the restrictions and developgood habits. This will also reduce any potential stress for students Who should I ask for advice?working under these controls. Make sure you ask the right people the right kind of questions.What should an OCR resource bank include? While you should always check with exam board representatives and documentation for official rules and regulations, asking otherTeachers following the OCR GCSE course can put resources that teachers as well will help you to find out how they are approachingstudents might find useful into a resource bank, up to 31 August. the NEAs and preparing their students. However, you should beThis includes wall displays, electronic resources, and paper-based careful how much trust you place on advice from others who do notresources, but not templates or writing frames. Where allowed, it represent exam board officials – just like the advice in this article!is recommended that teachers provide students with the followingreference materials: Isn’t this a lot of hassle for just 20 percent of a student’s final grade?n t he students’ own solutions to previous challenges set throughout Year 10 to remind students how they solved previous problems I think it’s dangerous to assume that programming is only worth 20 percent, when computational thinking, algorithms and programmingn s ome carefully selected examples of previous students’ projects combined are worth 60 percent in total. In my teaching, I’ve managed e.g. from previous years to reduce the time required to teach theory down to about 20 percent, allowing about 80 percent of the time for computationaln r eference materials reminding students of the syntax of the thinking, algorithms and programming. The students were least chosen programming language familiar with the latter, so a 50/50 split would not have worked as well. A lot of the theory they can learn themselves without directWhich resources should I buy for my students? supervision from me.Thankfully there is a great variety of free downloadable Securityresources available to support students (where allowed), soin theory you shouldn’t need to buy anything. However, some To maintain integrity, the task instructions and student work arepublishers have released paid content which schools can not allowed to leave the NEA sessions. Students are not allowedpurchase. Teachers who have purchased these have said theyfound them really helpful. Ask other teachers which resources to bring additional resources into the sessions. [ ! ]they’ve found most useful. What if some schools decide not to follow the rules?How should we store the students’ work? Through the Joint Council for Qualifications (JCQ), the examAll student work must be stored securely to prevent students from boards have jointly said they will be conducting an unspecifiedaccessing their work outside the NEA sessions. Some schools have number of centre visits this year, along with statistical analysiscreated exam accounts with restricted access to the internet, USB of the NEA results compared to exam results. Schools can expect a visit at any time, and the exam boards don’t need an excuse to trigger a visit.MORE INFORMATION n B log post on NEAs: exa.im/helpwithnea n T eachers at Outwood Grange Academy Trust have compiled a helpful NEA resource: helloworld.cc/2uHij4m n C hris Roffey has shared these Code Cards: helloworld.cc/2vICM5U n M ark Clarkson’s guide to Python: helloworld.cc/2gQdGzm n O CR Guide to pseudocode and Python: helloworld.cc/2vFa7BO helloworld.cc 83

CONVERSATION FAQsGOT A QUESTION? YOUR QUESTIONS ANSWEREDIf you’ve got a question for ourFAQ team, you can ask us onTwitter via @helloWorld_Eduor using the #HelloWorldhashtag. Alternatively, emailus ([email protected])with ‘Teacher Question’ in thesubject line.Teaching computing and digital making requires a whole new set of skills,and understanding the various options and requirements can be incredibly challenging.Don’t be afraid to put your hand up and ask us anything… Q How do I introduce my Q HOW DO I KNOW WHAT students to coding on MODULES ARE AVAILABLE FOR a mobile phone? PYTHON, AND WHICH I SHOULD BE USING WITH MY STUDENTS? A Although many mobile devices are also functional computers, the reality is that the devices’ software A Like any good Often the easiest way to find a is often locked down to prevent users from running programming language, particular module is to use a search arbitrary code on their mobiles and tablets. This can make Python allows you to import engine. Typing ‘Python package for learning to code on a mobile tricky, and the potential modules into your code, so that making games’, for example, will young coder will have to resort to curated apps from the you do not have to rewrite code provide a fairly long list of modules. vendor’s app store, or in-browser applications. that has already been produced There are plenty of apps out there that can serve as by somebody else. Some As for which modules you introductions to programming. For very young learners modules are provided with every should be guiding your students there is ScratchJr, which is a mobile-friendly and simplified Python install – these are part towards, the short answer is version of Scratch (scratchjr.org, featured on page 73). If you of the standard library. Modules ‘whatever they need to complete want your learners to experience Python, then apps such as such as math, random and time their projects’. If they want to use Pythonista 3 on iOS (helloworld.cc/2sWQdCc) or Pydroid are all included on install. graphics, then PyGame is a good on Android might be suitable (helloworld.cc/2tzukaJ). There are thousands of choice. If they need to produce a There are also Android apps such as DroidScript, modules that have been produced GUI, then maybe guizero is what which can help students to learn JavaScript. As well as by developers, all over the they need. Just be aware that allowing students to build games, utilities and novelty world, that are not included in different modules have different apps, DroidScript also provides full programming access the standard library. Finding the qualities of documentation. The to the features of modern mobile devices, including GPS, correct modules can sometimes better documented a module networking, USB, camera, Bluetooth, accelerometer, text- be a bit of a challenge. is, the easier it will be for your to-speech, and voice recognition. The app provides a students to use. number of downloadable plugins for controlling external devices such as the micro:bit, LEGO Mindstorms and Arduino project boards, which encourage students to explore the world of physical computing (droidscript.org). Although all these apps can help begin a student’s journey into programming, the small screens, software keyboards, and file system restrictions mean that they are only really suitable for very simple scripts and projects. In reality, there is no genuine alternative, as yet, to learning programming on a fully fledged general-purpose computer.84 helloworld.cc

Q HOW DO I TEACH THE Q I’ve been told that PRINCIPLES OF CODING Processing is as easy to TO VERY YOUNG CHILDREN? learn as Python. Which language should I be It is possible for very small to an app where you can set teaching to my students? conditions such as ‘if touching A children to build basic enemy, lose a life’ (griditch.com). A Processing is a programming language and development environment that is geared towardsprograms and begin to understand Scratch is one of the most learning to program in the context of the visual arts. Thethe logic of programming. Many popular applications for teaching Processing language is based on Java, so if you’re onlyschools begin with physical toys kids to code, but many people are familiar with Python, Processing will look completelysuch as BeeBots (or the newer not aware of ScratchJr, which is a different. For example, blocks of code are indicated usingBlueBots), which are robust free tablet-based app aimed at kids curly brackets, and each line of code is terminated with aprogrammable floor robots. aged five to seven years. The app semicolon. If you have any experience with Java or even C,Press the directional buttons to sticks with the familiar drag-and- Processing should feel familiar to you.program the path of the BeeBot, drop blocks interface, but removes The Processing development environment (the programand then set it free to see whether much of the reading requirement where you write and execute code) will also feel very familiarthe program works. Pair kids up by replacing the words on the to educators and students who have used the Arduinoand have them take it in turns to blocks with simple symbols development environment. That’s because the Arduinonavigate to a teddy (bee-bot.us). (scratchjr.org, featured on page team based their software on Processing. Like Arduino,Cubetto is another coding toy, 73). Sticking with tablets, children the Processing development environment is appropriate forMontessori-approved and aimed may also enjoy LightBot, a website beginners; you write your code in the window and simply hitat children of three and older. where you write simple programs the Play button to see it run without much hassle.Coloured blocks are placed into to navigate a robot around a 3D As a learning tool, Processing is very well supported witha control board to guide a robot grid, lighting up squares as you go documentation and examples. Its visual arts focus meansthrough various adventures and (lightbot.com). that students who are interested in being creative with codemaze puzzles (primotoys.com). and want to create things on-screen are given a powerful Those looking for a creative tool to experiment and iterate. And while Processing is Slightly older children might challenge should check out geared towards visual arts, it is full-featured enough toenjoy Griditch, described by Hello Ruby by Linda Liukas take on pretty much any task that you’d expect from aits creator as the programming (featured on page 34), a book programming language.equivalent of an abacus. Place with accompanying unplugged Even though Python isn’t specifically designed for visualsmall electronically scannable exercises ranging from arts, there are Python modules such as turtle, Tkinter,tiles called ‘grits’ on a grid to pose creating art with algorithms Kivy, and guizero that enable you to use Python to drawa problem for a friend, and use to finding out what’s inside on screen. There’s also a new Python mode in Processingmore grits to solve it. Scanning a computer (helloruby.com). which allows you to use Python syntax in the Processingthe tiles links the physical world development environment. Between Processing and Python, you have two very good choices for education. Since there’s a lot of overlap between the two languages, I’d suggest trying out both and sticking with the one that’s closest to the languages you’re already familiar with. helloworld.cc 85

CONVERSATION FAQs Q I’D LIKE TO MOTIVATE Q I have been told to install a Python MY STUDENTS BY package using pip. What is pip and TAKING PART IN how do I use it? COMPETITIONS. CAN YOU TELL ME A Pip is a package manager, In Linux, this would be as simple WHAT’S OUT THERE used to install Python as opening a terminal or command TO INSPIRE THEM? modules onto your computer. prompt and typing: It’s a bit like an app store for A There are plenty of competitions and contests Python modules, but all the > sudo pip3 install tweepy available for your students to participate in, modules are free and open-source. depending on their age and ability. If you wanted to use Twitter from If you want to learn more about For the younger students there are very few regular your Python code, you could pip, especially how to use it on competitions, but they tend to pop up every now and use pip to install a module such Microsoft Windows, have a look again, run by various companies, organisations and as Tweepy. at rpf.io/pipguide. government departments. It’s always worth looking at the CAS competitions page to see whether any new Q I’d like to teach my students about the competitions have been added (helloworld.cc/2u4KCJk). history of programming. Are there any Some of these are featured on page 62. resources you would recommend? The Bebras competition (featured on page 68) runs free annual challenges for students aged 6-18. You can take a A We have a rich history a visit (www.computerhistory.org) look at past challenges, and find out more, at bebras.uk. of computer science and to learn about early programming If you run a CoderDojo, take a look at the annual programming in the UK, much of and computers, and where better CoderDojo Coolest Projects event, where students which is preserved thanks to the than in the heart of Silicon Valley? can showcase the projects they have been working on efforts of volunteers at the National (helloworld.cc/2sWOhtv). The Raspberry Pi Foundation Museum of Computing at Bletchley For some fun background also runs a termly challenge called Pioneers for students Park (famed for its code-breaking information you can access the free who would like to have a go at some digital making operations during the second educational YouTube channel Crash (helloworld.cc/2jqNIjG). Then there is Apps for Good, world war). With lots of hands- Course Computer Science videos which is a very popular general technology competition on activities as well as access to on Alan Turing and early computing (appsforgood.org). some very early computers, such (helloworld.cc/2t5I1Lb). There are For older students there are lots of options. The as Colossus, the museum is well also books, such as The Programmer’s Cyber Security Challenge will really stretch their worth a visit with your students Odyssey by Gareth Eaglesfield abilities, investigating codebreaking and cryptography (www.tnmoc.org/learn). (helloworld.cc/2v3qxAn, reviewed on (helloworld.cc/2t56RLc). Then there are hackathons at The Centre for Computing page 89). To go really old school, the various institutions all over the country, run in conjunction History based in Cambridge, UK, original Usborne programming books with Major League Hacking (MLH), which will really push also has some great learning from the 1980s, including Introduction your students to their limits (mlh.io). resources on their website to Computer Programming and (helloworld.cc/2tZzk9I). In the US, Practical Things to do with aImage: CoderDojo Foundation the Computing History museum in Microcomputer, have been made freely Mountain View is certainly worth available as PDFs by the publisher (helloworld.cc/2u50FqP).86 helloworld.cc

Q IS THERE A SIMPLE WAY TO PRODUCE GUIS IN PYTHON? Image credit: Jason Long A Yes! Lots of schools GUI apps can be written in have begun to just four lines of code. It is Q What is Git and introduce Tkinter for GUI designed to be simple enough how can I use it? programming, but found the to be used by eight- to ten- syntax cumbersome and difficult year-olds, yet powerful enough Git is a type of version control system (VCS). to work with. The guizero for use in complex projects library has been created by (helloworld.cc/2u9Xn6o). A It allows you to store versions of your files as an experienced teacher and removes the unnecessary Remaining with the simplifiedyou write them, and then easily revert back to previous complexity from creating a theme, but with differentversions at any time. GUI. It is simple to install even customisation options, is an without administrator access alternative library called appJar. Git’s real power is that it can be distributed. This means (so you don’t have to pester This removes unnecessarythat rather than one person working on the files, whole the school technicians) and boilerplate code to simplifyteams of people can work on them. As each person makes the most basic of Hello World making GUIs with a variety ofchanges to the files and pushes them to a remote server, attractive layouts (appjar.info).others can pull in those changes. If you want to learn more about using Git and remotesystems such as GitHub, have a look at rpf.io/gitguide.Q I NEED TO TEACH SQL. Q I need to teach programming, but I’m HOW CAN I GET not allowed to install anything on the SUITABLE SOFTWARE school’s network. What do I do? INSTALLED ON MY NETWORK? A First of all, you should try to As they progress, you can switch explain, to both your network them over to an online Python IDE. A Many students are now required to team and your senior management, Trinket.io is an online IDE with plenty understand the basics of SQL database the importance of having access of functionality, and would certainlyqueries, which can lead to some problems when to the appropriate tools. Asking an be sufficient for teaching studentsidentifying which software to use. educator to teach programming how to program up until they start It’s always worth remembering that Microsoft Access without the required software is like their GCSEs.is capable of performing SQL queries, although it has its asking an English teacher to teachdisadvantages. It is a Windows-only program, and more Shakespeare, but not allowing them If you want students to explorecomplicated than it needs to be when all you need to do access to any of the plays’ texts. HTML, CSS and JavaScript, then allis query a couple of linked database tables. If, however, you have no luck with you need is a text editor. Notepad in There are several online tools that you can use this, there are still a few choices Windows is fully capable of writingto help students learn about SQL: sqlfiddle.com available to you. If you teach younger code that can then be run in a browser.is a site that will allow you to build your own tables, students, then online platforms such For debugging purposes, you haveand then provide them to your students so they can as Scratch will be perfectly suited to online access to the developer toolsexperiment with various queries. introducing students to programming. of all the popular browser suites, There are also sites, such as codecademy.com, including Chrome, Edge and Safari.that provide online tutorials for your students; guidingthem through the process of creating tables, addingdata and querying the data. helloworld.cc 87

REVIEWS BOOKS THE THRILLING ADVENTURES OF LOVELACE AND BABBAGE A graphic novel about an alternate reality with Ada Lovelace and Charles Babbage, and a completed Analytical Engine! IN FO WRITTEN/DRAWN BY Sydney Padua | PUBLISHER P antheon Graphic Novels (Penguin Books) kitten pictures to calm Queen PRICE £12.99 | ISBN 978-0141981536 | URL 2dgoggles.com Victoria down; while Charles comes across as the archetype S ydney Padua is a graphic her novel (the one written by her of the absent-minded inventor. artist and animator, who ‘friend’ George Eliot) analysed by The end of the book includes was asked to draw a short web the Difference Engine to correct sections on Babbage’s anticipating comic about Ada Lovelace for all the errors, but the (shorter) carriage, which (would have) Ada Lovelace Day. If you know Ada’s history then you realise “ You’ll learn a lot about Ada and Charles, this didn’t have a terribly happy Victorian society and the principles of ending, so drawings imagining an alternative, better, and more computer engineering from this book thrilling universe were added, and such was the hunger for more details that she expanded them story in which George Boole visits shaved seconds off additions into this novel. and is asked ‘Tea or coffee?’ and (modern fast adders use similar The book contains a number responds ‘Yes’ would make a great techniques to save nanoseconds), of stories showing an alternate introduction to Boolean logic! programs, punch cards, and logic universe where Charles Babbage’s Endnotes add more detail, and loops, all of which add detail Analytical Engine does get built including cartoons from Punch to the Analytical Engine. A moving (called the Difference Engine, (the one showing the Old Lady of epilogue has Ada and Charles because it sounds cooler), and Threadneedle Street bailing out talking as they wander through the Ada doesn’t die at 36. There irresponsible banks is from 1890!) towers of cogs inside the Engine. are lots of footnotes, linking the and other Victorian publications. You’ll learn a lot about Ada alternate universe to our own, Ada is depicted as a pipe- and Charles, Victorian society extensively and meticulously smoking, leather-clad hacker, and the principles of computer researched, building up a fantastic equally at home with a wrench engineering from this book. There picture of Ada, Charles, and fixing a crash in the innards of are lots of computer in-jokes to Victorian society. My favourite the Difference Engine, or hand- be found, and you’ll have a lot of story has Marian Evans having punching a program to print out fun as you learn.88 helloworld.cc

THE PROGRAMMER’S ODYSSEY ESSENTIAL READING:A fascinating life in computer programming Test yourself with these thoroughly challenging puzzle books!IN FO BY Garth Eaglesfield | PUBLISHER Pronoun | PRICE £4.15 (Kindle) ASIN B01LTHF1S8 | URL helloworld.cc/2v3qxAn ALGORITHMIC PUZZLES I n the preface, Garth on a pig’ makes BY Anany and Maria Levitin Eaglesfield (born in 1946, an appearance; PUBLISHER Oxford Universitydegree in Philosophy) points out and a large partthat the digital age ‘still only spans of the second Press (USA)a single working life’ and his book half is devoted PRICE £15.99gives ‘a totally personal account’ of to a system ISBN 978-0199740444such a life, describing the events that called Tuxedo, with which he’s been URL helloworld.cc/2vimLqNhappened and his thoughts on them. heavily involved. His ‘drift’ into programming makes The Levitins have put together aan entertaining introduction, and My odyssey started eight years or useful collection of puzzles, mostthere are bits of basic background so after his, and I have a completely of a mathematical nature. What sets this collection apart iswhich can be skipped (although look different set of events, thoughts and the authors’ commentary, which emphasises algorithmicat the section on log tables if you’ve opinions, but despite this I found it as well as logical approaches to solving the problems.never used them, or for nostalgia fascinating. We don’t tend to lookif you have). There’s a lot about back very often (the last issue of HEXAFLEXAGONS, PROBABILITY PARADOXES,COBOL, which played a large part Hello World was an honourable AND THE TOWER OF HANOIin the odyssey; the phrase ‘lipstick exception), but if we don’t we’re ignoring a valuable resource. BY Martin Gardner PUBLISHER C ambridgeCOMPUTATIONAL THINKING University PressIncisive insight and practical advice – a ‘must-read’ for students PRICE £12.99 ISBN 978-0521735254IN FO BY Karl Beecher | PUBLISHER BCS | PRICE £19.99 | URL helloworld.cc/2vnNrWF ISBN 978-1780173641 | URL shop.bcs.org A classic. Gardner wrote a monthly H ow do the small coding Decomposition column on mathematical games and challenges attempted by and other key recreations for Scientific Americanbeginners link to the marvels of ideas, such for 25 years: this book collects and expands many ofsoftware that drive our world? The as pattern his best pieces. Gardner has an engaging, accessibleconnection, sadly missing from recognition, style, and there’s much here that would inspire youngmost programming guides, is made generalisation, computational thinkers today.through computational thinking: a and abstraction, are introduced inproblem-solving framework of value plain English. No prior familiarity is CAN YOU SOLVE MY PROBLEMS?to all, regardless of experience. assumed or required, making this A CASEBOOK OF INGENIOUS, PERPLEXING AND Do not be confused by the book’s less a synopsis, and more a blueprint TOTALLY SATISFYING PUZZLEStitle – this is not another ‘getting for teaching.started’ guide. It will resonate most BY Alex Belloswith those who have started already. Practical explorations in Part 2, PUBLISHER Guardian Faber In two distinct but related sections, using Python, map to the concepts of PRICE £8.99Karl Beecher distils the core concepts CT. Expect 0 to 60 coding in a couple ISBN 978-1783351152involved. Logic provides the starting of chapters! URL helloworld.cc/2wlc17Hpoint; algorithms are the meansby which decisions are stitched Throughout, Karl Beecher makes Bellos has a weekly puzzle columntogether. But while algorithms connections hitherto unseen, raising in the Guardian - this book is alie at the heart of computational awareness and cutting through the collection of some of the best ofprocesses, there is no algorithm for frequently bewildering language the thought-provoking puzzlessolving problems. Rather, our eyes of the discipline. As he admirably that have been featured. Some of these require someare drawn to the creative art of CT. demonstrates, there is a lot more to cunning, but others provide a great starting point for software development than simply programming exercises. teaching people to code. helloworld.cc 89

FEATUREEVENTFUL INSPIRATION: PART 2 Our guide to running a successful tech-based event, packed with advice from people who are already running theirs A re you considering running a This series of articles is based on “IT’S ALL DOWN TO WHAT YOUR hackathon, techmeet or Raspberry The Raspberry Pi Foundation’s guide to INTENTIONS ARE FOR THE EVENT, WHATJam? Getting like-minded people together running a community event. The Raspberry SPACE YOU HAVE IN YOUR VENUE, ANDto encourage digital making, coding, and Jam Guidebook is aimed at Jam organisers, WHAT EQUIPMENT YOU HAVE AVAILABLE.community? In issue 2 of Hello World, we but the advice it offers will be helpful to FOR INSTANCE, FOR YOUR FIRST EVENT,looked at the first steps: getting started, anyone setting out to run a tech-based YOU MAY NOT HAVE ANY KIT AND YOU MAYbooking a venue, issuing tickets, and community event. Ben Nuttall, Community HAVE A SMALL VENUE, WHICH DICTATES Athinking about equipment and activities. Manager at the Raspberry Pi Foundation, MIX OF TALKS AND/OR SHOW-AND-TELL. INIn this issue, we take an in-depth look at compiled the guidebook. He collected LARGER VENUES, YOU POTENTIALLY HAVEthe activities you could offer at your event. advice from existing Jam organisers MORE ROOMS TO USE, SO YOU CAN EXPAND throughout the UK, on everything from INTO WORKSHOPS (PROVIDED YOU CANWHAT IS A finding a venue to managing your finances, GATHER ENOUGH EQUIPMENT TOGETHER),RASPBERRY JAM? and from planning your activities to MORE SHOW-AND-TELL, AND EVEN A managing social media. Packed full of MARKETPLACE IF YOU CAN PERSUADE Raspberry Jams are independently organised great, first-hand advice, the guidebook is VENDORS TO ATTEND.” community events where people get together designed to help you to run the best event to share knowledge, learn new things, and you possibly can. MICHAEL HORNE meet other Raspberry Pi enthusiasts. Jams CAMBRIDGE RASPBERRY JAM provide opportunities for people to get involved Your unique event in digital making, develop their abilities, get Drop-in together, have fun, and socialise. They are Your event could feature a range of usually free or very cheap to attend. activities. From the informal drop-in, A drop-in is a popular informal activity. where people bring their own projects As the event organiser, you need to to work on, to more formal workshops provide people with space to work on and talks, the activities you offer will set their own projects, or to look online for the tone for your gathering. something to make or learn. This might seem like something your attendees90 helloworld.cc

could do at home, but doing it at the Jam warning of how many projects you need to workshop participants, or they may be ablegives them the instant support of other accommodate. If you have limited space, to provide their own. Make sure they knowcommunity members. you could ask people to apply to take in advance what they need to bring. part, and choose the most appropriate Running a drop-in is easy. You will need exhibitors. Give yourself time to make Your first job as the organiser is to findto provide tables, chairs, and electricity, contact with your exhibitors to make sure leaders for your workshops. Ask yourand ask your attendees to bring their own you know what space they need, and what colleagues, people you know from otherkit. If your venue can give you access to a other requirements they have. If you can, tech groups, or your regular attendeesPC suite, participants can bring their own provide a small team of people to help your whether they would be interested inRaspberry Pis and connect them to the exhibitors to set up their projects. running a workshop, and make sure thatvenue’s monitors, mice, and keyboards. the workshops for your event cover a rangeYou could provide printed worksheets for Interactive show-and-tell projects are of projects. You could lead a workshoppeople who need guidance, or point them particularly popular with visitors. Robots yourself, but make sure that you have ain the direction of some online resources.A small team of helpers offering advice “ DEMONSTRATING PERSONAL PROJECTSand assistance will help your drop-in IS A GREAT WAY TO SHOW NEWCOMERSto run smoothly. WHAT HOBBYISTS CAN ACHIEVEBeginner sessions that participants can control, or games team of helpers to keep the event running that people can play, are very engaging, smoothly while you are busy.Use beginner sessions to introduce and demonstrate the possibilities ofnewcomers to digital making or coding. digital making. The workshop leaders will need toA beginner session could take the form plan their content carefully, and decideof a Q&A for people new to a particular Workshops how they intend to deliver it. You couldprogramming language or device. structure workshops around worksheets,Alternatively, you could provide a team Workshops provide structured practical presentations, or both. Prepare your SDof volunteers to guide beginners through experiences for your participants. They are cards or hard drives in advance with allsome basic tasks or projects. This could more formal then drop-ins or show-and-tell the software you need for the workshop,involve the use of a PC suite for coding sessions, and you will need to make sure and check that the software runs correctly.activities, or support for people bringing that your workshop leaders are suppliedtheir own kit that they haven’t used before. with the equipment they need. You may Schedule your workshops with clearMake sure you announce your beginner to need to provide equipment for your start and finish times, and make suresessions in your publicity so that new you publicise the level of your workshop.attendees know that they will be welcome.Show-and-tellRun a show-and-tell as a way to inspirepeople to create their own projects. Invitepeople to bring along projects they areworking on, or have completed, and todemonstrate them to other attendees.Demonstrating personal projects is a greatway to show newcomers what hobbyistscan achieve. Showcasing projects givespeople the chance to ask questions aboutthe builds, and for the owners to sharetheir experiences. It is best to organise your show-and-tell in advance. Compile a list of peopleand projects, and plan the space at yourvenue to accommodate them. You’ll needto announce your show-and-tell in thepublicity for your event, and make it easyfor people to participate. If you are prepared to let everyone exhibittheir projects, offering an exhibitors’ tickettype on Eventbrite will give you advance helloworld.cc 91

FEATUREIf a workshop is covering an entry-level a projector, a screen or a suitable wall, ten, or 15 minutes are a great way to givesubject, make sure that your participants and a microphone and speakers. Ensure new speakers the chance to stand up andare aware that they don’t need to that each presenter is provided with present on their chosen topic, without theknow anything about the subject to the correct cables to connect their kit need to prepare a long lecture. Encouragetake part. If your workshop is covering to the projector, and with anything else all attendees to consider giving a lightninga more advanced subject, make sure they need. talk, regardless of their age, experience,that your participants understand what gender or background.prior knowledge they will need before You will also need to invite peoplethey sign up. to speak, in advance of the event. You Panel session could issue a general call for speakers in Make sure you provide a team of helpers your publicity for the event, or you could If you are running a series of talks, considerto set up and clear away each practical approach particular people and ask for their organising a panel session. Give youractivity, and to help the activity leader input. Make sure that anyone volunteering attendees the chance to put their questionsto set up and run their workshop. to speak knows how to contact you, and to a group of experienced individuals on a “WHEN I RAN THE MANCHESTER JAM, “ IF YOU ARE RUNNING A SERIES OF TALKS, PEOPLE WERE HAPPY TO WORK ON THEIR CONSIDER ORGANISING A PANEL SESSION OWN PROJECTS. OCCASIONALLY WE RAN A TRACK OF TALKS, OR PUT ON A WORKSHOP, that you confirm their talk with them in particular topic. Ask your speakers whether WHICH WAS A NICE CHANGE. NOW I RUN advance to give them plenty of time to they would be willing to participate in a THE JAM AT PI TOWERS, THE ATTENDEES prepare. You will also need to find out what panel, as well as giving their own talk. TEND TO BE MOSTLY BEGINNERS – USUALLY equipment and connectivity each speaker Your panel could be a general Q&A session PARENTS WITH THEIR CHILDREN – SO WE needs for their presentation, and for any on digital making and coding, or you could MOSTLY RUN WORKSHOPS AND HAND OUT demonstrations they are planning to run. focus on one device or programming WORKSHEETS.” language. Make sure you publicise the Assign one or two of your volunteers focus of the panel in advance. BEN NUTTALL the role of managing the talks. They will RASPBERRY JAM @ PI TOWERS need to ensure that the correct equipment You will need to provide microphones, is set up for each speaker in time for their speakers and other equipment to yourTalks talk to begin, that the capacity of the panel members. You may also need a room is not exceeded, that the audience microphone for the audience. This couldAnother formal activity to consider is can arrive and leave the room again be a microphone on a stand that audiencea series of talks. These can be lengthy quickly, and that the talks start and end members queue up to use, or a radio micconference-style presentations, or on-the- on time. If the speaker is planning to take held and managed by a volunteer.spot lightning talks. Scheduled talks give questions from the audience, the managerattendees the chance to share something should control this process. Marketplacewith other enthusiasts: a project they’vebeen working on, something they’ve Talks don’t have to be very long: a Some organisers invite retailers to selllearned, or an inspirational story. series of short lightning talks can provide digital making and coding accessories great opportunities for people to present and equipment at their events. This can If you are planning to run formal talks, their projects, or something they’ve be an effective way for retailers to reachyou will need a space that is separate learned and want to share. Talks of five, customers in the digital making and codingfrom the rest of your event so that thetalk does not disrupt the other activities,and vice versa. You will need to provide92 helloworld.cc

community. It is also the perfect place for Other formats n If after running a one-off event youattendees to look at kit before they buy, are inspired to start a regular cluband to put questions to the sellers in person. Your event doesn’t have to be open that caters for young people aged to the general public. 7-17, why not register your event as Make sure that retailers know you are a CoderDojo? Register at coderdojo.com,looking for sellers for your event. Approach n A TeachMeet is an event where teachers wait for confirmation, and find a team ofrelevant retailers directly, particularly local gather to give short presentations to volunteers to help you. There are plentybusinesses. Look for contact information on their peers and share ideas for teaching. of free resources on the CoderDojoretailers’ websites, or reach out on Twitter. Why not run a digital making and coding website to support your event, including TeachMeet, with practical workshops and two e-learning modules for adult helpers. Make sure you check with your venue short presentations? More informationbefore you organise a marketplace – some on organising a TeachMeet can be This is not an exhaustive list of thevenues do not allow commercial transactions found on the Teacher Toolkit website activities you could run at your event! Forduring events. Talk to vendors in advance (helloworld.cc/2rT9rnC). more ideas, visit other local events and talkand find out what equipment, power and to other event organisers.facilities they will need. Provide a dedicated n Your event could promote participationspace for your marketplace, and make sure in national programmes and competitions.you provide a small team of volunteers to The Raspberry Pi Foundation runs Pioneers,help your vendors to set up their stalls, and a competition aimed at teams of 12- toto fix any problems during the event. 15-year-olds (rpf.io/pioneers), and Astro Pi, a competition to write code to be run on the “WHEN A COMPETITION LIKE ASTRO PI OR International Space Station, aimed at under- A PROGRAMME LIKE PIONEERS COMES 16s and their teachers (astro-pi.org). OUT, WE’LL DO TALKS, AND INVITE PEOPLE ALONG TO TAKE PART IN WORKSHOPS AT n Register your event as a Code Club, THE JAM. IT’S GOOD BECAUSE IT GIVES and try using the Code Club resources AN INCENTIVE FOR PEOPLE TO COME for beginners. First, register yourself ALONG AND TAKE PART, AND GIVES THEM as a host on the Code Club website MOTIVATION TO WORK. WE CELEBRATE (codeclubworld.org). Find a volunteer THE ENTRANTS, AND THOSE WHO’VE willing to support children aged 9-13 WON, AND INVITE THEM TO DO TALKS. to work on projects in Scratch, HTML, WE ASK THEM TO MENTOR AT FUTURE and Python. Register them as an official RASPBERRY JAMS, OR RUN WORKSHOPS.” volunteer on the website, and your Code Club will be activated. ANDY MELDER SOUTHEND RASPBERRY JAMDOWNLOAD Download your copy of the Raspberry Jam “SOMETHING LIKE ASTRO PI IS A FANTASTIC Guidebook from: helloworld.cc/2p7ZX98 THING TO GET INVOLVED IN IF YOU WANT TO REALLY GIVE CHILDREN SOME FOCUS AND DIRECTION. THE IDEA OF HAVING YOUR CODE RUN ON THE INTERNATIONAL SPACE STATION IS A REAL MOTIVATOR FOR YOUNG KIDS.” DAVE HONESS RASPBERRY PI FOUNDATION helloworld.cc 93

CONVERSATION YOUR LETTERSYOUR Our letters page is a place for you to join our conversation.LETTERS If you’ve got a comment, a question or an announcement to share, contact us on Twitter via @helloWorld_Edu orNEW RESOURCE using the #HelloWorld hashtag. Alternatively, email us with ‘Teacher Letter’ in the subject line ([email protected]). Dear Hello World, I am writing to let you know about a new resource Theoretical inspiration developed by CAS, exploring computational thinking and creativity in programming. Dear Hello World, I have some students who are very good at programming. The recent CAS Tenderfoot program cites finding They can crack any logic problem at their level, but they a solution to a simple version of The Knight’s Tour aren’t very good at CS theory. They can code better than as a fruitful example of computational thinking for their classmates, but they’re indifferent about the theory, secondary teachers and pupils. We have run with displaying an ‘I don’t care’ attitude. this idea, using guided discovery as a basis for discussion, allowing teachers and pupils to attempt They do need to know about theory. There are to find a variety of human solutions to The Knight’s various theory papers in our syllabus, which cover Tour and related problems. The resource shows NFA, DFA, Turing machines, artificial intelligence, ES, how a simple model of computational thinking fuzzy logic, etc. (including creativity, heuristics, symmetry, induction, and deduction) underpins this approach, while How should I manage these students? using representations of the problem in online They are in the 17-19 age group. interactive boards and diagrams, and incorporating Sagar V, Tanur, India some ideas from graph theory. This is a fairly common problem, especially when a Our theory is that finding human solutions to class contains a few self-taught coders who have been a problem can provide a basis for devising and programming for a relatively long time. The first thing to implementing algorithms for program solutions. do is ensure they have a thorough understanding of what This in turn can lead to strategies for finding their assessments will entail. Reading through a course program solutions to more complex problems. specification is a little dry, but providing them with past In follow-up discussions, we look at how the exam papers and assessment tasks should make sure that human solutions we have developed may be they understand that there’s more to Computer Science transformed into program solutions, and to more than just programming. Hopefully the realisation that they general solutions. will need some theoretical knowledge in order to pass will provide some of them with the motivation they need. The resource, entitled From Human Solutions to Program Solutions: Computational Thinking, The second thing you can try is to present the theoretical Creativity and Pedagogy in Programming, can be material you need them to learn as a programming found at helloworld.cc/2ugOMyb. We hope it will challenge. After all, if a student can create their own model provide a useful reference for your readers. of a deterministic Turing machine or a Finite State Machine in Dave White, CAS Master Teacher code, they will first have to learn the concept to a sufficient depth before they can model it.94 helloworld.cc

A level projectsDear Hello World, Just remember that the awarding bodies prefer that theI’m new to teaching A level Computer Science, and I project provides a solution to a problem. ‘A game to teachhave started talking with my students about their final primary students basic maths skills’ or ‘A game to helpprojects. Can students use Unity with C# to make a develop spatial awareness’ might be more appropriate thancomputer game for their A2 projects? ‘A game to save the Earth from invading alien hordes’.Lyndsey Cashen, Isle of Man A pitfall to watch out for in game development for a finalThe key here is to communicate with your awarding body. project is students getting sidetracked by the creation ofMost exam boards will have a local area representative game assets. They are being assessed on their program andwho you can contact, and although they might not have the its accompanying documentation, rather than on the qualityanswers you are looking for, they will be able to pass on your of the game. Remind them that the project is probably onlyquery to the relevant subject lead. worth about 20 percent of their final grade, so spending fifteen hours creating a photorealistic 3D model of car tyre A cursory glance at both the AQA and OCR A level is probably not a good use of time, when a primitive cylinderspecifications would indicate that both boards are happy to would suffice.have solutions written in C#, and there is no reason that aprogramming tool such as the Unity Game Engine would not SHARE YOUR EXPERIENCESbe permitted. Dear Hello World, New grade boundaries I need help! Dear Hello World, Last year, I started research looking for a magic What can we expect from the new grade bullet for teaching abstraction in primary schools. boundaries for the exam element of the CS GCSE? However, I discovered that research requires you to The legacy boundary for an A* has been around look at one tiny aspect of a big subject in order to 66 percent, which converted to the new grades gradually build a solid body of evidence. So now I would be very low, especially with reference to am focusing on one aspect of abstraction: how we other subjects. Is there any guidance to allow us use design when teaching programming, and how to predict grades for our Year 10 students? we might reuse our expertise in teaching writing Corinne Sherman, Bristol when we teach programming. This is not a question that anyone, possibly even My work builds on research from across the within the exam boards, can answer with any world, but all of it with older pupils. From Israel to certainty. There are a couple of things to take into the US via Scotland, the Netherlands and Germany, account, however. I am knitting threads of theory and practice together – but for teaching younger learners. Firstly, the awarding bodies will be under scrutiny to ensure that there is no major shift in results If you teach programming to primary children, between 2017 and 2018, when the new grading in school, out of school, formally or informally and comes into effect. If your current cohort of Year 11s have 15 minutes to spare, I would be indebted if achieves 75 percent A*-C passes, and they are of you could complete our survey. You can find it at comparable ability to your Year 10s, then you should helloworld.cc/2tPZjiR. be looking at about the same number of 6-9 passes. Unfortunately, you will have to perform your own Please do share the survey with your calculations with regard to how this converts into colleagues too! possible grade boundaries. Many thanks, Jane Waite, Queen Mary University of London Secondly, you might want to book some time with your school’s Head of English and Head of Maths. They’ll be receiving the new style GCSE results in August, and you might be able to learn from them how they tackled predicting grades, and what they are predicting for your current cohort of students. helloworld.cc 95

“HELLO, WORLD!” Everything you need to know about the new computing and digital making magazine for educators…Q WHAT IS HELLO WORLD? Q WHO MAKES A Hello World magazine is a new magazine for HELLO WORLD? computing and digital making educators. Writtenby educators, for educators, the magazine is designed as A The magazine is a joint collaboration betweena platform to help you find inspiration, share experiences, its publisher, Raspberry Pi, and Computing Atand learn from each other. School (part of BCS, The Chartered Institute for IT). Hello World is sponsored by BT. Q WHY DID WE MAKE IT? A There’s growing momentum behind the idea of putting computing and digital making at the heart of modern education, and we feel there’s a need to do more to connect with and support educators inside and outside the classroom. Q WHEN IS IT AVAILABLE? A Your new 100-page magazine will be available three times per year in time for each new term in January, April, and September. Would you like it to be available more frequently? Let us know! IT’S FREE! Hello World is free now and forever as a Creative Commons PDF download. You can download every issue from helloworld.cc. Visit the site to see if you’re entitled to a free print edition, too.96 helloworld.cc

WANT TO GET INVOLVED?There are numerous ways for you to get involved with the magazine. Here are just a handful of ideas to get you started:Give us feedback Tell us your storyHelp us make your magazine better – Have you had a recent success (or failure) youyour feedback is greatly appreciated. think the wider community would benefit from hearing? We’d like to share it.Ask us a question Write for the magazineDo you have a question for a FAQ section or abugbear you’d like to share? We’ll feature your Do you have an interesting article idea?thoughts and ideas. We’d love to hear from you.GET IN TOUCH Want to talk? You can reach us at: [email protected] US ONLINE SUBSCRIBEwww.helloworld.cc IN PRINT @HelloWorld_Edu TODAY! fb.com/HelloWorldEduMag PAGES 32-33 helloworld.cc 97

OPINION MILES BERRY PRINCIPAL LECTURER ONE LANGUAGE AT A TIME Do students need breadth of experience or depth of skills? ost of us working in computer science education Fluency countsM seem to agree that coding is not the end in itself, Somehow though, programming seems different from but the means through which our students get creating a presentation. If we’re serious about studentsuseful things done, express themselves creatively, and becoming adept at solving problems and expressing theirdevelop their understanding of the fundamental principles creativity through programming, then they need to developof computer science. While some of our students will go some sort of mastery of the medium: in short, they needon to be the software engineers and computer scientists of to become fluent (or at least conversant) in one, or two, orthe future, almost all will find themselves using computers. three programming languages.An understanding of how these machines work, and how By analogy with learning human languages – whileto think about problems so that the computers can help we might be concerned that students get to grips withsolve them, is what’s important for these students. comparative linguistics and deep structure, we’re much more concerned that students learn a language, in short, they need to become fluent are able to hold productive conversations in it and, (or at least conversant) in one, or two, perhaps later, become able to write stories, essays or poems in the language. or three programming languages There seems to be relatively little research comparing the one-language and many- language approaches to teaching programming:One language or many? mainly, I suspect, because this question rarely arises inWhere some of us disagree is on the best means to undergraduate CS education. It is simply assumed thatthis end. On the one hand, there are those who argue introductory programming courses will teach a particularthat these principles, and indeed the constructs of language, although this still allows plenty of argument overprogramming (such as sequence, selection, and repetition), the choice of paradigm and language.are best learnt generically and then applied in as many While the brightest and best will, I think, be able toprogramming languages as time, teacher expertise, and transfer the concepts from one language to another, I fearstudent interest permits. Others take the view that actual, we do a disservice to those who struggle to express theirpractical experience of coding in one language is the best ideas in a first programming language by rapidly introducingway to learn to program – and through this to acquire, them to many more. Changes in syntax, grammar andeither through explicit instruction or guided discovery, an vocabulary do little more than add to their already highunderstanding of the underlying principles. cognitive load. Let’s learn the lesson from the mathematics The arguments for the ‘many languages’ approach education community, that mastery comes through depthseem similar to those used in the ICT teaching past: that to of experience, not superficial acceleration.avoid death by PowerPoint, we should allow students tochoose Prezi, Google Slides etc. instead, as the software Miles Berry is principal lecturer in computing education atskills themselves are what matter. The ‘many languages’ the University of Roehampton. He serves on the boards ofadvocates argue that there’s more to programming than Computing At School, the BCS Academy and the ComputerScratch, or even than Python; and to avoid childrenbecoming bored with Scratch, they should also learn Logo, Science Teachers Association, and is a Member of theKodu, Hopscotch, Tynker, and so on. Raspberry Pi Foundation.98 helloworld.cc



helloworld.cc100 (helloworld.cc)


Like this book? You can publish your book online for free in a few minutes!
Create your own flipbook