Ideas and Skills to Cover
More general IT
- Word processing
- Video and audio
- Images and compression
- Research skills and etiquette
- Internet safety
- History of Computers
Two lessons towards the end
- What is a computer?
- Basic electronics - logic gates, sensors, maybe just a little bit on V=IR etc.
Barely touched on, in the end - ran out of time to play with electronics
- Binary & file formats
Did a little bit on binary in section on history of computers, and a little on file formats in the final lesson (on the internet)
- The Micro:Bit
Covered in the penultimate lesson
Covered initially in lesson on Minecraft, in greater depth in Scratch
- Control structures
Covered over three lessons in Sonic Pi (conditionality; iteration; concurrency)
- Vectors & co-ordinates
How to place things on a screen.
Co-ordinates covered in Minecraft lesson, largely taken for granted in Scratch.
Covered in Sonic Pi and Scratch. Not encountered yet in the context of methods of objects.
Interactivity covered in Scratch lesson 2
- Computers in Society & Employment
Discussed in first lesson
- Security and Privacy
Barely touched on.
- The internet
Subject of final lesson.
This year I want to make sure all students have a chance to be exposed to the software and practices underlying general computer literacy.
My plan is to do this through tasks making use of relevant tools, with minimal introduction.
I have five lessons a week. Mondays, Fridays and some Wednesdays I teach till 10:30; one day a week Rachel will take them for a tutorial from 10:05; at least one day a week I need to set cover for another teacher.
Wednesdays and Fridays, KMR teaches in the computer room from 10:05 which means that the lessons can’t all be based there. I need to figure out what to get them to do with their non-computer time, given I don’t much want them to hand-write Main Lesson books.
First lesson should be largely spent on assessing where pupils are at so far with their understanding of and familiarity with computers.
Second lesson it makes sense to get them to start writing about what computers are and what they do.
Third lesson, maybe talk about what blogs are and how the internet works?
This block consisted of a total of 13 lessons, most of them around an hour and a half long (maybe more like 75 minutes, depending on how long choir went on for). On Thursdays I only had an hour, since I teach chemistry from 10:05, and on Wednesdays and Fridays I had to be out of the computer room by 10:05 so that another teacher could use it; that meant we had 25 minutes on those days to write in Main Lesson books.
A note on the Main Lesson in Steiner education: each class starts its day with a Main Lesson, of between about an hour to two hours (longer for younger classes). These are generally structured to start with some kind of rhythmic activity (in the upper school, this means choir); then there’s some time given over to recall of the previous day’s teaching. Most of the rest of the lesson follows along similar lines to lessons in most schools, but then the last part of the lesson is spent on ‘book work’ - the pupils work on putting together a book for every Main Lesson block they’re taught, usually adding about a page a day. Often these are illustrated, though I found it a little tricky incorporating strong visuals into this unit.
What follows below are some notes I asked myself before beginning.
What’s the most logical flow of this thing, pedagogically?
How should they write up their Main Lesson notes? Would it be sensible to do it online, or is that impossible in pairs?
If offline, need to allow time every lesson probably back in Class 9.
If online, we have a problem with other classes wanting to use the computer room.
What if they type up and print some pages?
Introduction to Computing
- What a computer is, fundamentally
What is a computer?
- Do you live in a house with at least one desktop or laptop computer?
- Do you have one of your own?
- Do you have a smartphone?
- When did you first own a computer (including any of the above)?
- Do you have one or more accounts on social media sites (including WhatsApp, Facebook etc.)?
- Have you used the following?
- A wordprocessor?
- A spreadsheet?
- A web browser?
- A programming language?
Any terms that are unfamiliar in there?
How do you all feel about the Steiner School’s policy on screen use, specifically avoiding computers before Class 9?
Is there anything that you would particularly like to learn about using computers?
Drawing heavily on https://www.raspberrypi.org/learning/sonic-pi-lessons/lesson-1/plan/
- Researching and discussing questions from http://community.computingatschool.org.uk/resources/2047
- Start with all the parts of the Raspberry Pi on a table: keyboard, mouse, speaker, memory card, power supply, monitor, monitor cable, and the Raspberry Pi itself. Ask the class to name and describe each component as you connect it to the Raspberry Pi in front of the class. Finally, plug in the power and watch it boot up.
- Plugging in and turning on the Raspberry Pi.
Pretty good discussions. Maybe a bit too much input from me. Everyone in the class engaged, though, and interesting observations from many participants.
Left quite a bit of time for introducing the Pi.
- Basic spreadsheet use
- Different representations of information
- Concept of functions
Besides being a useful thing to generally have a handle on, spreadsheets provide a handy introduction to:
- Multiple representations of the same information
I’ve had a few jobs where I’ve needed to use spreadsheets, but I’ve also used them for personal interest.
- When I’m marking tests, I often put the marks into a spreadsheet. This allows me to easily find total marks; calculate percentages; and also find the average marks for each question, so that I know which are areas I especially need to work on.
- Before the 2017 election, I used a spreadsheet to estimate the effect of new voter registration on turnout, knowing that young people are far more likely to vote Labour.
- When I was buying a flat with the help of some contributions from family, I used a spreadsheet to keep track of who contributed what and how much extra I would need.
- After the 2015 election, I used a spreadsheet to calculate how many non-voters Labour would have needed to get to vote for them to swing the result (50 seats would have gone from the Conservatives to Labour if a fifth of non-voters had voted for them)
- After the 2014 indyref, I used a spreadsheet to calculate whether Yes would have won if votes had been weighted according to how long someone has to live, statistically (I projected a 51% win for Yes).
Need to incorporate some advice on safe internet use etc:
Online safety & basic search
What are some dangers of the internet?
- Seeing bad things
- Exposing yourself
- Being misled
- Selecting good terms
- Search syntax
- Searching within pages (ctrl-f)
- Sub-types of search - News, Image, Scholar
- Scanning pages to compare info
- Storing references
How to use a spreadsheet: Basic skills like tabbing between cells, creating a chart, using simple functions.
How to use a wordprocessor: Basic skills like making headings, pasting images.
Research techniques: searching, finding Creative Commons images.
Using Word: Write up what exactly a computer is, including basic descriptions and examples of all its component parts and some Creative Commons images.
This was the class’s first chance to log in to computers, and play around with Excel; I’d originally intended for it to be a bit more structured, but in the end it felt like it made more sense for them to just try a couple of very simple things: enter some numbers in a spreadsheet, find their sum, find their average, make a chart.
Functions and Data
- Basic understanding of what data is, and how it can be represented
- Some idea of the concept of a function
What are some of the things you can do with a spreadsheet?
We talked a bit yesterday about some of the dangers of the internet. How can we minimise those risks?
(Also: we didn’t bring up the dangers of being misled, distracted or addicted!)
- Keep Safe Search on
- Use pseudonyms, avoid posting personally identifiable details in public, use privacy settings carefully
- Stay critical, seek corroboration
- Be kind
Spreadsheets are among the easiest ways to meet and experiment with ideas about data and functions.
Data is a collection of information that computers can work with. For example, it could be the numbers in a spreadsheet; or it could be the colours in a picture, or the notes in a piece of music.
Data can be represented in multiple ways, and that’s a big part of the power of computers. At a basic level, everything that computers do can be thought of as numbers. At an even more basic level, it is all about 1s and 0s.
We met two functions yesterday: sum and average. In maths, a function is just something that takes one or more inputs and produces an output, like a machine for turning numbers into other numbers. Another example could be ‘square’, which takes a number x as its argument (or input) and returns a value x×x as its value (or output).
That’s often what ‘function’ means in computing, too, but the concept is broader - a function in a programming language doesn’t always require input, it doesn’t always output a value, and it sometimes does other things too!
Using a chart to check whether stopping distance is proportional to speed.
Table 4.2 Typical car stopping distances
Speed (mph) 20 30 40 50 60 70 Typical stopping distance (car lengths) 3 6 9 13 18 24
Experimenting with different data sets and ways of representing and working with them.
- Can you imagine what your life would be like without computers?
- Have you learned a lot from the internet? What resources have you found most useful?
- Is there anything that makes you anxious about the way computers are used in the modern world?
Writing about what spreadsheets are, and what they’re used for.
Include a snippet of a spreadsheet.
Not bad; a little floppy in places. Need to make sure I have more satisfying data sets to play with next time (most of the ones I could find for this were too big, too cryptic and too hard to relate to).
Class discussion was a decent way to end the week, but I’d rather have them recording things if possible; it might be worth seeing if I can negotiate with Kirsty to swap rooms or something.
Moving on to how to program. What’s my best route in here? Scratch? Snap? JS Dares? Straight into Processing? Python?
Introduction to Snap
After working through Lab 1, write about the nature of data and functions.
- What is data?
- How much data is there in the world?
- What do computers do with data?
- What is a function, in maths and in computing?
Literally just work through Lab 2
Then do the questions I didn’t make them do yesterday
Even More Snap
get on with it
For each of the following terms, write
- What it means (in programming)
- What it looks like in Snap
- A time you have used this in Snap
- Conditionals and booleans
- Loops and iterations
I also got some stuff about computer graphics in there
Further Snap + Computing History
Checking in what people understand of the questions from yesterday (conditionals, etc.)
- The first known calculating machine, the abacus, was invented in Babylonia around 5000 years ago
- The Antikythera Mechanism, thought to be the world’s first human-made computer, was recovered in a shipwreck around 1900. It was already at least 2000 years old, originating in ancient Greece (Corinth). It took more than 100 more years before anyone figured out exactly what it was: an analogue computer capable of calculating the positions of heavenly bodies and the timing of the Olympic Games, and predicting solar eclipses.
- Several engineers in the 1600s produced mechanical calculating machines of increasing sophistication.
- In 1801, the Jacquard loom was created. Cards with holes punched in them provided the instructions the machines needed to weave complex patterns with little human input; each card would produce a different pattern.
- About ten years later, as automation in the textile industry led to many workers losing their skilled and reasonably well-paid jobs, while their bosses got tremendously rich, the Luddites started destroying machines. Although ‘Luddite’ is used now as a term of abuse for people who object to the rise of technology, the original Luddites were really fighting for meaningful work in decent conditions. Its not clear that the two are necessarily incompatible.
- In 1837, the mathematical Charles Babbage laid out plans for his Analytical Engine, which would have been the first true computer if it had ever been built. Ada Lovelace, daughter of the poet Lord Byron, is credited as the first ever computer programmer; her notes on the Analytical Engine included an algorithm for calculating Bernoulli Numbers, speculations on the future of human-computer relations, and the use of computer programs outside of maths.
- In 1936, Alan Turing gave a thorough theoretical description of the general-purpose computer, or Turing Machine. He showed that with enough storage, one of these machines would be able to solve any mathematical problem expressible as an algorithm. Six years later, his work led to the creation of the first programmable electronic computer, and the cracking of Nazi Germany’s Enigma code.
- In the 50s transistors started to replace vacuum tubes in computers, with integrated circuits coming into play in 1960. In 1965, Gordon Moore observed that the density of transistors in each integrated circuit had been doubling every year, and predicted this would continue for a few years to come; in 1975 he saw it slowing down to a doubling every two years, and that rate of exponential growth has more or less continued ever since. With each transistor also getting faster, the overall speed of a computer has been doubling approximately every 18 months - increasing by a factor of 100 every decade.
- In 1980, the first home computers started coming on to the market. The internet was also born around this time, although it wasn’t until the mid-1990s that it became a mass-cultural phenomenon (I first got on the internet in 1994, I think).
- 1998: Google formed. 2001: Wikipedia. 2005: YouTube.
Not my best-planned lesson, but it was okay. Spent the last half-hour back in the classroom, largely holding forth about the history of computing.
Had a bit of Q&A about computers and science fiction after that.
Intro to blogging, history research
- How to use blogging software and Glow
- Learn more about a particular aspect of the history of computing
- Can anyone name any notable events from the history of computing before the birth of the internet?
Depending on what they name:
- What was the Antikythera mechanism, found in an ancient Greek shipwreck, capable of computing?
- Who rose up against the impoverishment brought on by automation in the early 19th century?
- Who invented the first true computer, and who programmed it?
- Whose work on the foundations of computing led to the cracking of the Enigma code in World War II?
- Can anyone explain Moore’s Law?
Introduction to blogging, and to Glow.
Online research: working in pairs for about half an hour, pick an episode from the history of computing, research it on the internet (make sure to look at more than one source). Write about 200 words on it (use your own words) and include a picture you found on the internet (or a space for a picture). Credit the picture, cite your sources.
Create a Glow blog. Save your work as a blog post.
If there’s time, write a blog post about everything you’ve made in Snap! to date.
A worthwhile exercise. Almost everyone in the class had a good idea about what they wanted to research, the exception being Celia & Fiona who were working together.
Most of the class were obviously comfortable using Word, but three or four of them struggled. Hopefully this was an opportunity for them to gain a little confidence.
I’d originally planned on introducing the Microbit in the same lesson as the internet history research, but we had a shorter time than usual in the computing room, and both the research and the Q&A session at the start were a little more time-consuming than I foresaw.
Snap: self-directed projects
Continuing Projects, Introducing HTML
- Awareness of structure and role of HTML
- Some very basic HTML
Further explorations of coding
Mini-lecture on markup
Look at HTML of a blog post
Continue self-directed work, but make sure to write it all up in the blog
Make sure blog posts are published, blogs are visible to Glow, I have URLs
- The basic idea of simulation
- How to use a central loop for things like simulation
Simulating gravity is super-easy.
Simulating motion, in general, is not hard.
Experiment with gravity
Start thinking about own project to work on this week
Have a quick look at HTML
Blog about plans for project
Plan a project
Start planning and/or making a simple Snap game.
Also, check out how HTML works.
Worth including! Pretty satisfying. A bit messy. Do on Monday, as it’s the longest lesson?
A pretty good playful introduction to textual programming.
So nicely powerful, but is it too hard to get going with?
Worth getting them to just experiment with Inspect Element a bit more? Change the background of a page, that kind of thing?
Seven lessons to go…
Introduction to Sonic Pi
- What a computer program is
- How to write a simple program
- What are the essential components of a computer?
- Can you name some examples of
- What is this thing?
[It’s a Raspberri Pi, a small computer]
Every computer includes some form of storage, and a processor capable of acting on the information stored there. For a computer to communicate with the outside world, it also needs some kind of input and output.
- Introduce the Raspberry Pi. Demonstrate Sonic Pi running; explain that this week we’re going to be learning how to program to create music and other sounds.
- Ask everyone in the class to plug in their Raspberry Pis and boot them up. They should all be booted and sitting on the login prompt waiting for authentication.
- Split the class into groups again and give each group a deck of the computer program cards. Ask each group to take out the statement cards and the control card from the deck. Then ask each group to form a line and to give each member of the group a statement card after shuffling them. The person at the start of the line should be given the control card. Explain that the person holding the control card should carry out the instructions on the statement card, and then pass the control card to the next person in the line like a relay baton. When the control card has reached the end of the line, they should stop. This should be repeated for a number of random orderings, after which the groups could be invited to create their own orderings. A helpful analogy might be cooking, where collections of statements are recipes and the control flow is which stage of the recipe you’re at.
- Start the Sonic Pi software. First, invite the students to log into their Raspberry Pi and start the graphical environment. It might help to display instructions on how to achieve this on a projector for all to see.
- Explain to them that they can use the same statements on the cards in the computer program: play and sleep. Invite them to spend the next 20 minutes or so writing their own programs and listening to the results.
See Notes: A summary of the nature of a computer, with an annotated diagram of a computer of their choice.
Partial success. Activity with cards did not go over; maybe they were embarrassed? Maybe it was unclear? Maybe I should have made them actually stand in a line?
Also felt like I hadn’t really explained enough about what they were looking at for them to spend the time available to play with code. Some pupils were altogether baffled; some made great progress; several got somewhere, but slowly.
Commands, Parameters, Iterations
- Understand and use iteration
- Understand and use parameters
A computer program consists of a series of commands for the computer to follow, one after the other. They often take parameters, for example with the
play method in Sonic Pi you need to specify which note you want it to play, like `play :c’.
An iterator is a special kind of command that tells the computer to run a block of commands repeatedly.
Plug in RPis. Load Sonic Pi. Check that they are working by entering the command
play :c to play middle C (the weirdly placed colon tells Ruby the ‘c’ is a symbol). Note that
play 60 should produce the same note, as should
:c5 would be one octave higher).
To change the sound of the note, use the
You can also play samples using
sample :bd_haus and so on.
sleep to pause between notes.
Put together a bassline or riff using this knowledge.
Now, try looping this riff using
5.times do ... end
Overview of what programming languages do
Definitely a better lesson. Everyone engaged, probably learning. Half hour of book work at the end, since we had to vacate the computer room for another class.
Conditionals and Randomisation
- Learn how to use an
- Use random numbers
- Use comments in code
How do you write a loop?
What’s a parameter?
Starter: can we listen to what people made last lesson?
Pupils should be should be shown how to add some randomisation to their code. This can be achieved by using the statement rand(10), which returns a random value between 0 and 10 (from 0 up to but not including the number you specify). You can specify other numbers for larger ranges; for instance, rand(20) will return values from 0 to 20. Let’s use this in our program by adding our random number to a note with the + operator:
play 60 + rand(10)
Invite the pupils to observe the actual number of the note played in the output window.
Pupils should then be shown how to write an if statement in the Sonic Pi application. Ask them to copy the following code on their machines:
if rand < 0.5
After they’ve had a chance to experiment, see who’s willing to share their work.
Finally, teach the class that the hash symbol # is used to make a comment. Invite them to place comments in their code to explain what is happening. This is not just for other programmers who might read their code; it is also for themselves in the future, when they look back at old code they may have written a long time ago and have forgotten what it does. For example:
None this lesson - leaving at 10:05, and it makes sense to lump today’s and yesterdays lessons together in their books, so they can do that tomorrow.
Data structures and Concurrency
- Know that numbers can be aggregated into data structures such as lists
- Understand that algorithms are a series of steps or instructions for solving a problem such as sorting and shuffling a list of numbers
- Understand that a simple program has one flow of control; in other words, it has one thread of execution. Programs can, however, have multiple such threads.
- Be able to program multiple threads that work at the same time (concurrently).
- We’ve looked at two ways of controlling the flow of a program so far. What are they?
Conditionals (if/else) and iteration (for/while)
- How do you implement a loop in Sonic Pi?
- What did you do in yesterday’s lesson?
Introduce a third way of controlling the flow of a program: doing two things at once (concurrency). Obviously this is very important in music. Try this:
So far, almost all of the data you’ve been using has consisted of individual numbers. However, it’s often useful to store several numbers in one data structure. For example, we used this in
play_chord yesterday. What other kinds of data might consist of a list of numbers?
Play several notes in a row like this:
play_pattern [40, 25, 45, 25, 25, 50, 50]
Try some sequences of your own.
Once they’ve had a short play with this, invite them to form a line and hand out cards (in no particular order), so each pupil in the line holds just one card. Explain that they have formed a list of numbers and that there are useful things that you can do with this. One example is sorting the numbers numerically, so that the smallest numbers are first and the largest last. Introduce the word ‘algorithm’ as a method for solving such problems.
Next, explain that we will explore a simple sorting algorithm: bubble sort. Start at the left hand side of the line and ask the first two pupils to compare their numbers. If they are in the right order do nothing, otherwise ask the pupils to swap. Then continue to the second and third pupils, and compare and swap again if necessary. Continue down the line. If at least one pair has swapped, start at the beginning of the line and repeat. If no pairs have swapped, the list is sorted.
Explain that most programming languages provide many such algorithms to make programming easier, and to reduce the amount of work you have to do as a programmer. Ask the pupils to type the following code:
`play_pattern [40, 25, 45, 25, 25, 50, 50].sort
play_pattern [40, 25, 45, 25, 25, 50, 50].shuffle`
Pupils are invited to play around with the constructs of this lesson, in addition to everything they’ve learned so far, to design a simple musical program.
Flow of Control
The simplest computer programs are like recipes where a series of instructions are completed one after the other, but it’s useful to be able to include instructions for which instruction to run next.
if will run a block of code only if some condition is met; this can be followed by
Different kinds of
loop will keep running a block of code - either a set number of times (a ‘
for loop’), or as long as some condition is met (a ‘
while loop’), or just until something happens to stop it (an infinite loop).
Sometimes we want to run more than one bit of code at a time, which means using
threads that run concurrently.
[Illustrate these with flowcharts]
Pretty solid lesson. With coaxing, got them to execute the bubble sort algorithm. Quite a lot of experimentation; most at least tried one or two things with threads.
Minecraft, Variables, Objects
- Introduction to working in 3D
- Introduction to Python
- How to use variables
- How to call methods of objects (and roughly what a method is)
- What do you call a series of steps taken to solve a problem?
- What algorithm did we implement using people on Friday, to sort a series of numbers?
This lesson draws heavily on https://www.raspberrypi.org/learning/getting-started-with-minecraft-pi/worksheet/
Things to know before you start:
- What coordinates are
- What variables are
- What objects are
Start Minecraft. Familiarise yourself with it, if you’re not already. Work through the worksheet!
With Minecraft running, and the world created, bring your focus away from the game by pressing the Tab key, which will free your mouse. Open Python 3 from the application menu and move the windows so they’re side-by-side.
You can either type commands directly into the Python window or create a file so you can save your code and run it again another time.
If you want create a file, go to File > New window and File > Save. You’ll probably want to save this in your home folder or a new project folder.
Start by importing the Minecraft library, creating a connection to the game and testing it by posting the message “Hello world” to the screen:
from mcpi.minecraft import Minecraft
mc = Minecraft.create()
If you’re entering commands directly into the Python window, just hit Enter after each line. If it’s a file, save with Ctrl + S and run with F5. When your code runs, you should see your message on screen in the game.
Find your location
To find your location, type:
pos = mc.player.getPos()
pos now contains your location; access each part of the set of coordinates with pos.x, pos.y and pos.z.
Alternatively, a nice way to get the coordinates into separate variables is to use Python’s unpacking technique:
x, y, z = mc.player.getPos()
Now x, y, and z contain each part of your position coordinates. x and z are the walking directions (forward/back and left/right) and y is up/down.
Note that getPos() returns the location of the player at the time, and if you move position you have to call the function again or use the stored location.
As well as finding out your current location you can specify a particular location to teleport to.
x, y, z = mc.player.getPos()
mc.player.setPos(x, y+100, z)
This will transport your player to 100 spaces in the air. This will mean you’ll teleport to the middle of the sky and fall straight back down to where you started.
Try teleporting to somewhere else!
You can place a single block at a given set of coordinates with
x, y, z = mc.player.getPos()
mc.setBlock(x+1, y, z, 1)
Now a stone block should appear beside where you’re standing. If it’s not immediately in front of you it may be beside or behind you. Return to the Minecraft window and use the mouse to spin around on the spot until you see a grey block directly in front of you.
An algorithm is a series of steps for solving a problem, or achieving some other goal. They often form part of a computer program, but we also use algorithms when performing mental arithmetic and so on.
Alorithms are named after the great Persian mathematician, astronomer and geographer, al-Khwārizmī.
Pretty weak lesson. The big disadvantage of Minecraft is that it invites kids to just muck around building/destroying stuff in a way that it’s not obvious they’re learning anything at all.
Format of resource from Raspberry Pi Foundation was a problem: didn’t want to print 8 sets of 13 pages, so distributed files on USB sticks, which was a faff already (especially since I only had 3 sticks handy) - then the HTML worksheet file bizarrely opened in Geany by default, rather than in the browser.
Out of 7 groups, we had:
- 1 group (visitors) whose Pi didn’t work for ages, and they never really got going with the work once it finally did;
- 1 group (Emma’s) who pretty much refused to attempt anything from the worksheet;
- 1 group (Keelin’s) who eventually did try some of the stuff, and got it to work, but didn’t go far with it;
- 1 group (Adam’s) who really tried, but stumbled because they made slight transcription errors copying the code from the worksheet to their Python window - but eventually got stuff working
- 1 group (Alastair’s) who did the first couple of things, got it working I think, then generally messed around with Minecraft;
- 1 group (Yusuf’s) who actually worked through something close to the entire worksheet.
- How to use Scratch
- Event-driven programs, for interactivity
This lesson is mainly following https://www.codeclubprojects.org/en-GB/scratch/rock-band/ (short URL: http://bit.do/scratcha )
- Make a sprite
- Set the stage
- Make a drum (interactive)
- Make a singer
- Change costumes
This was a fun lesson. The Code Club resource worked well; the only people who didn’t work through at least most of it were those who were already working at a somewhat higher level than the rest of the class.
So the next step is to build on their understanding of the Scratch environment to familiarise themselves with more of its possibilities…
More Scratch, Variables
- How to use variables in a game context
- How to make sense of, and modify, an existing programme
- The basic loop-based model of simulation & game programming
- What’s similar about the Scratch and Sonic Pi interfaces? What’s different?
Here I’m using my own resources exclusively.
Adapt Space Chase using a variable to change the speed and control it using the keyboard. Add another one to keep track of collisions and things.
Customise in any other way you feel like.
Share your work.
A variable is a symbol referring to a value which might vary. For example, the velocity of an object is often assigned to a variable
In maths, a variable is usually a letter representing a quantity. In programming, the idea is broader: it can be any name representing anything the computer can store (which could be a number, text, an object, etc.)
A constant is like a variable, only it doesn’t vary.
Decent lesson. Angelina didn’t engage much. Everyone else did a good portion of the work, at least. Keelin, Paul and Kira got distracted mucking about with the Scratch web site’s social networking features.
Additional Scratch, Threads
- Understand the role of events in interaction and inter-thread communication
- Be able to use ‘broadcast’ events to handle things which affect more than one sprite
- Start to use
clones in a program
- Programs often need to respond to events, either from user interactions or something inside the computer. What events did the Space Chase game yesterday make use of?
An event triggers a program to take action. For example, the user might click a button to make something happen.
Events can also be triggered by a program, for example when one
thread needs to send a message to another. This is useful when something affects more than one sprite in a game at a time (like Game Over, or Next Level).
Modify Space Chase so that a collision results in an Event being broadcast, positions reset and 1 life being lost.
Use a new sprite with
create clone of to make it possible to fire at the pursuing spaceship.
Detect what your spaceship reaches the edge and loop it around?
This is a Thursday, so I’m teaching chemistry and leaving them to get on with it.
History of Computing
- Be aware of the history of computing, including the exponential growth in processor speed
- Have some insight into the implications of that growth for the future of technology in society
Can anyone identify all of these things?
(a ZX81, a BBC Micro, a computer tape, two kinds of floppy discs and a CD-ROM)
Behold, the ZX81 and the BBC Micro!
This seemed to work pretty well; they listened with apparent interest and occasional laughter to me talking about the history of the internet, and only a little less interest in the history of the computer leading up to that time (I ended up starting in about 1981 and then looping back round, since I had artifacts dating from that time which made quite a nice starter activity).
It probably would have been better to split the history of computing over two lessons, in retrospect.
JS Dares 2
BBC Micro:Bit, Electronics
- Basic familiarity with the Micro:Bit and how to program it
- How to control or get input from external outputs and sensors? May not have time.
What did you learn yesterday? Report back in pairs or similar.
The Microbit is 1/70th the size of the original BBC Micro, and 16 times the speed.
Another fun fact: When Star Trek (TNG) was filmed in 1989, Data was described as being able to perform 60 trillion operations per second (teraflops). At the time, that was 60,000x faster than any computer that had been invented. 26 years on, our most powerful computers are 500x as fast as Data.
Finish and print research from yesterday.
Pick a tutorial from the Microbit site, and work through it.
Write about things you’ve made.
Not a bad lesson. Spent a little while with the class sharing their research from the previous lesson. Some kids had fun with the Microbits. Not sure any of them were especially inspired.
Left them to do their own book work, on things they’d made in (or their general impression of) Scratch and/or Sonic Pi. Results were variable - a few seemed to have no idea what to put, but others evidently had plenty to say. I look forward to seeing this page in their books, more than the others.
- Familiarity with blogging software (WordPress)
- The structure and interpretation of basic HTML
- The role of CSS
- The function of JS
Did anyone make anything interesting with the Microbit? Does anyone have any ideas for fun things to make with a Microbit or a Raspberry Pi?
Last lesson. Will need to spend some time on rounding up.
HTML is the HyperText Markup Language. Without HTML, there is no web. ‘Hypertext’ here means that it is based on text with links to other bits of text. ‘Markup language’ means that it includes something besides text to give instructions about the text, in this case tags enclosed by <angle brackets>
Make an account on http://springtale.co.uk/school and write a blog post about the technology or idea described on the card I have given you (15 minutes).
Content Management System
Read submissions from the rest of the class. You may like to add respectful comments. Then add links to your post going to other posts on the site made by members of your class. (20 minutes)
Look at the blog post you made. Switch to Text viewing using the tab at the top right of the post editing window. That, there, is HTML. Switch back to the Visual mode, change some formatting, and then go back to HTML to see what’s different.
Now go to a web site of your choice and choose Inspect Element from the right-click menu to see how a web page is put together. You might like to change some of the text.
If there’s plenty of time, have a stab at a couple of things on http://jsdares.com
Write up about the internet.
Notes on 2015-16 version
I went for the slightly eccentric approach of starting with a textual programming language. There were a couple of reasons for this:
- The resources for Sonic Pi looked pretty good. Which they are, I have to say.
- Having introduced a class to Scratch the year before, I know that it’s very easy for kids to get sucked into just messing around with that indefinitely.
- It’s obviously easier to get started with a graphical language
- Sonic Pi requires headphones all round, which is difficult for collaboration
- It might be better to start with more about computers and the internet, to help motivate later work
I’m personally more interested in graphics than sound, and suspect they teach more transferrable skills. So I’m looking at using Processing next time round.
“content”: “## Learning Objectives”
“content”: “## Starter Questions”
“content”: “## Notes”
“content”: “## Activities”
“content”: “## Book Work”
“content”: “## Evaluation”
Introduction to functions.
Functions (in maths) are things that take one number and turn it into another.
Draw a box on the whiteboard, with numbers going in and numbers coming out. Hands up if you think you know what the box is doing. Ask person with hands up to predict the next number.
Try another one.
Ask if anyone has ideas for another one. Get them to write it on the board and get people to guess.
Go to http://bit.do/function
Experiment with different mathematical functions and see what you find.
Record your results.
Look at http://bit.do/pfunction and try to make sense of what you see.
Getting started with the Pi
How to set up your Pi! Get it all plugged in, then log in. Introduce the command line - ls, cd, maybe mkdir, then startx.
Issue a Pi per pair and ask them to repeat what they just saw.
Once they’ve booted in, name the bits of the screen that they’re familiar with. What do they notice is different from Windows?
Load up Scratch, and load the Steerable Rocket example again. Let’s go through some of the different bits - draw an analogy between commands on the command line, and commands (or functions) in Scratch. Draw attention to the things from the Event block, and go through how to add more controls to this ‘game’.
Note the various other kinds of Event - collisions, interactions of different sorts…
Now that we’ve introduced the idea of a Speed variable, let’s introduce Acceleration. This could control how fast the rocket can change velocity; we could also introduce gravity.
Each pupil needs to research a term and explain them to the rest of the class next week, without notes:
Ethernet cable Bluetooth
- HTML - Maricell
- CSS - Sam
- USB - Elliott
- Android - Lucy
- Wireless - Anna
Last week we made the Scratch Cat draw squares and triangles. What if we want it to be able to draw a shape with any number of sides we choose?
First we need to define a variable for the number of sides.
Then it needs to turn that fraction of an angle between each line.
Is there anything else we might want to change?
Have you come across the idea of variables in maths?
So a variable is a name given to a quantity, or thing, that can vary. It could represent the speed of an object, for example, or the amount of liquid in a container.
Here’s a program where you get to control a rocket-pen. How could you change the speed of the rocket using a variable? How could you allow the user to control that variable? Work in pairs or threes, and think if there’s anything else you might want to change. In twenty minutes we’ll all look at what the other pairs have made.
Introducing the Raspberry Pi:
This tiny computer is called a Raspberry Pi. We have one for each person in the class, and we’re going to start playing with them for real next week.
This thing is just slightly smaller than the 16k RAM pack we used to hold in the back of my ZX81 with Blu-tack to keep it from wobbling too much. It has 32,000 times as much RAM, and this tiny micro-SD card that goes in it has 16 times as much again, so altogether it has eight and a half million times as much memory as the original ZX81. It runs faster than any computer that existed anywhere in the world before about 1992, when I was your age.
It’s pretty slow by modern computing standards, but it’s powerful.
It’s also versatile - half of the fun of this thing is that you can plug all kinds of things into it - if I attach an LED to these two pins, you can see it light up. We could use it to build robots or light shows, take pictures from a high-altitude balloon, all kinds of things.
I also like the Raspberry Pi because you can see what makes up a computer right there - a power supply, a main processor (with the RAM right there), and various connectors to the outside world - 4 USB sockets, one for a monitor, a socket to output sound, one to connect it to a network, a slot for a camera, and so on.
What did you learn? Discuss in pairs.
Make an account on the Scratch web site, and upload a project that involves at least one variable, and something moving around. Upload it to the class studio on the Scratch site
Wrap up lesson
What did you discover?
This week’s homework (?)
Scratch is a visual programming language. It’s structured in blocks, which you can fit together a bit like Lego blocks.
Here’s a program that makes the Scratch cat draw a square. Play about with the numbers - see if you can make a bigger square, a triangle, a pentagon.
I wonder if I gave insufficient guidance on this last year?
An object is a kind of complex variable
about what you made with the Microbit, and any ideas you might have for other things you could try making in future.