What is coding?

Coding is our way of giving a computer program a set of instructions. Computer programs can include websites, games, apps or even how our computers and phones work.  

Did you know?

We can code in lots of different languages. The key thing we need to remember is to make sure our code is really clear so that the program understands what we want it to do. Before we code using a computer, let's see how clear our instructions can be by completing the "unplugged challenge" below. 

Try this out at home

What you will need: Pens/pencils, paper

1) Think of something that you can draw (maybe a house, a snowman, a car, a football pitch, a musical instrument). 

2) Get a pencil and paper for yourself and someone else in your house. 

3) Sit back to back with them (or make sure you can't see each other’s pages)

4) Start to draw out what you are thinking and as you draw give really clear instructions to the person sitting with you so that they can draw the same thing. 

For example-the start of a house instructions might be:

            - Draw a large square on the page

            - Draw four squares at each corner of the large square…..etc….

5) When you are finished, compare drawings. 

6) If they are very close, talk about why this is has worked out well. If they aren’t anything alike (which happens a lot), think and discuss how your instructions could have been clearer. 

Now that we have completed our coding warm-up above, let’s see how we can be really clear with our instructions using a coding language called MakeCode. With MakeCode, we will build out our instructions using blocks. 

These instructions will program a microcontroller called the micro:bit. It is pretty cool. It has 25 red LED lights, two buttons and lots of special sensors that detect things like movements, temperature, light level and even an in-built compass. 

Do you know what LED lights are? What things in your home use LED lights to work?

LED lights are all around us. They are the lights that tell us the time on our alarm clock or oven. They are the lights that tell us if our TV is on or on 'standby'. So how cool is it that we can program 25 of them all at once? Let's go learn how we can do it. 

So, now that you learned sequences, bugs, inputs and loops, can you complete the home challenge before next weeks video? The DreamSpace team want you to create a new project at https://makecode.microbit.org and:

  • Pick 3 different inputs (e.g. on button A pressed, on shake)
     
  • For each input you pick, design an animation. 
     
  • When you and your family see that animation, perform an exercise at home that gets you all moving while the animation appears on your micro:bit screen. 

Download the PDF below to see the home challenge and also test your knowledge on the micro:bit so far!