Better Programming

Advice for programmers.

Follow publication

The Benefits of Early Coding Education: How I Introduced My Child to Coding

Séverin Bruhat
Better Programming
Published in
4 min readApr 19, 2023

--

My daughter coding on code.org

As a developer, I always thought teaching my daughter to code would be good but never really took the time to do it.

When the COVID-19 lockdown kicked off in March 2020, like millions of parents, we had to deal with our jobs and homeschooling at the same time. Luckily, as we both work in the IT sector, the transition from office to remote was pretty smooth. Dealing with the school tasks was another story.

This was when I decided I could keep Erine (my daughter) occupied with learning how to code.

What Coding Can Teach Kids

  • Learning to code can help kids develop their problem-solving skills by teaching them how to break down complex problems into smaller, more manageable parts.
  • Coding also encourages logical thinking by requiring kids to think step-by-step through a process and consider all possible outcomes.
  • Kids who learn to code can also improve their understanding of algorithms, which are sets of instructions to solve a particular problem or complete a task.
  • Coding can help teach perseverance and resilience because programming often involves trial and error, and sometimes, the solution to a problem isn’t immediately obvious.
  • Learning to code can also foster creativity by encouraging children to think outside the box and experiment with new ideas and approaches to problem-solving.
  • Finally, learning to code can be a great introduction to STEM subjects (Science, Technology, Engineering, and Math), which are increasingly important in today’s job market.

A Dive Into Scratch

We had to start somewhere, but I had no idea where. After a little research, Scratch sounded like the right place to start.

Scratch is designed, developed, and moderated by the Scratch Foundation, a nonprofit organisation. It was born in the Media Laboratory at the Massachusetts Institute of Technology (“MIT”).

A few advantages of using Scratch

  • It’s free
  • It’s available in more than 70 languages
  • It’s a visual programming language (drag and drop)
  • The only thing you need is a browser (and an internet connection)
Screenshot of a Scratch project

Main Scratch concepts

  • Sprites: A script is a set of instructions used to create a Scratch program.
  • Scripts: In Scratch, you create programs by dragging and dropping code blocks. These blocks are called “scripts.”
  • Blocks: Scratch has many different types of blocks, each with a specific function. Some common types of blocks include “motion” blocks for moving sprites, “sound” blocks for playing sounds, and “control” blocks for controlling the flow of your program.
  • Events: You can trigger actions based on certain events, such as when a sprite is clicked, a key is pressed, or a timer runs out.
  • Variables: Variables are a way to store and manipulate data in your Scratch programs. You can create variables to store numbers, strings, or other data types and use them to perform calculations or make decisions in your scripts.
  • Loops: Loops are a way to repeat a code section multiple times. There are several types of loops in Scratch, including “repeat” loops, “forever” loops, and “while” loops.
  • Broadcasts: Broadcasts are a way to send messages between different sprites in your Scratch project.
  • Costumes: Sprites can have multiple “costumes,” which are different appearances they can switch between.
  • Backdrops: Scratch projects can have multiple backdrops (background), like “scenes” in a movie.

The Learning Process

  1. We first started looking at the Scratch user interface to get familiar with the IDE (Integrated Development Environment) and discover its basic features.
  2. I started to teach my daughter the basics. She could add a sprite and move it up/down/right/left using the keyboard’s arrows. Then she created a program to display her name (with some effects).
  3. Then, I bought some Scratch cards and implemented a small game together. Quickly, Erine could follow the steps and implement more games (using the cards).
  4. Eventually, Erine improved the gameplay by adding complexity (new rules, bonus points, sounds, etc.)
Apple Catcher game

The Next Step

When things returned to “normal” in 2021, Erine started showing less interest in programming, so she had a break. But recently, she asked me if she could code.

So, I looked at what she could learn and found code.org. Erine started the Express Course. We like the way the exercises are built. It’s an interactive tutorial that slowly introduces development concepts: conditions, loops, events, debugging, etc. The cool thing is that, even though it’s a drag-and-drop interface, you can also see the generated code:

function moving_west_and_looping(this_sprite) {
mirrorSprite(this_sprite, "left");
moveInDirection(this_sprite, 5, "West");
if (getProp(this_sprite, "x") < -50) {
setProp(this_sprite, "x", 450);
}
}

function moving_east(this_sprite) {
mirrorSprite(this_sprite, "right");
moveInDirection(this_sprite, 5, "East");
}

function shrinking(this_sprite) {
changePropBy(this_sprite, "scale", -1);
}

function growing(this_sprite) {
changePropBy(this_sprite, "scale", 1);
}

function moving_south(this_sprite) {
moveInDirection(this_sprite, 5, "South");
}

setBackgroundImageAs("background_landscape26_1");
makeNewSpriteAnon("birdside_05_1", ({"x":66,"y":103}));
addBehaviorSimple(({costume: "birdside_05_1"}), new Behavior(moving_east_and_looping, []));

The next step will be for Erine to start learning Python, HTML, JavaScript, or whatever she fancies, as code.org provides a wide range of languages.

“I enjoy programming because you get to make your own games.” — Erine

Thank you for reading. I hope this article inspires other parents to introduce their children to coding. Please share your thoughts and experience in the comments.

Resources

  1. Scratch Foundation
  2. Scratch cards (printable version)
  3. Official Scratch resources
  4. Code.org

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Séverin Bruhat
Séverin Bruhat

Written by Séverin Bruhat

Software Engineering Manager @Trustpilot (Scotland, UK). Writing about team management, leadership and software engineering.

Responses (4)

Write a response