Categories
Education

The one problem with coding in schools

It’s obvious that coding is coming to schools strongly in different countries around the globe. This is all good and will give future generations more skills working with computers, right?

I see a problem here, which is programming transforming from something very creative to a factory job. When programming is introduced to schools in such a massive way, it’s clear that teachers haven’t had time to really dive in to that subject. Don’t get me wrong; some of them are. But can you really expect from older teacher to use hours of them free time to study world of programming with absolytely 0 pay for their time?

Due the lack of time, we can reason that teachers rely widely to available resources like code.org. But this setting also means that programming becomes more like

  1. Question
  2. The one and only solution.

In the ideal world, after learning basics, students would start to desing their own programs, something they find interesting. But if the teacher is not really familiar with the subject, it’s hard to support that. I admit that this may still be possible in simple training environments such as Scratch, but you can’t stay with these simple environments forever.

Here is the personal confession of this post: I have studied computer science alongside with mathematics in university and made some projects along the years. I’m sometimes embarrassed how little I know. So many programming languages. So many libraries in those languages I know. Many of those languages could be justified to be teached for young people. There is enormous difference with my other subject, maths: Students can’t ask me a math question that I couldn’t answer.

And what is the problem if people are programming like robots? The answer is that they will be replaced with robots. So studying only the basics of programming won’t pay off. And what about motivational effect? We really can’t say. It’s likely that some students will get carried towards coding and others from it.

We have to make sure that programming will stay as creative job as it is on its best. That is done by making sure that students have specialized teachers on their reach.

Categories
Education

Super easy labyrinth game with Scratch

  1. First, you’ll need a maze. You can use your own or download this:

To make things simple, make sure that whichever maze you use, it has no openings. This is how we avoid player form coming out of the maze and just bypass it from outside.

2. Download your maze of choice as a backdrop:

3. Delete the cat

4. Pick new sprite (character)

Double click the one you want. In this example, I choose Ladybug1.

5. Edit sprite’s costume

6. Draw a box around your sprite with mouse. (Click and drag the box over to opposite corner.)

Now, click on one corner and drag the sprite smaller. Good size with this maze is somewhere around 20×20, I use in this example 18×19. You can check the size here:

It’s not a problem if it’s not perfect square, for example 17×19. Just make sure that both numbers are small enough for your sprite to walk in the maze without touching the walls.

Now the code:

Make sure that your starting coordinates are right. 

To get the touching color right, first click the box that has the color in it, then click at black part of the labyrinth. 

This is now very basic, we could add some goal to the end:

There are several ways you can make this game better if you want to. Here are some ideas:

  • Time to complete the labyrinth
  • Some collectables
  • Player moving all the time, only the speed is altered when player uses keyboard
  • More levels

Find more free and paid Scratch materials at my Teachers Pay Teachers shop.

Categories
Education

2 easy and 2 professional ways to teach coding

I’ve been teaching coding (along mathematics) for kids aged 9-16 for several years. I’ve proceeded in this order:

  • code.org
  • Scratch
  • Python
  • Unity

First two are quite easily doable for teacher/parent with no programming experience. About the last two, I personally think that Unity is more appealing for today’s youngsters, but as an example of text-based coding Python is ok.

Code.org

Contains several lesson for different age groups. Still, consider your pupils experience before starting. If they have no experience at all, they could shortly go through materials for younger kids before proceeding to their own age group and vice versa. If you have no experience yourself, it’s highly advisable that you do the lessons yourself beforehand. Make sure that you find the ways to use suggested amount of code lines, as there are sometimes many ways to solve a task, usually the shorter the better. Link: code.org

Scratch

Compared to code.org, Scratch is more open environment. It needs Flash player. You can actually do your own games if you’re registered user, for others to play. Coding happens by dragging blocks from left to right. Here is a picture of one of the most basic programs in Scratch:

Pay attention to block colors; color of the block will tell you from which block group it’s from.

  1. Every program has to start somewhere. This will start when clicking the green flag. This is a common way to start Scratch program. (Other common option is starting with a key from keyboard.)
  2. Forever-loop is important. Otherwise program will end before user gets to press anything.
  3. There is a coordinate system. Using this system makes it easier to move the way you intended. Other option is to use steps, but then you have to be cautious with direction. Steps always uses direction to determine where to go.

And there you go! You can modify this basic program in numerous ways.

Python

Sometimes you need an example of text-based programming language and Python is one of these. It’s relatively simple to learn. It can be used many ways:

  • Install Python to your computer. Write code to .py text-file and compile it. This is the hardest way, but best if you write longer programs. If you’re using Windows, change path-environment variable from settings according to where your python.exe is located.
  • Install Python to your computer and use ide that comes with installation. Ide means that you can write code and see the results right away.
  • If you don’t want to install it (yet), you can use online ide, such as ideone.com There you can also use other programming languages. Downside is that if you are not careful, you may lose some work.

Here are some very basic examples (and by the way, printing doesn’t mean it prints on paper, only on screen):

Printing numbers form 0 to 9:

for i in range(10):
	print i;

Printing multiplication table of 5:

for i in range (10):
	print ((i+1)*5);

Printing first Fibonacci numbers:

numberA=1;
numberB=1;
temporary=0;
while(numberA<1000):
	print numberA;
	temporary=numberA+numberB;
	numberA=numberB;
	numberB=temporary;
Unity

Unity unites text-based coding to graphical interface, making it fast and relatively easy to develop games. Several commercial games have been created with unity, see list of examples here. Unity is not the only one of it’s kind, but it is definitely one of the most significant game engines.

Good news is that Unity is free for private use and even when you are earning a little with your game you’ve developed. I’m not eager to put any specific details here, please check from Unity’s website if you have any questions with licences.

I have a plan to make some Unity related content for educators but that idea is still in its infancy. Before that, you can check their own learning page: https://unity3d.com/learn