Monday, 16 April 2018

I Don't Teach Children How to Code, I Teach Children How to Think.

More and more teachers are introducing students to coding. Many of these teachers had never previously coded themselves, but are making use of many online resources that are freely available to help get students started. Code.org was where I began coding with my class a few years ago. I moved on to Scratch, an online tool that is still block based, but allows students to create their own projects/programs.


The real goal of these tools is to give students an opportunity to think computationally, and to understand the iterative process of building the various parts of a cohesive project. Students are working with block-based programs, but they are also learning to debug their projects as scripts conflict with each other, learning how to code more efficiently, and are developing an understanding of the structure that coding languages follow.


It is important that students learn to think computationally, because that's really the goal. I've heard many people speak disdainfully about some of the different programs students use to get started.

“Block-based coding, that isn't considered real coding”



But I would ask why not? Students are working through the process, figuring out an algorithm, and putting a whole bunch of processes together that work as one program. All the thinking is there, they're just not focused on syntax, or spelling.


In Canada, our students learn French as a second language. There are many studies that have shown the benefits of learning another language. While not all our students will use French in a future position, it does offer them more job opportunities when they graduate school. Parents see the importance of this and often have their children in French all the way through school even when it becomes a choice.

I think we are approaching a time where having students learn to think and speak computationally will open up a wide variety of new job opportunities in the future as well. If you're repairing a refrigerator in 2030, you're going to have to deal with internet issues, and whether or not the refrigerator script for the defrosting process is working with a new update.



There's a whole host of new skill sets that many jobs will require. The internet of things just continues to grow and expand. Street lights in my home town are now run by a type of Wi-Fi signal, so if you're fixing the grid in the city, you're going to have to have some knowledge of how the unit you're working on is communicating with the server.


Our students are going to have to understand how the internet works, not just what's on it.



We're currently concerned with how many apps are using student information, and we are continually trying to understand how our personal information is being used on the Internet. If our students are fluent in the code that makes up those programs, and how those programs work and interact with others, then they're going to understand how their information is being used, because they're going to understand how the internet works.


When I work with teachers on how to build their skills with coding, I often hear about students who already know all about how to code. I take a look and it's really awesome what's being accomplished, sometimes there's hundreds of lines of code, but that doesn't mean that that student doesn't need guidance or help. In one example, there was a program with over forty Sprites which could have just been one Sprite that was cloned. All the “behaviors”, or scripts that the program was running for that one Sprite could run for all the cloned Sprites at the same time. Instead that student did it the hard way. It's important that we get students to the deeper thinking behind the coding. Computational Thinking is a different way of thinking.



Computational Thinking is not new, it's been around for thousands of years. It's how engineers built the pyramids, that's how student trained their minds with tools like the Tower of Hanoi. Here's an example of the Tower of Hanoi:


Try it out for yourself, you have to think step-by-step through the process thinking several steps ahead to be successful. That might sound also like Checkers, or Chess for they too involve Computational Thinking.




When I teach coding in my classroom it integrates collaboration and communication skills, Critical Thinking, Creative Thinking, and Design Thinking as we begin to think about who the end user is for the product students are building. It’s not hard to connect to curriculum either. Myself and 8 other teachers worked on a website last year which has Grades 1 to 6 Math and Language expectations tied right into coding.





So where to next? we boldly go into a future we don't fully understand yet, teaching students to work in positions that we don't know about yet. The one thing we do know is that we have to teach them more about how to think, and less about what to think. I think Computational Thinking and coding should be an important part of that training.

Monday, 7 August 2017

How to Build a Cheap, Portable "Learn to Code" Computer with Raspberry Pi

I believe that all children should have access to “learn to code” resources available today. This is not a reality however, as many do not regularly have access to the internet, or to a computer. Tablets are excellent tools, but access to the most popular tool for Elementary students learning to code - Scratch (https://scratch.mit.edu/) is not an option.

I have been thinking about a way to give better access to more children, and originally thought a Raspberry Pi loaded with video tutorials on how to start coding with Scratch would be a great option. The cost is reasonable and video would be easy to watch on the device and they would work on Scratch right on the Raspberry Pi.

The snags were - different versions of Scratch, 1.4 on the Pi and 2.0 on the web and in the video tutorials I originally created for internet access were all for Scratch 2.0. This might not seem like a big deal to children used to using computers and apps on a regular basis, but might prove a bigger roadblock to children with little, or no experience with technology. The second issue was that they might not have access to a screen, keyboard and mouse which would give them no access to the Raspberry Pi.

When I saw the touchscreen options available for the Raspberry Pi, and that Scratch 2.0 recently became available offline on Pixel OS (Raspbian Operating System on Raspberry Pi) I decided to build a reasonably cheap, touchscreen computer that would need nothing extra to function. It can still be hooked up to a monitor, keyboard and mouse if those are available, but it is useable with nothing more than an outlet.

For my build, I picked up a 4000 mAh Portable Battery Charger from Walmart for $5.00 to make it useable anywhere. There are several touchscreens available for the Raspberry Pi, I chose the official 7in. Screen from the Raspberry Pi foundation (It was super easy to connect to the Raspberry Pi, it all comes together in a few easy steps.


You will need:
(All my links are from a Canadian website, but these products are widely available)

2. Official Raspberry Pi 7in. Touchscreen:

3. Case for the Screen and Raspberry Pi:
I plan to 3D print the next case, there are plans freely available on the internet, so this will bring the cost of the build down a bit.

4. Any 5v microUSB cable should work, and a portable Battery Charger is a bonus:


How To:

1. Connect the white ribbon to the connector on the display adaptor board for the screen and the Raspberry Pi. To insert it, you will need to pull out on the tabs that holds the ribbon into the connectors. Pull upwards with gentle pressure and then insert the ribbon. The ribbon doesn’t go in deep enough to completely cover the metal strips on the end, don’t try to force it all the way in.



2. Next we need to connect power from the Raspberry Pi to the Display Adaptor Board. You will need two wires to do this, 4 are included in the display box. I used red for power, and black for the ground, but it makes no difference which colour wires you use.

The pins are clearly marked on the Adaptor Board, 5v for power, and GRD for ground to complete the circuit. They attach to to GPIO (General Purpose Input Output) pins on the Raspberry Pi as seen in the picture below. The power attaches to the first pin on the top row, and the ground attaches on the fourth pin. There should be two pins in between. Connecting the screen to the Raspberry Pi in this way allows you to power both through the microUSB connector on the Raspberry Pi. Make sure you have a 5v adaptor when you connect to power everything.


3. Now you’re ready to plug in and check to make sure all connections are secure and that the screen works. Plug in the Raspberry Pi and check the screen, you should see the Pixel OS screen (if you installed Pixel on your SD Card).



4. If you installed in many of the cases available for this screen, you will notice that the image is upside down. There is an easy fix for this, but to begin connect a usb keyboard to update/add a few things.

Open up Terminal and type:
“sudo apt-get update” without the quotation marks.

This will ensure you have the latest update of your current distro of Raspbian (Pixel OS).

Once that is completed type:
“sudo apt-get dist-upgrade”
This will ensure you get the latest updated build of Pixel to which you can add Scratch 2.0

To add the Scratch 2.0 coding environment:
“sudo apt-get install scratch2”

5. Now we need to add a line to the startup boot file that will flip the screen the right way for the case.

In Terminal type:
“Sudo nano /boot/confix.txt”

You will see the screen below. Add this to the bottom of the file:
“lcd_rotate=2”
Then press the ‘control key + x’ to exit and save.

The screen will flip once you reboot the Raspberry Pi.
To properly reboot type this into Terminal:
“Sudo shutdown -r now”
It will take a minute, but the Raspberry Pi will reboot and your screen will have flipped.



6. Now we need to install a keyboard, the most popular choice is Matchbox Keyboard.
To install type into Terminal:
“Sudo apt-get install matchbox-keyboard”

After another reboot it should be accessible in “Accessories” under a new section “Keyboard”. You do need to manually select it this way when you restart the Pi.

That’s about it! You should be up and running! I also installed Kodi to play the video tutorials I loaded onto the computer, and there are several coding options built right into the Raspberry Pi to explore.

Thanks for reading, and Happy Coding!

Tuesday, 25 July 2017

Computational Thinking in the Mathematics Classroom

I have been integrating coding into my Elementary classroom for the last few years, and I have started to see more and more benefits as students began to think computationally through various challenges. It does take time to teach students how to code, but the benefits are quickly apparent. They learn the iteration process through testing code they have written as it runs on the computer. Failure is simply part of the learning experience and we apply this mentality to other subjects as well. We don’t code everyday in class, we use it when it fits into the curriculum. It becomes a tool that some students use more often than others, for some it is the best way for them to think and design their solution to a problem.


One of the questions I asked myself as an educator was:


“How does integrating coding into a student’s work flow change the way they approach various challenges?”



This is what I noticed in class:


  1. Sustained focus on a challenge, with little to no frustration when it doesn’t “just work”.


  1. See failure as a natural extension of the iteration process.


  1. Natural integration of various strands, and topics in overarching projects.


  1. Step-by-step iteration process, with methodical selection of one thing to change and why clearly explained.


As students learned to code various problems in the classroom, they were able to reflect on those skills and begin to make use of them when trying to solve a challenging problem.


Here is an example from our Grade 3 math class:


Students worked through this problem, learning the importance of the numerator and denominator during the task.




But a question came up as they were working:




They worked through this problem in small groups that were forwarding different strategies, but one group began to think through the process as though they were coding it in Scratch.




They took their circle fractions and what the numbers meant in the numerator and denominator and applied it to a coding algorithm:


This:


Became this:




We used calculators to figure out each section of the circle. I helped them to do 360 ÷ 5 and 7, they did the rest. They explained the steps in their program and why 2/7 was more than 1/5.


Once students think computationally, it becomes a natural extension of their thinking process.

The following example shows how 90° angles became a part of their thinking when they saw rotations.



They naturally thought in “code” blocks when they explained the rotations the shape made:


To extend the thinking, I asked how many ways a shape could translate (slide) on the screen.



“A thousand”

“A million”

“No, wait… 360!”

One student decided to show what it would look like…






I have enjoyed watching my students benefit from the addition of coding to our learning process. It isn’t hard to find ways to make coding fit into the curriculum.


Introducing a Concept

Purposeful Practice

Final Application


When introducing a new concept, don’t add on a coding challenge as well. Let students immerse themselves in the new learning with a challenge that helps them to better understand the new concept. Once they become comfortable with it, coding can be one of the purposeful practice opportunities that help students to deepen their understanding of the concept. As a final application, or project I like to give my students options in how they can share their work. In this way, some students will chose coding as the platform to show their new understanding, while others will use what best suits their learning style. In this way, everyone is confident in their final product, and will share their best work.



Sunday, 4 December 2016

Elementary Coding: Number Sense and Numeration with Racing Cars!

"Racing Cars - Number Sense" is a project that has the more difficult coding parts completed so that students can adjust the values to create harder, or easier questions in the game. They don't have to know how to code the entire program, they are just "tweaking" the code to give them a desired result. They can change how fast the competitor's car travels across the race track, and how far their car will travel each time they answer a question correctly. In this way, they are practicing their math skills, and then adjusting the game to increase the challenge as their skill level increases. 




This project can work for a Grade 1 through Grade 6 class depending on how hard the students code the math questions. It is a simple game where one sprite moves at a constant rate, while the other sprite needs to first answer an addition (or subtraction, multiplication and division) question to move forward. 

My Grade 3 class will first play this game, then code it for a Grade 1 class and a Grade 6 class. They will have to consider the range of numbers selected in the "operators" blocks of code when doing subtraction, and division.



If they select a smaller number for the first number in the question for subtraction, or division, then their program won't work, not for an Elementary class at any rate.

Here is the video tutorial to get you and your class started:




Here is the project page:
https://scratch.mit.edu/projects/134306670/

Good Luck!

Elementary Coding: Measurement (Telling Time) & Number Sense (Ratio)

Here are a few Measurement and Number Sense projects that program a working clock in Scratch. It starts with Primary and works up to Junior.

There is an advanced project as well. Students are asked to adjust the ratios between the two hands already on the clock, band to add a third (hour) hand to the clock as well.

If you want to learn along with your class, try the Primary or Junior video tutorials.

Primary Clock Project:

Here is the starter project your students will use:




If your students are in Grade 4-6, or found the above project easy, here is a video tutorial and project for them to try.

Junior Clock Project:
 
Here is the starter project your students will use:


Scaffolded Project: 
Students can try this project where one of the "hand" sprites is already coded, and they have to code the other hand to be in the correct ratio as they travel around the clock face:


Represent Ratios found in Real Life Contexts:

The "hand" sprites need to turn (rotate) around the clock. Can you code the hands to go around the clock at the proper ratio?

Extension: Can you add an "Hour" hand sprite to turn and represent each hour at a ratio that matches the Minute and Hour hand sprites?

How did you figure out the solution? Explain the math you used to make the program work properly.



Easier Project:
Number Sense and Numeracy/Measurement:

Clock: Switch the Stage Once an Hour


This clock switches its backdrop, but it is not switching it once an hour as its programmer intended. Can you change the program so it changes the backdrop once an hour?

Measurement and Addition skills are needed to succeed at this task. How did you solve the problem? Explain your thinking!

Friday, 2 December 2016

Elementary Coding: Probability Experiment and Building a Graph!

This is a quick way to do the Hour of Code in your class and still meet specific Math expectations in your classroom. There are a ton of terrific coding activities online, this is just my contribution.


My daughter wanted to code a game in Scratch, and we built this little game together for fun:

Snowman Dash!


After we coded the game I saw how it would relate to Probability in my Elementary classroom. 

1. How long can your Snowman survive the game? 

2. How could you change the code in the game to make it easier, or harder to survive. 

3. Write down how you changed the game and share with your classmates.


Next I thought about how we could graph the results, so I built this simple Pictograph in Scratch:

Building a Pictograph


Now students could add to the code to graph the data they gather collected when we played the "Snowman Dash!" game.

You can change the sprites that move up the graph to match any data you collect in your class as you work on Data Management.

Happy coding!