Skip to main content

“Dad, I want to learn how to code!”

(… continued from previous page)

Learning to code with a turtle

One of the most didactic programming languages ever made is Logo. Created around half a century ago and currently maintained by a nonprofit organization called the Logo Foundation (website), it’s still used nowadays to show kids all over the world the basics of coding.

In Logo, the coder gives instructions to a turtle that leaves a trail (a line) when it moves. In its most basic version, there are only a few simple instructions that tell the turtle to move forward or backwards a certain distance, and also to turn right or left a certain amount of degrees.

For example, the following code in Logo draws a square in the computer screen, each side having 100 units long:

Logo Squareforward 100
right 90
forward 100
right 90
forward 100
right 90
forward 100

The code is made exclusively of instructions that tell the turtle to move “forward” and to turn “right”. First, we instruct the turtle to move forward 100 units, then to turn right 90 degrees, then to move forward 100 units again, etc., until we complete four lines that form a square.

The Logo interpreter (a program that understands Logo and executes the instructions) follows every step one after the other, from the first one to the last one. Same than other programming languages, Logo has some special instructions to allow repeating a group of steps. For instance, the code to draw a square can also be written in a simpler way:

repeat 4 [
    forward 100
    right 90
]

Anyone could say that Logo is a “toy language” and that it can only be used to draw simple figures. But with some imagination, and combining the simple instructions in a clever way, you can actually draw amazing stuff. The following code draws a star and it has only two more instructions than the one that draws a square, plus an extra starting line to clear the previous drawing:

Estrella en Logoclearscreen
repeat 5 [
    forward 50
    left 72
    forward 50
    right 144
]

If you have enough patience and write longer and more complex code, it’s possible to get impressive designs:

Logo complex drawings
Coding in Logo also allows you to draw very complex designs

I encourage you to try these small programs yourself or try any code you like. There are a lot of Logo interpreters that can be used directly in a website, like this at Calormen (website) or this other one at Transum (website). Anybody can get there and start to code in Logo right away. Give it a try and you will be starting to code!

Speaking the language of the future

Hundreds of years ago, reading and writing was a privilege of the educated elite. Most of the population did not even need to know such things in order to perform their occupations. Obviously, the reality has changed a lot and reading and writing is very important for most professions: learning a language is now considered a fundamental part of education all over the world.

Similarly, many of us believe that coding will be key for the future generations and that coding will be “the language of the future”. In ten, twenty, thirty or fifty more years, our children and grandchildren will face challenges that we can’t even imagine, but it’s very likely that most of them will require them to understand how to use technology.

Ironman screenshot
Many movies, such as the very popular Ironman, show a deep interaction between humans and computers. Even though not exactly as in the movies, many of us believe that our children and grandchildren’s future will be like that.

Hence, knowing how to code, understanding how to give instructions to a machine and how to take advantage of that potential for their professional (and even personal) lives will be essential for future generations.

Now is the time to start giving those tools to our children.

That’s the reason that is pushing a lot of people to advocate for coding to be taught at every school. Nonprofit organizations, universities, influential people, foundations, even some governments, they are all raising their voices and talking about this.

An Hour of Code

In this context, an initiative called the “Hour of Code” was created by Code.org (website). Its objective is to generate a global movement in which, during the same week, as much kids as possible learn the basics of coding during at least one hour.

Inspired by the experience, many of those kids will get motivated and will start to get curious for technology, seeking new ways to learn and get better on their own.

Sitio web de Hour of Code
The reach of the “Hour of Code” initiative is impressive, getting support from influential people around the world, including artists, politicians, sportsmen and successful enterpreneurs.

Last year, the Hour of Code (website) got more than ten million kids to participate in the initiative. During this year, even more kids have already tried the lessons and tutorials in their website.

Of course, the Hour of Code will be held again this year, with an even more ambitious goal and a much broader media reach. During the week of December 7th to December 13th, the expectation is to get a hundred million kids to try an hour of code around the globe.

In Chile, another nonprofit organization called Kodea.org also organized a local version of the Hour of Code. They convened several academic, public and private institutions and organized “La Hora del Código Chile” (The Chilean Hour of Code, website), coordinating their efforts with other Latin-American countries and under the guidelines of the global event owner.

During the week of October 5th to October 11th, almost a thousand schools along the country joined the initiative, with more than twenty thousand total participants. A very nice result considering it was the first time that the event had local organizations support.

Chilean Hour of Code
Chile had its own Hour of Code from October 5th to October 11.

It’s important to clarify that none of those kids will actually get enough knowledge during that single hour to become a professional coder or to be able to create applications or videogames. But that’s not the goal anyway.

The main goal is to give them the chance to get that flash of inspiration, such as the one I had thirty years ago thanks to my dad.

The goal is to show them what is coding about, to let them discover that computers understand orders if the correct instructions are used. Many will feel that it’s interesting, maybe even fun, but they won’t get much farther. But some others will get inspired by the experience and they will get motivated to learn more and to do more complex programs.

And regardless of how much they continue to learn, the most important thing is that all of them will have an idea of “What is to code?”, even if it was a short fun experience. That tiny seed will make a difference years later.

I invite you all to participate in the Hour of Code. If you have kids, share with them the website and encourage them to participate. If you are a teacher, hopefully you will be able to run an Hour of Code with your students. And, in any other case, you can support the initiative by spreading the word with your friends, contacts and in social networks.

We can all be part of this. We can all put our two cents in this, to provide our children with the tools they will need in their future.

Because their future is our responsibility.

More information about how to participate in the Hour of Code in their website.

spanish Puedes leer este artículo en español en papagamedev.cl.
Share Button

Juan Pablo Lastra

Juan Pablo makes videogames since he was 8 and he is a father since 2004. Today, he has three children and he has worked in more than 20 videogames. He got interested on how paternity and the videogame industry are related and he decided to write about it, founding "Papa Game Dev"

9 thoughts on ““Dad, I want to learn how to code!”

  1. Pingback: Togel Online
  2. Pingback: cpns 2018 guru sd
  3. Pingback: must watch
  4. Pingback: Bdsm chat

Leave a Reply

Your email address will not be published. Required fields are marked *